search

search(text, dataset=None, ref=None)

Find variables whose name, label or description contain every word of text.

Matching ignores case and accents ("educacion" finds “Educación”). Results are ranked: matches in the variable name or label come first.

Parameters

Name Type Description Default
text str One or more words, e.g. "poverty" or "night lights" required
dataset str | None Search only this dataset None

Returns

Name Type Description
pandas.DataFrame One row per variable and scale: dataset, variable, label, unit, years, scale, units (with data) and description. Pass the dataset and variable to geo.load(dataset, variables=variable).

Example

!pip install -q geo4bolivia
import geo4bolivia as geo
import plotly.express as px

hits = geo.search("education women")       # every word must match
display(hits[["dataset", "variable", "label", "years"]])
df = geo.load(hits["dataset"][0], variables=hits["variable"][0], names=True)
px.box(df, x="year", y=hits["variable"][0], hover_name="name",
       labels=geo.labels(df), title=hits["label"][0])
dataset variable label years
0 sdg04 sdg4_3_aem Years of education, women 25-35 2012, 2024
1 sdg04 sdg4_3_esm Higher education, women 19+ (%) 2012, 2024
2 sdg05 sdg5_1_pge Gender parity in years of education, 25-35 (wo... 2012, 2024
3 sdg08 sdg8_6_etm Young women not in education or the labour for... 2012, 2024
4 sdg04 index_sdg4 Quality education index (0-100) 2012, 2024
5 sdg05 index_sdg5 Gender equality index (0-100) 2012, 2024
6 sdg08 index_sdg8 Decent work and economic growth index (0-100) 2012, 2024