Joins data with the location_type dataset and optionally filters to countries only.
Arguments
- data
A data.frame with a
location_namecolumn.- loc_types
A data.frame with
location_name,type,iso3columns. Defaults to the bundled location_type dataset.- keep_types
Character vector of types to keep. Default
"Country". UseNULLto keep all types.
Examples
data(sample_gbd)
result <- qci_pipeline(sample_gbd)
#> ℹ Cleaning and reshaping data...
#> ✔ Cleaned data: 9 locations, 3 years.
#> ℹ Computing epidemiological ratios...
#> ℹ Running PCA...
#> ℹ PCA done for "Both / Age-standardized": 74.1% variance explained (n=27).
#> ℹ PCA done for "Female / Age-standardized": 75.7% variance explained (n=27).
#> ℹ PCA done for "Male / Age-standardized": 73.2% variance explained (n=27).
#> ℹ Creating long format output...
#> ✔ QCI pipeline complete.
merged <- merge_location_type(result$wide)