Learn R Programming

data360r (version 1.0.9)

get_resources360: Get TC/Govdata360 resource information from API

Description

Downloads the requested resource information 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 containing resource information.

Usage

get_resources360(site = "tc", resource_type = "nav")

Arguments

site

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

resource_type

string pertaining to the metadata to be downloaded. Possible choices: 'related' == Find WBG content related to certain topics and countries. Note that this endpoint calls a number of external API so may take around 10s to return on the initial call, however after this the response will be cached. 'toolkits' == Find WBG toolkits related to certain topics and subtopics. 'nav' == List root categories in navigational hierarchy.

Value

Data frame (wide) containing requested resource information

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_metadata360 to get indicator/dataset/country-level metadata.

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 root-level categories in TCdata360
# }
# NOT RUN {
df_nav <- get_resources360()
# }
# NOT RUN {
#get all toolkits from Govdata360
# }
# NOT RUN {
df_toolkits <- get_resources360(site='gov', resource_type = 'toolkits')
# }

Run the code above in your browser using DataLab