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

Difference in state population at the state level, versus summing the counties #185

Closed DonnKy closed 2 years ago

DonnKy commented 2 years ago

Thank you for this package. I have a question about state-level data for the US. For instance, I was examining New York State data For the date of filter ( date == "2021-12-09")

cv19_eoy %>% filter (county_fips == "36") %>% ## county_FIPS formerly from key_local

  • select (county_fips, state_name, county_name, population) ## Formerly key_local, admin_area_level_2 and admin_area_level_3

    A tibble: 1 x 4

    county_fips state_name county_name population

    1 36 New York NA **23628065**

cv19_eoy %>% filter (str_sub(county_fips,1, 2) == "36") %>%

  • semi_join(tc_fips) %>%
  • select (county_fips, state_name, county_name, population) %>%
  • summarize (sum ( population), n()) Joining, by = c("state_name", "county_fips")

    A tibble: 1 x 2

    sum(population) n()

    1 **19453561** 58

Thank you!

eguidotti commented 2 years ago

Hi @DonnKy, thanks for your message! Population data for US if from JHU CSSE as listed here. I re-checked and I see that they now list 19453561 instead of 23628065. Maybe it was a mistake on my end. In any case, this is fixed now. You should get the correct population in a few hours. I checked the other states and they look correct. Let me know if you find anything else. Many thanks!

eguidotti commented 2 years ago

I confirm this is now fixed. Thanks!

DonnKy commented 2 years ago

thank you so much for getting back to me so promptly. I am very much enjoying this dataset

On Tue, Dec 14, 2021 at 11:55 AM Emanuele Guidotti @.***> wrote:

Closed #185 https://github.com/covid19datahub/COVID19/issues/185.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/covid19datahub/COVID19/issues/185#event-5765635945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUSGPWM2P6OJWN6AXBVNQ23UQ5ZJPANCNFSM5J6SUTXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.