Skip to main content

Europe Open Data: Quality of Life in 7 EU-7 Capitals

The seven-capitals dataset is not published yet. Its spec shows why population, OSM coverage and the choice of pool decide the index.

What do you think about this article?

Europe Open Data: Quality of Life in 7 EU-7 Capitals
Open DataPhoto:weCare MediaPexels

At a Glance

The seven-capitals dataset is not published yet. Its spec shows why population, OSM coverage and the choice of pool decide the index.

The comparison among seven European capitals exists as code, not as data

The dataset Quality of Life - European Cities 2026 is described, in the repository's code, as a cultural density index for seven capitals: Roma, London, Paris, Berlin, Madrid, Amsterdam and Lisbon. It is not published: in the site's open datasets folder there is no file with that name, and the copy of the public catalogue archived on 2026-07-30 does not list it. What exists is the Python spec that says how it would be computed. A ranking of the seven cities, at this moment, would be an invented number, which is why you will not find one here.

You still need it, because the spec contains all the choices that make a comparison among European cities easy to get wrong. By reading it and running two small experiments with numbers declared hypothetical, you will see what decides the result before a single museum is counted: the denominators, the coverage of volunteer mapping and the choice of group of cities. These are the same problems that, on the real data of the Italian capitals, you find measured in the article on the 20 regional capitals.

What the spec says

The file ml-service/app/publishing/dataset_specs/quality_of_life_european_cities.py defines three things. The first is the list of seven cities with the ISO 3166-1 country code, the ISO 3166-2 subdivision code, the coordinates and a population. The second is an SQL query that for each city counts the places in the points-of-interest table within 10,000 metres, with the PostGIS function ST_DWithin on geographic coordinates. The third is the normalisation: the museums per 100,000 inhabitants of each city, divided by the maximum among the seven, times one hundred.

The result has 14 columns: city, country, subdivision, latitude, longitude, population, counts of museums, libraries, theatres and restaurants, total of places, museums per 100,000 inhabitants, index and observation period. The index uses only museums and galleries, as in the Italian dataset, and the declared licence is ODbL 1.0, because the counts derive from OpenStreetMap. In this version there is no weighting of libraries, theatres and restaurants, and no step that deduplicates places by Wikidata identifier.

First experiment: with the same museums, population decides

The first script reads the seven cities directly from the spec file, without importing it (importing would require PostGIS and the rest of the service): with the ast module it finds the assignment of EUROPEAN_CAPITALS and evaluates its content with ast.literal_eval, which accepts only literals and does not execute code. Then it assigns the same number of museums to all the cities, 50, and computes the index. The number is test data, not a measurement: it serves to isolate the effect of the denominator. The city names in the output are those written in the spec (so "Lisboa" is Lisbon).

import ast
from pathlib import Path

source = Path("quality_of_life_european_cities.py").read_text(encoding="utf-8")
capitals = next(
    ast.literal_eval(node.value)
    for node in ast.parse(source).body
    if isinstance(node, ast.AnnAssign) and node.target.id == "EUROPEAN_CAPITALS"
)

MUSEUMS = 50  # identical number for all: a thought experiment, not data
density = {c["city"]: MUSEUMS / c["population"] * 100_000 for c in capitals}
maximum = max(density.values())

print(f"{'city':10} {'residents':>10} {'museums/100k':>11} {'index':>7}")
for c in sorted(capitals, key=lambda c: c["population"]):
    d = density[c["city"]]
    print(f"{c['city']:10} {c['population']:>10,} {d:>11.2f} {d / maximum * 100:>7.1f}")

# Output:
# city        residents museums/100k   index
# Lisboa        547,000        9.14   100.0
# Amsterdam     872,000        5.73    62.7
# Paris       2,100,000        2.38    26.0
# Roma        2,748,109        1.82    19.9
# Madrid      3,223,000        1.55    17.0
# Berlin      3,670,000        1.36    14.9
# London      9,000,000        0.56     6.1

The output shows how much population weighs. With identical museums, Lisbon (547,000 inhabitants) is worth 100 and London (9,000,000) is worth 6.1: a difference of sixteen and a half times due only to residents. The index, therefore, rewards small cities and penalises large ones regardless of their offer. That is why a comparison among capitals of very different sizes must always be accompanied by the absolute count, and a result such as "Amsterdam ahead of London" says little until you know how much of it is due to residents.

The spec's denominators: round, unsourced, with different boundaries

The populations written in the spec are round numbers (9,000,000, 2,100,000, 872,000) except for Roma, which has 2,748,109, the ISTAT value used in the Italian dataset. The file states neither the source nor the year of any figure, and does not say which boundary each refers to: municipality, urban area, metropolitan area. A denominator that is wrong by 10% moves that city's index by 10%, exactly like five more museums out of fifty. I have not checked the figures against Eurostat, ONS or INSEE: until that is done, the comparison should be considered demonstrative. An example of how Eurostat statistics are downloaded and used with a public request is in the article on the comparison of European inflation.

There is then a second mismatch, already seen on the Italian capitals: museums are counted in a circle of 10 km radius, about 314 km² for each city, while the inhabitants belong to an administrative territory of a different extent. Eurostat defines a city as a local administrative unit in which at least 50% of the population lives in one or more urban centres, and a functional urban area as a city plus its commuting zone. Neither coincides with a circle. The spec knows this: it chooses the circle because it is simple to explain, and pays for it with a ratio between numerator and denominator that is not homogeneous.

Second experiment: map coverage multiplies the result

The numerator of this index is the number of museums that OpenStreetMap has recorded, not the number of museums that exist. If the volunteers of one country have mapped 60% of the museums and those of another 90%, the first country's index is 33% lower for the same heritage. The following script demonstrates it with three hypothetical cities, identical in everything except coverage, which is a number invented for the example and does not represent any real country.

# The same real cultural offer in three hypothetical cities (50 museums per 500,000 inhabitants),
# but OpenStreetMap has recorded only a part of it: coverage is a number invented for the example.
population = 500_000
real_museums = 50
for name, coverage in (("city A", 0.9), ("city B", 0.6), ("city C", 0.3)):
    recorded = round(real_museums * coverage)
    density = recorded / population * 100_000
    print(f"{name}: coverage {coverage:.0%} -> {recorded} museums recorded, {density:.1f} per 100k")

reference = 50 * 0.9 / population * 100_000
for name, coverage in (("city A", 0.9), ("city B", 0.6), ("city C", 0.3)):
    index = 50 * coverage / population * 100_000 / reference * 100
    print(f"index of {name} with A as the pool maximum: {index:.1f}")

# Output:
# city A: coverage 90% -> 45 museums recorded, 9.0 per 100k
# city B: coverage 60% -> 30 museums recorded, 6.0 per 100k
# city C: coverage 30% -> 15 museums recorded, 3.0 per 100k
# index of city A with A as the pool maximum: 100.0
# index of city B with A as the pool maximum: 66.7
# index of city C with A as the pool maximum: 33.3

The three cities have the same heritage, 50 museums per 500,000 inhabitants, but their index falls to 66.7 and 33.3 only because the map is less complete. The effect is multiplicative and does not show in the output file: the CSV would have three clean, plausible rows. A dataset that compares countries with mapping communities of very different sizes should therefore carry, for each row, a completeness indicator, or limit itself to comparisons within the same country.

The pool decides the numbers: the test on Italian data

The third problem is the choice of group. The index is expressed relative to the pool maximum, so adding or removing a city changes every value. No new experiment is needed, because on the twenty Italian capitals I have already measured it: in the pool of the seven most populous cities Bologna goes from 77.57 to 100, Roma from 32.79 to 42.27, and one museum fewer in Firenze is enough to push Aosta to first place. The details and the code are in the article on the capitals. For a European comparison the same holds: an index of this kind is not compared across versions with different pools, you compare the order.

What it would take to really publish it

If this dataset were published, I would not do it without these steps. They are not a wish list: each one closes one of the problems measured above.

  • A population per city with source, year and definition of the boundary in the same row.
  • Counts extracted on the same day, with the same query, for all seven cities.
  • A deduplication by Wikidata identifier before counting the museums.
  • A mapping completeness indicator per country, or the comparison limited within each country.
  • The absolute count next to the rate, and a notice that the index changes with the pool.

The first two items are hygiene and can be done right away. The third is simple if you have read how museums are deduplicated in the registry of 1,634 museums. The fourth is the hardest, because it requires an independent measure of coverage, which does not exist in the source data; without it, any ranking among countries is a ranking among communities of mappers.

On the choice of London and the dataset's name

The United Kingdom has not been in the European Union since 2020, and the title of this page speaks of "EU capitals". The dataset's name in the spec, instead, is European Cities, which includes London without contradiction. If the dataset were published, the correct name of the group is "seven European capitals", and the spec's keyword "eu-7" should be changed too. The geographical indications registry is also a dataset described in code and not yet published.

Frequently asked questions

Can the dataset of the seven European capitals be downloaded?

No. The spec that would generate it exists in the repository, but no file is published in the site's open datasets folder. The two related Italian datasets, on the regional capitals and on museums, can instead be downloaded.

Why would the dataset be ODbL and not CC-BY?

Because the counts derive from OpenStreetMap, whose ODbL 1.0 licence imposes share-alike on derived databases. The spec's comment says so: the output stays ODbL to propagate the share-alike.

Can an index from 0 to 100 compare Lisbon and London?

Only in part. The index depends on population (with the same museums Lisbon is worth sixteen times London), on the completeness of volunteer mapping and on the group of cities chosen. The rate of museums per 100,000 inhabitants, with the absolute count next to it, is a more honest comparison.

What you can do now

You can read a dataset's spec before its numbers, extract a table from it with ast.literal_eval without running the code, and isolate with a hypothetical experiment the effect of a denominator or of a coverage level. You know which data would be needed to publish a comparison among capitals and which would not, and you can recognise in a ranking among countries the weight of a community of mappers.

Sources

The two listings were run with Python 3 from the standard library on the file ml-service/app/publishing/dataset_specs/quality_of_life_european_cities.py of the repository, read as text without importing it; the outputs are identical across two consecutive runs. The museum and coverage numbers of the two experiments are declared hypothetical in the text and are not measurements.

Try These Tools

Free developer tools related to this topic.

Commenti

Caricamento commenti...

Sign in to comment

New articles and tools on Telegram too

The Telegram channel flags the site's new articles and tools.

Did you like this article?

Explore other content on the blog or discover my projects