Sponsored by Kwar-AI - AI-powered epidemiological intelligence
The WHO Global Health Observatory is a large global health data repository that makes available an enormous collection of indicators which can be downloaded through their API. GHOclient is a Python client which helps data scientists search and access their data programmatically.
- Free software: MIT license
- Documentation: https://ghoclient.readthedocs.io.
Using pip:
pip install ghoclientUsing uv:
uv pip install ghoclientFor development:
git clone https://github.com/fccoelho/ghoclient.git
cd ghoclient
uv sync --extra dev- Search for indicators by keyword
- Browse available datasets
- List region and country codes
- Get the data as pandas DataFrames
Basic usage with the GHO class:
from ghoclient import GHO
gho = GHO()
# Get all available indicators
indicators = gho.get_indicators()
# Search for specific indicators
malaria_indicators = gho.search_indicators('malaria')
# Get data for a specific indicator
life_expectancy = gho.get_data('WHOSIS_000001', countries=['BRA', 'USA'])Legacy usage with index search:
import ghoclient
ghoclient.index.search('smoking')The above lines will fetch a DataFrame with all indicators containing the word smoking in their description.
Main interface for accessing WHO GHO data.
-
get_indicators()Returns a DataFrame with all available indicators.
-
search_indicators(query)Search for indicators containing the query string.
query: Search term- Returns: DataFrame with matching indicators
-
get_data(code, countries=None, filter_query=None)Get data for a specific indicator.
code: Indicator code (e.g.,'WHOSIS_000001')countries: Optional list of country codes to filter byfilter_query: Optional OData filter query string- Returns: DataFrame with the requested data
Low-level session class for direct API access.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
