Skip to main content

Python client to the WHO Global Health Observatory

Project description

GHOclient

Sponsored by Kwar-AI

Sponsored by Kwar-AI - AI-powered epidemiological intelligence


PyPI version Python versions License Tests Publish Documentation

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.

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 by
    • filter_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

ghoclient-1.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ghoclient-1.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for ghoclient-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f795d1177f0562cea3d6f14eb80442d4c094268330ee4e64210794511b6c511a
MD5 9de7e5416548b542c634fb6d16223baf
BLAKE2b-256 47521168be055fbf60bdafda371b46fb554d369f22f5467776f08284314f40a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghoclient-1.1.0.tar.gz:

Publisher: python-publish.yml on fccoelho/ghoclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ghoclient-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1af2319a0edfa0ffdd96a5dc12dcf71a6119cee40cc58b526e3219e871fb696d
MD5 fd871f7a246680bdd570e8e82cd9416b
BLAKE2b-256 cc9b7d44af1d8a70ee5043b51e35e2da12a9307adf1f2db20fe454a70b0cf923

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghoclient-1.1.0-py3-none-any.whl:

Publisher: python-publish.yml on fccoelho/ghoclient

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page