Who and what is exposed in this hazard zone?
Analysis-ready products for actual events that this question maps to — open each in the catalog, or browse them on the NASA Disasters Portal.
Draw a rectangle, then check which collections cover it. Most NASA data is global, so a big box matches a lot.
-95.8, 29.5 → -95, 30.1 (Greater Houston, Texas)A hazard zone is an area a map says is in danger, like the patch of ground a flood is expected to cover. Exposure is the count of people and buildings that happen to sit inside that patch. So this question takes a "where could it flood" map, lays it on top of "where do people and buildings actually are," and counts what falls inside. A danger map becomes a list of who needs help first.
Who and what is exposed in this hazard zone?
A hazard zone is an area a map says is in danger, like the patch of ground a flood is expected to cover. Exposure is the count of people and buildings that happen to sit inside that patch. So this question takes a “where could it flood” map, lays it on top of “where do people and buildings actually are,” and counts what falls inside. A danger map becomes a list of who needs help first.
Which data to use, and how
Use this dataset: WorldPop, a global map where every ~100-metre square of land carries a number: roughly how many people live there. It’s the easiest piece to start with, because counting exposed people is just adding up the squares that land inside the flood zone.
You also need a flood zone to overlay. This page ships with Texas flood layers (the 10-, 100-, and 500-year flood maps). “100-year” doesn’t mean once a century. It means a flood with a 1-in-100 chance of happening in any given year. Later you can add EO-based building footprints, outlines of buildings traced from satellite images (“EO” = Earth observation, i.e. seen from space), to count structures too.
Then do four steps. The runnable code further down does all of this; this is just the idea.
- Pick your area. A small latitude/longitude box around the community you care about.
- Load the two maps. The flood zone and the WorldPop population grid for that box.
- Find the overlap. Keep only the population squares that sit inside the flood zone.
- Add them up. Sum the people in those squares. That total is your exposed population. Repeat with building footprints to get exposed structures.
That’s the whole method. Below, “How a scientist answers this” names the exact tools, and the Run it cell does it live on synthetic data so you can see each step work.
What you can find out
- How many people are exposed. Lay a flood zone (e.g. the 100-year flood layer) over WorldPop population and count everyone inside.
- What’s built there. Building footprints and exposure layers add the physical assets at risk: homes, schools, infrastructure.
- Which neighbourhoods to prioritise. Rank areas by exposed population multiplied by how likely the hazard is, to guide where to spend on mitigation and where to plan evacuations.
What it can’t tell you
- Who is most vulnerable, only who is exposed. This counts who’s inside the danger zone, not who would struggle most if it hit (the very old, the poor, people who can’t easily move). Two neighbourhoods with the same headcount can have very different risk. To capture that, pair this with social-vulnerability data (e.g. the SEDAC/CDC Social Vulnerability Index).
- What the buildings are actually worth. Building footprints tell you a structure exists, not its value. They’re a stand-in (a proxy), not a real-estate appraisal.
- What exposure will be in the future. These maps are a present-day snapshot. Towns grow and shrink, so next decade’s exposure will differ from today’s.
Gotchas to watch for
- Pick the right flood layer for the question. The 10-, 100-, and 500-year layers cover bigger and bigger areas (the rarer the flood, the wider it spreads). Counting people in the 500-year zone gives a much larger number than the 100-year zone. Neither is “wrong,” but quoting one without saying which one is misleading. State the layer every time.
- The two maps may not line up. The flood layer and the population grid can use different square sizes and slightly different coordinate systems (their projection, how the round Earth is flattened onto a flat map). If you just stack them blindly, squares won’t match and your count will be off. The fix: reproject and resample both onto the same grid before overlapping them (any decent geospatial library does this for you).
- Population grids are estimates, not a census. WorldPop spreads census totals across the landscape using clues like building density and roads. It’s good for “roughly how many,” but don’t treat a single square’s count as exact truth. Trust the totals over a zone, not one pixel.
- Edge squares are partly in, partly out. A population square straddling the flood-zone boundary is only partly exposed. For a careful count, weight each square by the fraction of its area inside the zone instead of counting it all-or-nothing.
The real-data code
The Run it cell above runs this method on synthetic data with no login. Below is the whole recipe against the real layers: fetch the WorldPop population grid, open the flood zone, align the two grids, overlap and area-weight the edges, sum the exposed people, print the count, and map it. WorldPop and the Texas flood layers used here are open; the optional NASA settlement layers via SEDAC need a free Earthdata Login.
import requests, numpy as np
import rioxarray # reads gridded map files (GeoTIFF) as labelled arrays
import geopandas as gpd # reads the flood-zone shapes
from rasterio.features import geometry_mask, rasterize
import matplotlib.pyplot as plt
# your area — a small (West, South, East, North) box. This one is Greater Houston, TX:
aoi = (-95.8, 29.5, -95.0, 30.1)
# 1. Population grid: WorldPop ~100 m, people-per-pixel, USA constrained UN-adjusted.
# Pull the national GeoTIFF via the open WorldPop REST API, then crop to the box.
meta = requests.get(
"https://www.worldpop.org/rest/data/pop/wpgp",
params={"iso3": "USA"}).json()["data"][0]
tif_url = next(f for f in meta["files"] if f.endswith(".tif"))
open("usa_ppp.tif", "wb").write(requests.get(tif_url).content)
pop = rioxarray.open_rasterio("usa_ppp.tif", masked=True).squeeze().rio.clip_box(*aoi)
pop = pop.where(pop > 0, 0.0) # WorldPop marks no-data as negative; treat as empty land
# 2. Hazard zone: the 100-year flood recurrence layer (VEDA / NASA Disasters),
# reprojected onto the WorldPop grid so the two maps line up exactly.
flood = gpd.read_file(
"https://openveda.cloud/api/stac/collections/"
"tx-flood-100-yr-recurrence/items" # GeoJSON footprint of the 100-yr zone
).to_crs(pop.rio.crs)
# 3. Overlap + area-weight the edges: rasterize the flood polygons at a fine
# sub-grid so a square half-inside the zone counts as half-exposed, not all/nothing.
T, H, W = pop.rio.transform(), pop.rio.height, pop.rio.width
sub = 4 # 4x4 samples per population pixel -> fractional coverage 0..1
fine = rasterize(
[(g, 1) for g in flood.geometry], out_shape=(H * sub, W * sub),
transform=T * T.scale(1 / sub, 1 / sub), fill=0, dtype="uint8")
frac = fine.reshape(H, sub, W, sub).mean(axis=(1, 3)) # fraction of each pixel in zone
# 4. Add them up -> area-weighted exposed population.
people = pop.values
exposed_grid = people * frac
exposed_people = float(np.nansum(exposed_grid))
total_people = float(np.nansum(people))
share = 100 * exposed_people / total_people
print(f"Exposed population (100-yr flood, Greater Houston): {exposed_people:,.0f} "
f"= {share:.1f}% of {total_people:,.0f} in the box")
# 5. Map the exposed people so the count is legible.
fig, ax = plt.subplots(figsize=(7, 6))
im = ax.imshow(exposed_grid, cmap="OrRd",
extent=(aoi[0], aoi[2], aoi[1], aoi[3]), origin="upper")
flood.boundary.plot(ax=ax, color="navy", linewidth=0.6, label="100-yr flood zone")
plt.colorbar(im, ax=ax, label="exposed people / ~100 m pixel")
ax.set_title("Population inside the 100-year flood zone"); ax.legend()
plt.tight_layout(); plt.show()
# Cross-check: re-run with the 10-yr and 500-yr layers — the count must grow with the
# rarer, wider zone (gotcha: always state which flood layer the number is for).
Where the data comes from
This answer mixes free data from several places, which is normal for exposure work. WorldPop (population) and geoBoundaries (administrative borders) are open and listed in this atlas’s companion data. The flood layers come from the NASA Disasters program. NASA settlement and population layers via SEDAC GPW sit behind one free Earthdata Login. The building footprints are derived from Earth-observation imagery. You don’t need them all to start. WorldPop plus one flood layer gets you a real exposed-population number.
Sources
- This is the Prepare / Build-Resilience workhorse — see the free companion data (WorldPop, geoBoundaries) the atlas already lists.
- Supports the NASA Disasters program.
Make it yours → Swap in your AOI and chosen return-period hazard layer, and set the ranking weights in the notebook.
A safe place to practise the method on GPM_3IMERGM. The code is the real earthaccess workflow, but we feed it stand-in data shaped like the real product — so you can run it, change the numbers, and break it without an account. When you want the real data, use the recipe under “The real-data code” above, or download the notebook below.