Data Science Infrastructure for Global Health
Overview
Supports global health data analysis, including a publication-ready 'ggplot2' theme, a 'flextable' defaults helper, a thin pie chart wrapper, built-in regional country-code datasets with a WHO region lookup helper, a geometric mean function for indicator aggregation, an average annual rate of reduction function for indicator progress tracking, direct age standardization against the bundled WHO 2026 Standard Population, period life-table construction, a snapshot helper for reproducible data pulls, and convenience clients for the World Health Organization Global Health Observatory (GHO) through its legacy OData API https://ghoapi.azureedge.net/api/ or the public WHO xMart OData API https://xmart-api-public.who.int/DATA_, Global Health Estimates (GHE) through WHO xMart, and the United Nations Sustainable Development Goals (SDG) API https://unstats.un.org/SDGAPI/swagger/.
WHO data infrastructure
- GHO retains the legacy OData API as its compatibility default and adds the public production WHO xMart API. An internal provider adapter maps the official indicator directory, download routes, geography, numeric measure families and named dimensions to DSIR fields. Existing arguments remain;
dimensionsadds exact named filters. The public xMart directory covers a different set of codes and vintages than the legacy catalog. Unknown codes warn; no automatic fallback occurs. - All six GHO query functions accept
backend = "legacy"or"xmart". An explicit argument overridesDSIR.who_backendfor that call without changing the option; an unset option defaults to legacy. GHE always uses xMart.DSIR.who_base_urlaccepts a compatible HTTPS xMart origin. Reference caches are session-only, expire after ten minutes and are scoped to provider/host.
Show all changes in 0.11.0Hide the rest of the changes in 0.11.0
- WHO downloads verify row counts, page consistency and unique identifiers. Incomplete downloads are discarded. Long filters use the public
/$queryPOST endpoint. Compact list filters and batched dimension discovery respect the production query limits. A source-row limit prevents accidental bulk pulls. - xMart queries retry HTTP 200 HTML error pages within the existing three-attempt limit. If the service still returns HTML, the warning identifies a service failure rather than a JSON parsing problem. Failed catalogs are not cached.
gho_clean(keep_dimensions = TRUE)retains named xMart dimensions in addition to dimension types. Metadata retention adds units, measure fields and a row-levelprovidercolumn. Both GHO backends record retrieval provenance; cleaning resolves missing labels with the recorded provider, even after the session default changes. Unknown imported origins stayNA. The default remains the unified 15-column core.- GHO distinguishes absent directory codes, successful empty selections, and request or parsing failures. Legacy HTTP 404 responses trigger a small directory check before a code is reported absent. Valid empty observations produce an informational message; failures warn and retain empty/NA contracts.
Global Health Estimates
- Add
ghe_data(),ghe_causes(),ghe_dimensions(),ghe_coverage()andghe_clean(), usingDEX_CMS/GHE_FULL. Exact geography, year, sex, age, cause and friendly measure filters preserve uncertainty bounds and hierarchy. Cause grouping is not presented as a parent identifier. Rates do not invent uncertainty bounds. Named context can be retained when binding cleaned data. - Discovery uses official references and small filtered code-list slices, avoiding expensive grouping of the full GHE database. Live tests require explicit opt-in and are skipped on CRAN.
- Vignette network examples are displayed without execution by default. This keeps package builds independent of temporary API availability.
Standard population: intentional behavior change
- Beginning with DSIR 0.11.0,
who_std_popuses the WHO 2026 Standard Population (WHO/HSA/DDA/GHE/2026.4, Table 1). Its 18 groups run from0-4to85+. Published percentages sum to 100.02 and are explicitly normalized to 100; the derived standard million sums to 1,000,000 without integer rounding. The four column names remain, butstd_millionis now numeric. No old population object is retained. Align input ages before standardizing.
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-18
- ERROR12 OK, 1 ERROR2026-10-07
- OK9 OK2026-08-28
- ERROR12 OK, 1 ERROR2026-08-12
- OK13 OK2026-08-05
Show 6 earlier changesHide 6 earlier changes
- ERROR12 OK, 1 ERROR2026-07-30
- OK13 OK2026-06-29
- ERROR12 OK, 1 ERROR2026-06-25
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK8 OK2026-04-22
Documentation
- Help pages
- 39 (1 internal)includes a package overview page
- Examples that run
- 45%17 run in a plain check · 21 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 93%
- Return-value docs
- 100%
- Help pages citing references
- 5%
Also includes 1 demo script (run with demo())
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Commits over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/shanlong-who/dsir on 2026-10-18.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-10-13 · The repository has a site deploy workflow
pkgdown site last built 2026-10-13
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2026-04-15Seen in the repository: .claude, .claude-plugin, .claude/skills, CLAUDE.mdNamed in .Rbuildignore: .claude, .claude-plugin, CLAUDE.mdNamed in .gitignore: .claude, .claude/skillsCommits: some crediting it in the message, count not recorded
- GitHub Copilotfirst seen 2026-07-05Seen in the repository: .github/skills
Dependencies
Installing DSIR adds 69 packages (40 with compiled code, 65 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Maintainer since 0.2.0 (2026)
Pick two releases to compare their code metrics.
- 0.11.0Latest2026-10-12 · current release · diff ↗ ·
added 5 exports
ghe_causes, ghe_clean, ghe_coverage, ghe_data, ghe_dimensions - 0.10.0
- unarchivedReturned to CRAN2026-08-28
- 0.9.0
- archivedRemoved from CRAN2026-08-26policy violation On Internet access
- 0.8.0
- 0.7.12026-05-23 · diff ↗
- 0.7.02026-05-21 · diff ↗ ·
added 14 exports
bind_indicators, geomean, gho_clean, gho_count, gho_coverage, gho_has_data, iso3_to_m49, iso3_to_region, m49_to_iso3, scale_x_dsi_col, scale_y_dsi_col, sdg_clean, sdg_coverage, theme_dsi_facet - RR 4.6.0 released · 2026-04-24
- 0.2.02026-04-21
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-04-21
- Total releases
- 7 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 5.7 KB / 9 files
- Download size
- 285 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("DSIR")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.