Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Country-year internal displacement figures for building humanitarian comparison tools alongside refugee statistics.
From source to product signal
IDMC's Global Internal Displacement Database publishes country-year stocks and new displacements from conflict and disasters. Start with the Excel download. Figures are expert-validated estimates, not household surveys, and they are not UNHCR refugee counts.
Install the packages, then run the notebook cell.
python -m pip install pandas requests openpyxl
import pandas as pd
import requests
from io import BytesIO
response = requests.get(
"https://www.internal-displacement.org/sites/default/files/2024-05/IDMC_Internal_Displacement_Conflict-Violence_Disasters.xlsx",
timeout=60,
)
response.raise_for_status()
displacement = pd.read_excel(BytesIO(response.content), sheet_name=0)
print(displacement.head())Test a useful signal
Test whether GIDD country-year rows can power a bounded humanitarian sketch.
Internal Displacement Monitoring Centre is a nonprofit source. Last verified 2026-08-18. Temporal coverage: 2008-present GIDD stocks and flows.