Oliver Wipfli



Z├╝rich, Thu 1 Dec 2022

QRank Map

QRank Map explores a new way for prioritizing map labels using data from Wikipedia about location popularity.

When making a map cartographers have to decide what to show and what not to show at a given zoom level. Prioritizing labels of cities, countries, and natural sites against each other is usually automated based on a set of rules. An example for such a rule could be to use the population of cities to rank their relative importance. For mountains one could use their height. When data is missing, a fallback to a different property can be used. For example the area of a city could be a secondary measure for importance.

This approach quickly leads to a complex set of rules for label prioritization. And the situation gets even more twisted if one wants to weigh labels of different types against each other. For example, what is more important, the village of Zermatt or the Matterhorn mountain? One intuitive answer would be "whatever gets googled more often". But if you are not Google, you probably do not have access to their search statistics.

Fortunately for us, Google puts the Wikipedia article for places usually at the very top of their search results. If we assume that users then randomly click on links and land on the Wikipedia article, we can say that Wikipedia page loads are actually a good signal for how often people search for a place on Google. This is where QRank becomes useful.

QRank is a software written by Sascha Brawer which counts how often a Wikipedia article was opened over the last 12 months based on public logs. The counts are summed over all languages an article is available in and the resulting total is then saved under the associated Wikidata item. In that way, QRank measures how popular different Wikidata items are.

Many objects in the OpenStreetMap database have a link to their corresponding Wikidata item. If we look again at the example above, we find the following:

So now we know that based on QRank, the Matterhorn mountain is more important than the village of Zermatt and should therefore be prioritized on a map.


Using QRank with OSM data works surprisingly well to make a map. You can have a look at a demo here:


The source code is available on GitHub.


There seem to be two main limitations to the approach presented here:

First, OSM objects may miss a Wikidata tag or worse, they might point to the wrong Wikidata item. A common mistake for example is to link individual trees to the Wikidata item of the species of the tree.

Second, QRank can have misleading values for label prioritization. For example San Francisco has a lower QRank than the neighboring town Reno and therefore is not shown on the map at low zoom levels.


QRank has the potential to create a map with well-prioritized labels based on a single, intuitive rule. While it has some limitations, it might be a great starting point for further manual adjustments by a cartographer.