akarlinsky / world_mortality

World Mortality Dataset: international data on all-cause mortality.
MIT License
282 stars 56 forks source link

USA Data Missing for Week 53/2015 (2015-12-28) #28

Closed USMortality closed 1 year ago

USMortality commented 1 year ago

The data for the USA and week 53/2015 of 2015-12-28 is missing! Any ideas why?

world_deaths <- as_tibble(read.csv(
  "https://github.com/akarlinsky/world_mortality/raw/main/world_mortality.csv"
))
country_deaths <- world_deaths %>%
  filter(iso3c == "USA")
deaths <- country_deaths %>%
  mutate(date = paste0(
    year, "-", str_pad(time, 2, side = "left", "0"), "-1"
  )) %>%
  mutate(date = date_parse(date, format = "%G-%V-%u")) %>%
  tsibble(index = date)
scan_gaps(deaths)
# A tsibble: 1 x 1 [7D]
  date      
  <date>    
1 2015-12-28
dagshub[bot] commented 1 year ago

Join the discussion on DagsHub!

akarlinsky commented 1 year ago

Data in the US is from CDC (Centers for Disease Control and Prevention) and is by "epidemiological week".

2015 has 52 such "epi-weeks". You can see a visualization of this here: https://gis.cdc.gov/grasp/fluview/mortality.html image

USMortality commented 1 year ago

Ok, so it's a parsing/date format issue, rather than a data problem. Thanks!