Description Usage Arguments Value Examples
Download data using a memoised version of WDI::WDI() and wrangle a bit with the data to prepare a data.frame for the plots#'
1 2 3 4 5 6 7 8 9 10 | download_wdi(
indicator = "NY.GDP.PCAP.KD",
highlight_countries = c(""),
start = lubridate::year(Sys.Date()) - 10,
end = lubridate::year(Sys.Date() - months(18)),
country = "all",
regions = default_regions(),
income_groups = default_income_groups(),
interpolate = FALSE
)
|
indicator |
character of length 1 with the indicator code |
highlight_countries |
character vector with country names to highlight |
start |
first year to download data |
end |
last year to download data |
country |
subset of countries to download data from. Default to "all". This argument is passed as is to WDI::WDI and hence, requires 'ISO-2 character codes, e.g. "BR", "US", "CA"'. |
regions |
character vector to filter the data only to specific regions |
income_groups |
character vector to filter the data only to specific income groups |
interpolate |
boolean to indicate whether to interpolate missing values |
data.frame with columns country, year, ind_1, region, income, highlight_ind_1. highlight_ind_1 = NA, except for highlight countries in which case, it takes the value of ind_1
1 2 3 4 | ## Not run:
download_wdi("NY.GDP.PCAP.KD", c("Colombia", "Germany"), 2019, 2019)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.