ind_search: Search indicator information available through all sources

View source: R/ai_search.R

ind_searchR Documentation

Description

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

Usage

ind_search(pattern = "poverty", fields = c("indicator", "ind_description"),
  extra = FALSE, cache)

Arguments

pattern

Character string or regular expression to be matched

fields

Character vector of column names through which to search from:

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 ai_cache. If omitted, ai_cache_list is used

Value

Data frame with indicators that match the search pattern.

Note

  • src_id_ind: id of the indicator in the source (World Bank, Numbers for Development, No Celings and GovData360)

  • indicator: name of the indicator

  • ind_description: description of the indicator

  • source: source of the indicator

  • src_id_dataset: id of the dataset in the source

  • dataset: name of the dataset in the source

  • gender: female, male or total

  • area: rural, urban or total

  • api: World Bank, Numbers for Development and No Celings.

Examples

# Search by keyword
ind_search(pattern = "education")

# Search by source organization
ind_search(pattern = "Food and Agriculture Organization", fields = "sourceOrg")

# Regular expression operators
'poverty' OR 'unemployment' OR 'employment'
ind_search(pattern = "poverty|unemployment|employment")

# Search for gender related indicators
ind_search(pattern = "male", c("gender"))

# Get all indicators from the Numbers for Development
ind_search(pattern = "Numbers for Development", c("api"))

# Get all Rural indicators
ind_search(pattern = "rural", c("area"))

# Search by topic 
df<-ind_search(pattern = "Health", fields="topic")

EL-BID/Agregador-de-indicadores documentation built on Sept. 15, 2024, 7:43 p.m.