Learn R Programming

data360r (version 1.0.9)

get_metadata360: Get TC/Govdata360 metadata from API

Description

Downloads the requested metadata by using the TCdata360 API at https://tcdata360.worldbank.org/docs or Govdata360 API at https://govdata360.worldbank.org/docs. The function generates a wide dataframe.

Usage

get_metadata360(site = "tc", metadata_type = "countries")

Arguments

site

string pertaining to the data360 site to download data from. Possible choices: 'tc' for TCdata360, 'gov' for Govdata360

metadata_type

string pertaining to the metadata to be downloaded. Possible choices: 'countries' == Lists metadata for all countries and regions. 'indicators' == Lists metadata for all indicators. Does not return actual data. 'datasets' == Lists metadata for all datasets.

Value

Data frame (wide) containing requested metadata

Details

Hint: Want to get other data? Helpful functions include:

  • See search_360 to get search TC/Govdata360 indicators, countries, categories, and dataset lists.

  • See get_data360 to get actual indicator/dataset/country-level data.

  • See get_resources360 to get additional resource information.

Examples

Run this code
# NOT RUN {
## Since all functions download data through API, these are wrapped with
## the "donttest" function as advised by CRAN
#get all indicator metadata in Govdata360
# }
# NOT RUN {
df_indicators <- get_metadata360(site="gov", metadata_type = "indicators")
# }
# NOT RUN {
#get all country metadata in TCdata360
# }
# NOT RUN {
df_countries <- get_metadata360(metadata_type = 'countries')
# }
# NOT RUN {
#get all dataset metadata in TCdata360
# }
# NOT RUN {
df_datasets <- get_metadata360(metadata_type = 'datasets')
# }

Run the code above in your browser using DataLab