← pakdata
Pakistan 2022 floods: satellite-detected flood extent and population exposure for 160 districts, August-September 2022 (UNOSAT)
160 rowstarget: flood_extent_sep08_14_km2
CC BY-SA 4.0snapshot 2026.11
Source: United Nations Satellite Centre (UNOSAT/UNITAR), FL20220808PAK, Preliminary Satellite Derived Flood Evolution Assessment, 16 September 2022, via HDX
Get it: pakdata (Python) · Hugging Face · Kaggle · CSV
Load it
pip install pakdata
from pakdata import load_pak_floods_2022
X, y = load_pak_floods_2022(return_X_y=True)
More ways (pandas, Polars, DuckDB, PyTorch, R, Excel, JavaScript): usage guide.
Data card
.. _pak_floods_2022_dataset:
Pakistan 2022 floods: satellite-detected flood extent and population exposure by district
-------------------------------------------------------------------------------------------
During the 2022 monsoon, floods covered large parts of Pakistan, Sindh and eastern
Balochistan worst of all. The UN Satellite Centre (UNOSAT) mapped the flood water from
satellite imagery every week. It then overlaid the water on district boundaries and on a
gridded population map to estimate how many people lived in or close to the water.
This dataset is UNOSAT's district table from the 16 September 2022 update: one row per
district and four observation windows.
**Data Set Characteristics:**
:Number of Instances: 160 districts (all districts in UNOSAT's table, including 12 with no detected flood water)
:Number of Attributes: 21 features (1 categorical, 20 numeric) + target; the frame has 27 columns
:Default target: ``flood_extent_sep08_14_km2`` (km2 of satellite-detected flood water in the district, 08-14 Sep 2022)
:Time coverage: four windows in 2022: 01-31 Aug (cumulative maximum), 25-31 Aug, 01-07 Sep and 08-14 Sep
:Geographic coverage: Pakistan: Azad Jammu and Kashmir (10 districts), Balochistan (35), Gilgit-Baltistan (14), Islamabad Capital Territory (1), Khyber Pakhtunkhwa (35), Punjab (36), Sindh (29)
:Source: United Nations Satellite Centre (UNOSAT/UNITAR), activation FL20220808PAK (GDACS 1101522), "Preliminary Satellite Derived Flood Evolution Assessment, 16 September 2022", file ``UNOSAT_Population_Exposure_FL20220808PAK_20220901_20220907_20220908_20220914_WeeklyUpdate_20220916.xlsx``, sheet "Statistics by district level". Published on the Humanitarian Data Exchange: https://data.humdata.org/dataset/preliminary-satellite-derived-flood-evolution-assessment-16-september-2022
:License: Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA 4.0), https://creativecommons.org/licenses/by-sa/4.0/ (licence as stated on the HDX dataset page). Share-alike: if you redistribute this table or a modified version of it, you must use the same licence.
:Snapshot: 2026.11 (retrieved 2026-11-29)
**Columns:**
Identifiers and static attributes:
- ``province`` (category): province or territory, taken from the subtotal row above each district in the source sheet
- ``district`` (str): district name as spelled by UNOSAT (an identifier, so not a feature)
- ``census_district`` (str): the matching ``district`` in ``pak_census_districts``, so the two
datasets join in one line (an identifier, so not a feature). See "Joining with the census" below.
- ``area_km2`` (km2): district area from the Pakistan Census Office (PCO) boundaries used by UNOSAT
- ``population_worldpop_2020`` (people): WorldPop 2020 modelled population of the district, rounded to whole people
For each window ``<p>`` in ``aug01_31``, ``aug25_31``, ``sep01_07`` and ``sep08_14``:
- ``analysed_area_<p>_km2`` (km2): part of the district the satellites could analyse, meaning the cloud-free part for the weekly windows. For ``aug01_31`` it always equals ``area_km2``.
- ``pop_in_analysed_area_<p>`` (people): WorldPop 2020 population living in the analysed area. For ``aug01_31`` it always equals ``population_worldpop_2020``.
- ``flood_extent_<p>_km2`` (km2): maximum flood water extent detected in the window
- ``pop_exposed_<p>`` (people): population "potentially exposed or living close to flooded areas"
- ``pop_exposed_share_<p>`` (fraction 0-1): UNOSAT's share of the analysed-area population that was exposed. The source header says "%" but the values are fractions.
Week-to-week changes, as given by UNOSAT:
- ``flood_extent_change_aug25_31_to_sep01_07_km2`` (km2): ``flood_extent_sep01_07_km2 - flood_extent_aug25_31_km2``
- ``flood_extent_change_sep01_07_to_sep08_14_km2`` (km2): ``flood_extent_sep08_14_km2 - flood_extent_sep01_07_km2``. This column is the target minus a feature, so it is excluded from the features.
**Default task and leakage guard:** regression of ``flood_extent_sep08_14_km2``, the flood
water still present in mid-September, from district size and population, province,
and the flood observations of the three earlier windows. Five columns are kept in
``frame`` but left out of ``X``:
- ``district`` and ``census_district`` are identifiers.
- ``pop_exposed_sep08_14`` and ``pop_exposed_share_sep08_14`` are computed from the target week's flood map.
- ``flood_extent_change_sep01_07_to_sep08_14_km2`` equals the target minus a feature.
``analysed_area_sep08_14_km2`` and ``pop_in_analysed_area_sep08_14`` stay in as features.
They describe how much of the district the satellites could see that week (cloud
cover), not the water itself. As a sanity check, 5-fold cross-validated R^2 is about
0.84 for LinearRegression and about 0.92 for RandomForestRegressor on one-hot-encoded
features. Floods persist from week to week, so the task is learnable, but not
trivially so. The naive persistence forecast (predict last week's
``flood_extent_sep01_07_km2``) already reaches R^2 = 0.92. Use it as the baseline any
model has to beat. If you pick another target with ``target=...``, remove the columns
derived from it yourself. For example, with ``target="pop_exposed_aug01_31"``, drop
``pop_exposed_share_aug01_31``.
**How it was built:** ``scripts/build_pak_floods_2022.py`` takes these steps:
1. Read the dataset record from the HDX CKAN API and check that its licence is still ``cc-by-sa``.
2. Download its single XLSX resource from unosat.org.
3. Read the district sheet and check every column header.
4. Drop the national row, the seven province subtotal rows and the footnotes. Islamabad
appears twice, as the territory and as its single district; the first row is
treated as the territory.
5. Attach each district to its province.
6. Rename the columns, round the values (people to integers, km2 to 4 decimals, shares
to 8 decimals), and sort the rows by province and then district.
No values are imputed, recomputed or added. The district sums reproduce UNOSAT's
national row:
- population: 231.09 million
- August flood extent: 83,557 km2
- people exposed in August: 31.25 million
**Caveats and known biases:**
- **Preliminary, not validated in the field.** UNOSAT warns that this is a preliminary
analysis. Radar and optical flood detection underestimates water in urban and
densely vegetated areas, and cloud cover hides water. Compare ``analysed_area_*``
with ``area_km2``, especially in the northern mountain districts.
- **Exposure is not damage.** ``pop_exposed_*`` counts modelled residents in or near
flooded pixels. It does not count deaths, injuries, damaged houses, livestock or
roads. NDMA's district damage figures are published only as PDF situation reports
with no open licence, so they are not included here.
- **Population is modelled.** The population figures are WorldPop 2020 gridded
estimates, not the 2017 or 2023 census.
- **Old district boundaries.** The boundaries are PCO boundaries in use in 2022. Karachi
has six districts (Keamari is missing), and some newer districts may be merged into
their parent districts.
- **Source anomalies, kept as published:**
- Musakhel (Balochistan) has ``pop_exposed_aug01_31`` = 329,598, which is more than its
population of 175,701, so ``pop_exposed_share_aug01_31`` = 1.88.
- A few very small shares (Tangir, Kharmang, Kohlu, Musakhel) differ slightly from
``pop_exposed / pop_in_analysed_area``.
- **Zeros are real values, not missing ones.** 12 districts show no flood water in
August and 18 show none in 08-14 Sep. The only missing values are the 25 empty
``census_district`` cells (Azad Jammu and Kashmir, Gilgit-Baltistan and Lehri).
- **Small and skewed.** With 160 rows and a heavily right-skewed target, a few large
Sindh districts dominate squared-error metrics. Consider a log1p transform and
cross-validation grouped by province.
**Joining with the census (pak_census_districts):** 16 districts have a different
name in UNOSAT's table and in the Pakistan Bureau of Statistics census: 15 spellings (for example "D. I. Khan" and "Dera Ismail Khan",
"Central Karachi" and "Karachi Central", "Leiah" and "Layyah") plus Shaheed Sikandarabad, the
former name of Surab. ``census_district`` gives
the census spelling for every row::
census = load_pak_census_districts(as_frame=True).frame
floods = load_pak_floods_2022(as_frame=True).frame
both = census.merge(floods, left_on="district", right_on="census_district",
suffixes=("", "_unosat")) # 135 of 136 census districts
- 135 of the 136 census districts match, and the province agrees on every match.
- No match: Keamari (census) was split from Karachi West in August 2020, after the
boundaries UNOSAT used. UNOSAT's Karachi districts do not line up with the census ones
(Keamari's area seems to fall mostly in UNOSAT's South Karachi), so treat the Karachi
pairs as approximate. Lehri (UNOSAT) is not a district in the 2023 census; it was
merged back, mainly into Sibi.
- Azad Jammu and Kashmir and Gilgit-Baltistan have no ``census_district``: the published
2023 census results do not cover them.
- A matching name does not guarantee identical boundaries. Compare ``area_km2`` with the
census before treating a pair as the same area; a few pairs differ a lot (for example
Karachi South, Karachi West, Kalat, Surab and Sibi).
**Suggested tasks:**
1. Beginner regression: predict ``flood_extent_sep08_14_km2`` with LinearRegression and
RandomForestRegressor. Compare them with a naive persistence baseline
(``flood_extent_sep01_07_km2``), and compare MAE on the raw target with MAE on a
``log1p`` target.
2. Classification: label districts with ``pop_exposed_share_aug01_31 > 0.25`` as severely
exposed and train a classifier on area, population, province and the late-August
flood extent. Drop every ``pop_exposed_*`` column from the features.
3. Generalisation across regions: train on every province except Sindh, test on Sindh
with ``GroupKFold`` by province, and discuss why the model fails or works.
4. Clustering: cluster districts on their four weekly flood shares
(``flood_extent_<p>_km2 / area_km2``) to find flood-recession patterns. Sudden
hill-torrent floods recede quickly, while ponded water on the Indus plain lingers.
**Citation / attribution:**
United Nations Satellite Centre (UNOSAT/UNITAR). Preliminary Satellite Derived Flood
Evolution Assessment, Islamic Republic of Pakistan, 16 September 2022 (UNOSAT code
FL20220808PAK, GDACS ID 1101522), population exposure statistics by district.
Population data: WorldPop 2020. Boundary data: Pakistan Census Office (PCO). Published
on the Humanitarian Data Exchange:
https://data.humdata.org/dataset/preliminary-satellite-derived-flood-evolution-assessment-16-september-2022.
Licence: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Changes made
by pakdata: subset to the district sheet, columns renamed, values rounded (snapshot
2026.11).
UNOSAT also notes: "The designations employed and the presentation of material on this
table do not imply the expression of any opinion whatsoever on the part of the
Secretariat of the United Nations concerning the legal status of any country,
territory, city or area or of its authorities, or concerning the delimitation of its
frontiers or boundaries. The final status of Jammu and Kashmir has not been agreed upon
by the parties."
Cite
United Nations Satellite Centre (UNOSAT/UNITAR). Preliminary Satellite Derived Flood Evolution Assessment, Islamic Republic of Pakistan, 16 September 2022 (UNOSAT code FL20220808PAK, GDACS ID 1101522), population exposure statistics by district. Population data: WorldPop 2020; boundary data: Pakistan Census Office (PCO). Published on the Humanitarian Data Exchange: https://data.humdata.org/dataset/preliminary-satellite-derived-flood-evolution-assessment-16-september-2022. Licence: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). Changes: subset to the district sheet, columns renamed, values rounded (pakdata snapshot 2026.11).
Packaged by pakdata, DOI 10.5281/zenodo.24662545.