covid19datahub / COVID19

A worldwide epidemiological database for COVID-19 at fine-grained spatial resolution
https://covid19datahub.io
GNU General Public License v3.0
251 stars 93 forks source link

Can we add population density? #200

Closed mikolajadamowicz closed 2 years ago

mikolajadamowicz commented 2 years ago

Population density will help us compare countries with similar vaccinated levels but different lifestyles/cultures. We can check how isolating works vs vaccinating for example. I can make a PR in couple of days if you give me a green light

eguidotti commented 2 years ago

Hi @mikolajadamowicz, thanks for your suggestion.

Actually, you can already import the population density (at the country level) in R:

library(COVID19)
x <- covid19(wb = c("pop_density" = "EN.POP.DNST"))

In the snippet, the code EN.POP.DNST refers to the indicator available at https://data.worldbank.org/indicator/EN.POP.DNST Yes, this means you can already use all indicators at World Bank!

Including the population density at lower levels (i.e. 2 and 3) is a huge work. We'd need to manually insert them for more than 12.000 locations. Another option is to use some geospatial technique to compute the area of the locations using GADM shapefiles. But I'm not sure it is very useful as a user could do it him/herself if interested

What do you think?

eguidotti commented 2 years ago

I assume this is OK