Retrieve data for a single variable from World Bank Data, given the URL for the data location, variable code, or the partial URL including the variable code and possibly the location

get_ecodata_variable_wb(varcode, varname = NULL)

Arguments

varcode

String that is the URL for the data, variable code, or the partial URL including the variable code and possibly the location. If the location is part of the text, it will download the variable for just that country/location. If location is not given, it will download the variable for all countries/locations.

varname

Optional, string to give the variable name. By default, the variable will be named the variable code given in World Bank Data.

Value

Data frame for the single variable from World Bank Data. If country is specified in the varcode, the data frame will include the date and a single column for a single country. If no country is specified, the data frame will include a column for every country. The data frame will also include all relevant meta data describing the data and citing its source.