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.2.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.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file ghoclient-1.2.0.tar.gz.

File metadata

  • Download URL: ghoclient-1.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 1ce41b17561d05a499d95215b488ab28103230c30566f1f0d4c759f09bfc4113
MD5 93831b46dce6b351eabf6bd2bf113b39
BLAKE2b-256 848ec1497e6b86accfc7490f382406a54d1fd796ec42ecab762b1be2c5f24829

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghoclient-1.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: ghoclient-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8039d6d9c12c55cd6ba6cab19800a60ee97c063bd604b471e2f8e07e3941d56b
MD5 5815ddc116f73a76ca3461776cbde283
BLAKE2b-256 8a1296b521a8e6217fa8162e97162672a9f26db8bb0d62c7ddecd8802da38810

See more details on using hashes here.

Provenance

The following attestation bundles were made for ghoclient-1.2.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