owid / co2-data

Data on CO2 and greenhouse gas emissions by Our World in Data
https://ourworldindata.org/co2-and-other-greenhouse-gas-emissions
638 stars 217 forks source link

Incorrect Mapping of Population #8

Closed stadlmax closed 3 years ago

stadlmax commented 3 years ago

Issue

By looking at the CO2 data explorer and the raw data, I observed that the region South America does not seem to have per-capita data which is possibly linked to incorrect raw data or reading raw data incorrectly.

Potential Cause

The issue might be due to a missing "population" value for this region. Indeed, when loading the population of countries and regions, the corresponding file in input/shared/population.csv does not contain an entry for South America. On the other hand, it contains entries for Latin America, which look complete to me as seen in the following snippet.

Latin America,2015,623934016
Latin America,2016,630145024
Latin America,2017,636233024
Latin America,2018,642217024
Latin America,2019,648121024

Moreover, when adding the population numbers for all regions up, the world population for 2019 lies around 7.6 billion people, i.e. when including Latin America, which seems valid to me.

Potential Solution

Changing Latin America to South America in input/shared/population.csv and running make-dataset.py should lead to per-capita data for South America as region. Alternatively, one can add a mapping when loading the population data and combining it with other dataframes. With those two options and potential other side-effects, I open this as an issue instead of a pull request.

edomt commented 3 years ago

Thanks! Fixed in c6d7baa9242c2b03128bc5d53122a7923a786229