Description Usage Arguments Value Examples
This function allows finds indicators that match a search term and returns a data frame of matching results
1 2 3 4 5 6 7 8 |
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 |
cache |
List of data frames returned from |
ignore.case |
if |
... |
Any additional |
a tibble with indicators that match the search pattern.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | d <- wb_search(pattern = "education")
d <- wb_search(pattern = "Food and Agriculture Organization", fields = "source_org")
# with regular expression operators
# 'poverty' OR 'unemployment' OR 'employment'
d <- wb_search(pattern = "poverty|unemployment|employment")
# pass any other grep argument along as well
# everything without 'education'
d <- wb_search(pattern = "education", invert = TRUE)
# contains "gdp" AND "trade"
d <- wb_search("^(?=.*gdp)(?=.*trade).*", perl = TRUE)
# contains "gdp" and NOT "trade"
d <- wb_search("^(?=.*gdp)(?!.*trade).*", perl = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.