wbstats (version 0.2)

wbsearch: Search indicator information available through the World Bank API

Description

This function allows finds indicators that match a search term and returns a data frame of matching results

Usage

wbsearch(pattern = "poverty", fields = c("indicator", "indicatorDesc"),
  extra = FALSE, cache)

Arguments

pattern

Character string or regular expression to be matched

fields

Character vector of column names through which to search

extra

if FALSE, only the indicator ID and short name are returned, if TRUE, all columns of the cache parameter's indicator data frame are returned

cache

List of data frames returned from wbcache. If omitted, wb_cachelist is used

Value

Data frame with indicators that match the search pattern.

Examples

Run this code
# NOT RUN {
wbsearch(pattern = "education")

wbsearch(pattern = "Food and Agriculture Organization", fields = "sourceOrg")

# with regular expression operators
# 'poverty' OR 'unemployment' OR 'employment'
wbsearch(pattern = "poverty|unemployment|employment")
# }

Run the code above in your browser using DataLab