Python client to the WHO Global Health Observatory
Project description
GHOclient
Sponsored by Kwar-AI - AI-powered epidemiological intelligence
Introduction
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.
Installation
Using pip:
pip install ghoclient
Using uv:
uv pip install ghoclient
For development:
git clone https://github.com/fccoelho/ghoclient.git
cd ghoclient
uv sync --extra dev
Features
- Search for indicators by keyword
- Browse available datasets
- List region and country codes
- Get the data as pandas DataFrames
Example usage
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.
API Reference
GHO Class
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
GHOSession Class
Low-level session class for direct API access.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ghoclient-1.1.0.tar.gz.
File metadata
- Download URL: ghoclient-1.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f795d1177f0562cea3d6f14eb80442d4c094268330ee4e64210794511b6c511a
|
|
| MD5 |
9de7e5416548b542c634fb6d16223baf
|
|
| BLAKE2b-256 |
47521168be055fbf60bdafda371b46fb554d369f22f5467776f08284314f40a2
|
Provenance
The following attestation bundles were made for ghoclient-1.1.0.tar.gz:
Publisher:
python-publish.yml on fccoelho/ghoclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghoclient-1.1.0.tar.gz -
Subject digest:
f795d1177f0562cea3d6f14eb80442d4c094268330ee4e64210794511b6c511a - Sigstore transparency entry: 1343173521
- Sigstore integration time:
-
Permalink:
fccoelho/ghoclient@361a2a4261e0a23d574e8fe3271fc735097e5832 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/fccoelho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@361a2a4261e0a23d574e8fe3271fc735097e5832 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ghoclient-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ghoclient-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1af2319a0edfa0ffdd96a5dc12dcf71a6119cee40cc58b526e3219e871fb696d
|
|
| MD5 |
fd871f7a246680bdd570e8e82cd9416b
|
|
| BLAKE2b-256 |
cc9b7d44af1d8a70ee5043b51e35e2da12a9307adf1f2db20fe454a70b0cf923
|
Provenance
The following attestation bundles were made for ghoclient-1.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on fccoelho/ghoclient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ghoclient-1.1.0-py3-none-any.whl -
Subject digest:
1af2319a0edfa0ffdd96a5dc12dcf71a6119cee40cc58b526e3219e871fb696d - Sigstore transparency entry: 1343173525
- Sigstore integration time:
-
Permalink:
fccoelho/ghoclient@361a2a4261e0a23d574e8fe3271fc735097e5832 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/fccoelho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@361a2a4261e0a23d574e8fe3271fc735097e5832 -
Trigger Event:
release
-
Statement type: