outbreak-info / R-outbreak-info

R package to access the genomics and epidemiology data and Research Library metadata compiled and standardized on outbreak.info.
https://outbreak-info.github.io/R-outbreak-info/
MIT License
20 stars 10 forks source link

`getAdmn1ByCountry` output is not equal to `getEpiData` #92

Open watronfire opened 2 years ago

watronfire commented 2 years ago

I'm trying to get daily cases and deaths for all states in the US. However, I've found that the output of getAdmin1ByCountry is not as complete as the output of getEpiData for an individual state. See the below example involving Nevada:

> library( outbreakinfo )
Warning message:
replacing previous import ‘jsonlite::flatten’ by ‘purrr::flatten’ when loading ‘outbreakinfo’
> 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

> nv <- getEpiData( "Nevada", admin_level = 1 )
  downloading [==============================] 100% eta:  0s

> dim( nv )
[1] 880  56
> nv_admin <- getAdmn1ByCountry("United States of America") %>% filter( name=="Nevada" )
  downloading [==============>---------------]  51% eta:  3m
> dim( nv_admin )
[1] 300  57

I think the problem is that the output of getAdmin1ByCountry seems to be capped at 26,000 rows, and the expected output would be ~44,000 rows.