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 92 forks source link

why no pop for United States? #5

Closed dankelley closed 4 years ago

dankelley commented 4 years ago

I think there as a non-NA pop for the United States before, but now it seems to be gone. I wonder if that's a problem with the upstream data, or a result of the name change (which I think was "US" until a few days ago, but I might be remembering back to the days when I used my own code to download the Johns Hopkins data).

library(COVID19)
d <- covid19()
for (country in c("France","United States", "Canada")) {
    ds <- d[d$country==country,]
    cat(ds$country[1], ds$pop[1],"\n")
}

yields

France 66987244
United States NA
Canada 37058856
eguidotti commented 4 years ago

Thanks for your message! The pop for US is actually missing. I don't remember it was available before but I might be wrong as the package went under heavy development this week.

Would you like to fix that? It's enough to fill in the value in this file: https://github.com/emanuele-guidotti/COVID19/blob/master/inst/extdata/db/ISO.csv You might want to have a look at the contribution guidelines.

I'm asking that because we are trying to make the project as collaborative as possible to build a community and gather worlwide fine-grained data.

If you are not willing to take on the challenge, let me know and I will fix it in 5 mins.

dankelley commented 4 years ago

Sorry, but I'm actually not sure of the format (e.g. what those pop_* items represent, nor a source to find the iso_* values). I'm afraid I'd mess things up, and require too much help.

I have reasonably good R skills, though [*], and maybe I can help in that way, if I see problems. (I also know about git-pull etc.)

eguidotti commented 4 years ago

I'm afraid I'd mess things up, and require too much help.

Don't worry, everything should be extremely easy. Let me expain briefly:

Submit the updated file in a pull request (state the source please). That's it! No R needed, the package automatically reads that file and takes care of merging, etc...