← All dashboards & apps

DSIR — Data Science Infrastructure for Global Health

R package

DSIR is an R package developed in-house at the WHO Regional Office for the Western Pacific to support routine global health data work. It bundles the pieces analysts would otherwise rebuild for every project: standard country reference data, API clients for the major health data sources, and a consistent look for charts and tables.

The package is published on CRAN and released under the MIT licence.

What it provides

Country reference data. A who_countries table covering all 194 WHO Member States with standardized ISO3, ISO2 and UN M49 codes, regional ISO3 vectors for each WHO region, and lookup helpers — iso3_to_region(), iso3_to_m49() and m49_to_iso3() — for moving between coding systems.

Data access. Convenience clients for the WHO Global Health Observatory (GHO) OData API and the United Nations Sustainable Development Goals (SDG) API, each with search, fetch and clean steps. bind_indicators() combines GHO and SDG results into a single unified schema so indicators from both sources can be analysed side by side.

Publication-ready output. A ggplot2 theme (theme_dsi(), plus theme_dsi_facet() for facetted plots), matching scale helpers for bar charts, a flextable defaults helper for consistent tables, and ggpie() for quick pie charts with automatic labels.

Indicator calculations. A geometric mean function (geomean()) for indicator aggregation and an average annual rate of reduction function (aarr()) for tracking progress against targets.

Installation

install.packages("DSIR")

The development version can be installed from GitHub:

# install.packages("remotes")
remotes::install_github("shanlong-who/DSIR")

Full function reference and worked examples are available in the package documentation.