Retrieve IHME data
get_ihme.Rd
Retrieves IHME data from the shared drive.
Usage
get_ihme(
version_date,
source = "subnational",
aggregation = "polio",
vaccine = NULL,
with_admin = F,
with_admin_date = NULL
)
Arguments
- version_date
A string in the format of "yyyy-mm", corresponding to the version of the IHME file you wish to load.
- source
A string used to determine which IHME file to load. Options are: "national", "subnational", "raster", "national_citations", and "subnational_citations".
- aggregation
A string used to determine which aggregation to use when loading subnational data. Options are: "polio" or "gadm"
- vaccine
A string or vector used to determine which vaccine to use when loading raster or citation data. Use standard vaccine format (e.g. "dtp1"). Required when reading in raster or citation files, otherwise leaving NULL will read in all vaccines.
- with_admin
if TRUE, loads a version of the subnational file which includes admin data.
- with_admin_date
if NULL, loads the latest ihme/admin subnational file. A string in the format of "yyyy-mm-dd" can also be used to specify exact version of the file.
Examples
#defaults load subnational file aggregated to polio shapes
get_ihme("2022-12")
#> Warning: no non-missing arguments to max; returning -Inf
#> Reading in Subnational IHME file dated 2022-12 and aggregated to polio shapes
#> Error: 'C:/Users//Gavi/Measurement, Evaluation and Learning - Documents/CPMM/Datasets/Coverage/IHME/Subnational/2022-12/polio aggregations/outputs/ihme_subnational_coverage_polio_2022-12.csv' does not exist.
get_ihme("2022-11", "national")
#> Warning: no non-missing arguments to max; returning -Inf
#> Reading in National IHME file dated: 2022-11
#> Error: 'C:/Users//Gavi/Measurement, Evaluation and Learning - Documents/CPMM/Datasets/Coverage/IHME/National/2022-11/outputs/ihme_national_coverage_2022-11.csv' does not exist.
get_ihme("2022-12", "raster", vaccine = "dtp1")
#> Warning: no non-missing arguments to max; returning -Inf
#> Reading in DTP1RasterRaster IHME file dated: 2022-12
#> Warning: C:/Users//Gavi/Measurement, Evaluation and Learning - Documents/CPMM/Datasets/Coverage/IHME/Subnational/2022-12/rasters/dpt1_cov_mean_raked_2000_2021.tif: No such file or directory (GDAL error 4)
#> Error in .rasterObjectFromFile(x, objecttype = "RasterBrick", ...): Cannot create a RasterLayer object from this file. (file does not exist)
get_ihme("2022-12", "citations", vaccine = "dtp3")
#> Warning: no non-missing arguments to max; returning -Inf