Share
The HDX Humanitarian API (HAPI) is a way to access standardized indicators from multiple sources to automate workflows for crisis data. HDX HAPI data is created by aligning p-codes to the latest common operational dataset admin boundary standards, adding p-codes where they are missing, harmonizing column names across indicators and locations, and standardizing dimensions such as sectors and organization names.
Since the beta launch of HDX HAPI in June, we have been working to expand coverage of indicators and countries based on user feedback. We are also maintaining the existing data in HAPI, ensuring the latest updates are always reflected. So far, the most popular data types have been food prices, conflict events and food security. Below we provide an overview of the latest improvements to HDX HAPI.
- More data and more countries
We have added data on internally displaced persons, sourced from IOM’s Displacement Tracking Matrix, which includes indicators on population, reporting round, operations, and assessment type. Additionally, we have added data on returnees from UNHCR, with indicators for population, gender, and age range.
Geographic coverage now includes all countries where data is available, expanding the scope of HDX HAPI from the initial 25 countries with Humanitarian Response Plans (HRPs). The level of disaggregation varies by data type and country. In particular, much of the global data is only available at the national (admin 0) level. However, for about half of the data in HDX HAPI, the granularity can reach the county/district level (admin 2).
We have also broadened our food security coverage. Previously, this data only included countries in West Africa covered by Cadre Harmonisé. We are now including p-coded data from the Integrated Food Security Phase Classification for the rest of the world.
The latest data coverage can be found in this chart (image below) and can be queried directly from this API endpoint.
- New API filters
Our new “has_hrp” filter allows users to quickly retrieve data for countries with a Humanitarian Response Plan, streamlining data retrieval for these locations. Similarly, the “in_gho” parameter targets countries listed in the Global Humanitarian Overview. Both filters are available in all HDX HAPI endpoints as well as the location endpoint.
- Inclusion of hard-to-match administrative division names
To ensure comprehensive data inclusion, we have added fields to capture original administrative division names from data providers, even when these names don’t match canonical administrative divisions. Fields named “provider_admin1_name” and “provider_admin2_name” appear in endpoints where subnational data is available, enabling us to retain all source data even if p-coding is not possible.
- HAPI datasets on HDX
We understand that not everyone is familiar with using APIs. For this user group, we have made HDX HAPI data available on HDX as downloadable CSVs. The files are available by indicator, by country, or both, and can be found on the HDX organization page.
For example, we have created a CSV file for humanitarian needs data for all countries where it is available. You can also find a CSV file for 3W – operational presence data in which the sectors and organization names have all been standardized.
Feedback
Our goal is to make HDX HAPI a reliable and user-friendly resource for accessing humanitarian data. Based on the research we have undertaken with early users of HAPI, there are three use cases for apis in the humanitarian sector:
- Point-in-time analyses: Data scientists using APIs for ad hoc or periodic reports or one-off analyses.
- Live data products and services: Using APIs to create dashboards and other live tools, either using programming languages or tools such as PowerBi or Tableau.
- Integrating data into internal systems: Teams pulling data from HDX via API into internal systems for broader use.
The next step for HAPI is to ensure our APIs meet the needs of these use cases. If you have used HAPI and would be keen to give us feedback please get in touch with our user research on ed.parkes@un.org.
Let us know what you think of our expanded coverage and new features by emailing us at hdx@un.org.