epiforecasts / covidregionaldata

An interface to subnational and national level COVID-19 data. For all countries supported, this includes a daily time-series of cases. Wherever available we also provide data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources as well as linelist data and links to intervention data sets.
https://epiforecasts.io/covidregionaldata/
Other
37 stars 18 forks source link

NAs in un_region for national data #68

Closed TimTaylor closed 4 years ago

TimTaylor commented 4 years ago
library(covidregionaldata)
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union

all_countries <- get_national_data()
all_countries %>% 
  filter(is.na(un_region)) %>% 
  group_by(country) %>% 
  tally()
#> # A tibble: 5 x 2
#>   country            n
#>   <chr>          <int>
#> 1 Greece           233
#> 2 Namibia          233
#> 3 Spain              1
#> 4 Taiwan           233
#> 5 United Kingdom   233

Created on 2020-08-19 by the reprex package (v0.3.0)

seabbs commented 4 years ago

Thanks for this @tjtnew,

Standard check is this the CRAN or GitHub version? If CRAN could you check if you can reproduce using the GitHub version (out of sync due to CRAN overlords holidays).

TimTaylor commented 4 years ago

Github

seabbs commented 4 years ago

Ty - will check out.

seabbs commented 4 years ago

Chasing this down it appears to be an issue with ISO codes.

"The European Commission generally uses ISO 3166-1 alpha-2 codes with two exceptions: EL (not GR) is used to represent Greece, and UK (not GB) is used to represent the United Kingdom.[10] This notwithstanding, the Official Journal of the European Communities specified that GR and GB be used to represent Greece and United Kingdom respectively.[11] For VAT administration purposes, the European Commission uses EL and GB for Greece and the United Kingdom respectively."

From: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Looking into fixes now (maybe a manual code)