globalvuln is an R data package containing country-level data from published
global vulnerability, fragility, development, hunger, health, gender, debt,
safeguarding, and displacement indices.
Publisher scores remain on their original scales. The package standardises only rank and decile direction, so rank 1 and decile 1 always mean most vulnerable within the countries scored by that index.
Interactive explorer: Compare the structure, coverage, concepts, and sources of all 17 indices.
Install the development version from GitHub:
# install.packages("pak")
# pak::pak("humaniverse/globalvuln")
install.packages("globalvuln", repos = c('https://humaniverse.r-universe.dev', 'https://cloud.r-project.org'))
The repository contains both an ordinary R data package and the pipeline that
maintains its data. The installed package is intentionally smaller than the
repository: maintenance directories such as data-raw/, data-published/,
_targets/, and .github/ are excluded by .Rbuildignore.
| Path | Role |
|---|---|
R/ |
Installed functions. collate_indices() combines bundled datasets, globalvuln_data() selects bundled or online data, and source_status() reports provenance status. |
data/ |
The 17 compressed .rda datasets and humanitarian_index_sources that form the immutable snapshot in an installed package. |
inst/extdata/ |
Installed source registry and approved manifest used for cadence and provenance reporting. |
man/ |
Generated help pages for the functions and datasets. |
tests/testthat/ |
Tests for the public API, common schema, source adapters, validation rules, and online-board contract. |
data-raw/ |
Repository-only update system: source catalogue, one adapter per publisher, standardisation and validation code, approved history, manual inputs, and country-name overrides. |
_targets.R |
Defines the reproducible targets graph that runs the source adapters and publication steps. |
data-published/ |
Versioned static pins board containing approved historical data and provenance. The website publishes it at https://humaniverse.github.io/globalvuln/data/. |
.github/workflows/ |
Runs package checks, the daily data-update pipeline, pull-request creation, and website/board deployment. |
The runtime data flow is therefore separate from the maintenance flow:
installed package: data/*.rda -> collate_indices() / globalvuln_data("package")
published board: data-published/ -> website -> globalvuln_data("latest")
maintenance: publishers -> data-raw adapters -> validation -> reviewed PR
Use collate_indices() to build an analysis-ready dataset containing only the
indices you need. Supply their identifiers as a character vector and choose a
wide or long layout:
library(globalvuln)
selected <- collate_indices(c("inform_risk", "hdi", "mpi"))
selected[
selected$iso3 == "AFG",
c("country", "inform_risk_rank", "top_10_proportion")
]
selected_long <- collate_indices(
c("inform_risk", "hdi", "mpi"),
format = "long"
)
Both layouts retain all 195 United Nations member or observer states. The long layout keeps every selected country-index combination, including observations outside publisher coverage. Individual index datasets use the source identifiers as their object names:
data(inform_risk)
head(inform_risk[!is.na(inform_risk$score),
c("country", "score", "rank", "decile")])
data(package = "globalvuln")
The individual objects are inform_risk, inform_severity,
underfunded_crisis, oecd_fragility, worldrisk, nd_gain, hdi, mpi,
ghi, ghs, wps, un_mvi, debt_distress, searo,
disaster_displacement, internal_displacement, and clif_vi (2050 pessimistic).
There are two explicit data modes. They share the same canonical schema and ranking rules, but differ in where the data come from and when they can change.
collate_indices(), data(<index_id>), and
globalvuln_data(source = "package") load the .rda files installed with
the package. These calls are offline and reproducible: reinstalling or
upgrading the package is the only way that snapshot changes.globalvuln_data(source = "latest") reads the public,
versioned pins board. It downloads the approved historical table, uses its
manifest to select the newest approved edition of each requested index, and
then returns long or wide output. This mode can change without a package
upgrade and requires network access.The default for globalvuln_data() is source = "latest"; the other package
interfaces continue to use the installed snapshot. Choose the source in code
rather than relying on an implicit fallback:
# Reproducible and offline: the installed package snapshot
package_snapshot <- globalvuln_data(
source = "package",
indices = c("inform_severity", "debt_distress")
)
# Current: latest human-approved data from the versioned public board
latest_approved <- globalvuln_data(
source = "latest",
indices = c("inform_severity", "debt_distress")
)
# Cadence-aware provenance status for the installed snapshot
source_status(source = "package")
Both modes attach globalvuln_source, globalvuln_version, and
globalvuln_manifest attributes to their result. Online retrieval errors never
silently fall back to package data: if the board is unavailable, the call
fails and tells you to request the package snapshot explicitly. A specific
published version of the humanitarian_indices pin can be supplied with
version = to freeze an online analysis. version is not accepted for package
data because the installed files already are a fixed version.
source_status() evaluates the manifest against each publisher's configured
cadence. For example, it treats monthly and annual sources differently and
does not label an irregular or multi-year source stale merely because its
latest edition is old.
The repository-owned update pipeline checks 15 public sources each day. The IDMC Disaster Displacement Risk Model uses the same validation contract through a documented manual country-export path because no stable machine-readable country download is currently available.
| Dataset | Index and official documentation | What it measures |
|---|---|---|
inform_risk |
INFORM Risk | Risk of humanitarian crises and disasters, combining hazard and exposure, vulnerability, and lack of coping capacity. |
inform_severity |
INFORM Severity | Current humanitarian-crisis severity on a common scale, combining crisis impact, conditions of affected people, and crisis complexity. |
underfunded_crisis |
Underfunded Crisis Index | Persistent underfunding of recurring humanitarian appeals, expressed as the cumulative share of funding requirements met over the preceding five years. |
oecd_fragility |
OECD Multidimensional Fragility | Exposure to risk and insufficient resilience across economic, environmental, human, political, security, and societal dimensions. |
worldrisk |
WorldRiskIndex | Disaster risk from extreme natural events and climate impacts, combining population exposure with societal vulnerability, coping, and adaptive capacities. |
nd_gain |
ND-GAIN Country Index | A country's vulnerability to climate change and its readiness to convert public and private investment into adaptation action. |
hdi |
Human Development Index | Average achievement in health, education, and standard of living. |
mpi |
Global Multidimensional Poverty Index | The incidence and intensity of overlapping household deprivations in health, education, and living standards. |
ghi |
Global Hunger Index | Hunger using undernourishment, child stunting, child wasting, and child mortality. |
ghs |
Global Health Security Index | National capacity to prevent, detect, and respond to epidemics and pandemics, alongside health-system, international-norm, and risk-environment factors. |
wps |
Women, Peace and Security Index | Women's wellbeing and status across inclusion, justice, and security. |
un_mvi |
UN Multidimensional Vulnerability Index | Structural vulnerability and lack of structural resilience to external shocks, especially among developing countries. |
debt_distress |
IMF–World Bank Debt Sustainability Framework | Low-income countries' risk of debt distress, classified as low, moderate, high, or in debt distress using baseline projections, thresholds, and stress tests. |
searo |
Sexual Exploitation and Abuse Risk Overview | Contextual risk of sexual exploitation and abuse in humanitarian operations across enabling, situational, operational, and protective environments. |
disaster_displacement |
IDMC Global Displacement Risk Model | Modelled risk of future disaster displacement, including expected annual displacement under current-climate hazard scenarios. |
internal_displacement |
IDMC Internal Displacement Index | National policies and capacity, contextual drivers, and current impacts associated with internal displacement. |
| clif_vi | Climate Finance Vulnerability Index (CliF-VI), 2050 pessimistic | Projected climate risk and financial barriers to adaptation finance, combining climate risk with debt sustainability, financial integration, and financial sophistication. |
CliF-VI uses the 2025 prototype and the 2050 pessimistic projection, covering 188 countries on a 0–100 scale with higher values indicating greater vulnerability. Scores retain publisher precision; package ranks run from most to least vulnerable, reversing the publisher’s rank direction. Its ranks contribute to top-10 and top-20 summaries when selected. Climate risk includes INFORM Risk 2025 and INFORM Climate Change 2022 projections, so it overlaps with INFORM and does not measure current conditions alone. Supplementary governance scores are excluded. Redistribution permission is unconfirmed; cite Columbia University NCDP/CGEP and the June 2025 methodology.
Use humanitarian_index_sources for publisher URLs, editions, reference years,
retrieval dates, source-file checksums, coverage, and licensing notes.
The update process is conservative: detecting a publisher change creates a candidate, not an immediate production update.
Maintainers adding an entirely new index should follow
ADDING-DATASETS.md. The steps below describe routine
updates to sources that the package already supports.
update-data.yaml GitHub Actions workflow runs targets::tar_make()._targets.R reads the authoritative data-raw/sources.yml catalogue and
branches over the 16 automated sources. Discovery and downloads are always
rerun so releases and revisions at stable URLs are detected even when the
rest of the graph is cached.discover -> download -> parse -> standardise -> validate -> compare.
Downloads are temporary; content signatures are checked before parsing so,
for example, an HTML error page cannot be accepted as a workbook or PDF.data-raw/approved/humanitarian_indices.rds, appends provenance to the
approved manifest, refreshes the current data/*.rda views, and writes new
versions of both pins in data-published/. Historical editions remain in
the approved history and versioned board.R CMD check. Only after all checks pass does automation open a labelled
data-update pull request; it never writes directly to main. A maintainer
reviews and merges that pull request.data-published/ board under the
package website. Online source = "latest" calls can then see it. The
bundled snapshot reaches users when they install a package build containing
the refreshed data/*.rda files.If no source checksum/version changed, the workflow reports that outcome and opens no pull request. If another automated data-update pull request is already open, a newly detected candidate is deferred instead of creating an overlapping update.
The Disaster Displacement Risk Model is the one non-automated source because
IDMC currently provides no stable machine-readable country download. A
maintainer exports the documented country table into the manual template and
runs it through the same standardisation, validation, comparison, publication,
and pull-request gates. Detailed maintenance instructions are in
data-raw/README.md.
min(10, floor(10 * (rank - 1) / n_scored) + 1), so tied groups can make a
decile contain more than exactly 10% of scored countries.top_10_count counts ranks from 1 through 10 and top_20_count counts ranks
from 1 through 20. The corresponding proportions divide by
indices_ranked_count, the selected eligible indices on which that country
has an available rank.The package distributes harmonised country-level data and provenance metadata,
not the publishers' raw files. Source data remain the property of their
publishers and are subject to their applicable terms. Cite the relevant
publisher or index edition when using an individual series; details are in
humanitarian_index_sources.