When a hurricane comes ashore, a wildfire jumps a ridgeline, or a river overtops its levees, the United States answers in a sequence that always runs the same way: the President signs a declaration, money flows to rebuild what broke, smaller sums are set aside to keep it from breaking again, and flood-insurance checks go out to the homeowners whose houses filled with water. Each of those four moves is recorded in its own FEMA dataset, and because they share a disaster number and a geography, an analyst can take a single catastrophe and follow it—from the declaration, through every rebuild grant and every mitigation project, to the flood claims paid in the same counties—until the entire arc of how the country responds to a disaster lives in one connected view.
This article is a guide to reconstructing that arc. It covers the four datasets and the phases of emergency management each one maps onto; the Robert T. Stafford Act and the major-disaster declaration that opens the whole sequence; the Public Assistance program that funds the rebuild and the Hazard Mitigation programs that fund prevention; the National Flood Insurance Program claims that pay individual homeowners; the two join keys—the disaster number and the state-and-county FIPS code—and the awkward fact that NFIP claims carry geography but not a disaster number; the policy questions the assembled data finally answers, from the true all-in cost of one disaster to whether mitigation spending pays off; a Python workflow that pulls a single disaster from OpenFEMA and sums it across all four programs; and the caveats—obligation versus outlay, reporting lag, and the geographic join's imprecision—that every cross-dataset analysis must respect.
Four datasets, four phases of the cycle
Emergency management is conventionally taught as a cycle with four phases— preparedness, response, recovery, and mitigation—and the remarkable thing about FEMA's public data is that the back half of that cycle is captured, dataset by dataset, almost exactly as the textbook draws it. A presidential major-disaster declaration under the Stafford Act is the event that opens federal aid, and it is recorded in the disaster-declarations dataset. Response and recovery—reimbursing state and local governments to clear debris, restore emergency services, and rebuild roads, schools, water systems, and other public infrastructure—is the Public Assistance dataset. Mitigation—the buyouts of flood-prone homes, the elevations, the safe rooms, the flood walls and drainage projects meant to shrink the next loss—is the Hazard Mitigation Assistancedataset. And the insurance layer—the checks that go to individual property owners for flood damage—is the National Flood Insurance Program claims dataset. Response, recovery, mitigation, insurance: four programs, four datasets, one event.
In our database these are stored as four tables—fema_disasters, fema_public_assistance,fema_hazard_mitigation, and nfip_claims—and the entire premise of this article is that they are far more powerful read together than apart. The declarations table tells you what happened and where; the Public Assistance table tells you what it cost to put the place back together; the Hazard Mitigation table tells you what was spent so it would not happen the same way again; and the NFIP claims table tells you what the homeowners themselves recovered. The connective tissue is two keys: the disaster number, which the FEMA grant datasets all carry, and the geography—the state and county FIPS codes—which every one of the four datasets carries. Aligning the disaster numbers and the FIPS codes across the four is the whole of the work; once they are aligned, the disaster cycle assembles itself.
-- fema_disasters (DisasterDeclarationsSummaries) -- one row per disaster x county
disaster_number -- the DR/EM number; the primary join key
declaration_type -- DR (major disaster), EM (emergency), FM (fire)
incident_type -- Hurricane, Flood, Fire, Severe Storm, ...
state -- two-letter state code
fips_state_code -- 2-digit state FIPS
fips_county_code -- 3-digit county FIPS (state+county = 5-digit key)
incident_begin_date -- start of the incident period
incident_end_date -- end of the incident period
-- fema_public_assistance (PA Funded Projects Summaries) -- disaster x applicant
disaster_number -- joins to fema_disasters
applicant_name -- the state/tribe/local grantee being reimbursed
incident_type -- travels with the row
federal_obligated_amount -- federal share obligated (the rebuild dollars)
-- fema_hazard_mitigation (HazardMitigationAssistanceProjects) -- one row/project
disaster_number -- present for HMGP (disaster-linked) projects
program_area -- HMGP, FMA, BRIC/PDM, ...
project_type -- buyout/acquisition, elevation, safe room, ...
state / county -- full state name + county (carries FIPS too)
federal_share_obligated -- the prevent-the-next-loss dollars
-- nfip_claims (FimaNfipClaims) -- one row per paid flood-insurance claim
state -- two-letter state code
county_code -- 5-digit county FIPS (the geographic join key)
year_of_loss -- year the flood loss occurred (the date join)
amount_paid_on_building_claim
amount_paid_on_contents_claim -- what the homeowner recoveredThe crucial asymmetry to notice in those columns is that three of the four datasets carry a disaster_number and one does not. The disaster declarations, the Public Assistance summaries, and the Hazard Mitigation projects all reference the DR number directly, so they join cleanly to one another. The NFIP claims do not—a flood claim is filed against an insurance policy by a property owner, and the program records it by where and when the loss occurred, not by which presidential declaration was in effect. That is why the NFIP table joins to the rest by geography and date: the county FIPS code and the year of loss, matched against the declared counties and the incident period of the disaster. Understanding which join applies to which table is the single most important piece of fluency this article aims to build.
The declaration: the Stafford Act opens the door
Everything in the federal disaster response begins with a declaration, and the legal machinery behind it is the Robert T. Stafford Disaster Relief and Emergency Assistance Act of 1988, which amended and renamed the Disaster Relief Act of 1974. The Stafford Act sets the now-familiar sequence: when a disaster overwhelms the capacity of state, tribal, and local governments to respond, the governor (or tribal chief executive) requests a declaration, FEMA conducts a joint preliminary damage assessment, and the President decides whether to issue a major disaster declaration. That presidential signature is the legal trigger that unlocks the federal aid programs and authorizes spending from the Disaster Relief Fund, the standing appropriation FEMA draws on for disaster response.
The declarations dataset records each declaration and, importantly, the counties it covers—a major disaster is declared for a specific set of counties, and the data carries one row per disaster and county, each with its FIPS code. The dataset distinguishes the declaration types: DR for a major disaster (the broadest authority, opening Public Assistance, Individual Assistance, and Hazard Mitigation), EM for an emergency declaration (a narrower, faster authority for emergency protective measures), and FM for a fire management assistance declaration. It also records the incident type—hurricane, flood, severe storm, wildfire, earthquake, and so on—and the incident period, the begin and end dates of the event itself. Those two facts, the declared counties and the incident period, are exactly what the NFIP geographic join needs, which is why the declaration is not just the start of the story but the spine that the rest of the data is hung on.
Public Assistance: paying to rebuild
Once a major disaster is declared, the largest stream of federal money in most disasters is Public Assistance (PA), the program that reimburses state, tribal, and local governments—and certain private nonprofits like hospitals and utilities—for the costs of responding to and recovering from the event. PA is built around a cost-share: the federal government covers at least seventy-five percent of eligible costs, with the non-federal share carried by the applicant and its state, and the federal share can be raised for catastrophic events. The work it funds is organized into categories: the emergency-work categories cover debris removal (Category A) and emergency protective measures (Category B), the immediate response that keeps people safe, while the permanent-workcategories (C through G) cover the durable rebuild—roads and bridges, water-control facilities, public buildings, public utilities, and parks and recreational facilities.
The Public Assistance dataset used here is the funded-project summaries, with one row per disaster and applicant, keyed by the disaster number and carrying the incident type and the federal share obligated—the dollars FEMA has committed to that applicant for that disaster. Because the disaster number is on every row, summing the federal obligated amount over all rows for a given DR number yields the total Public Assistance funding for that disaster in a single aggregation, which is the first and largest piece of the all-in cost. One caution carries from the underlying program into the data and recurs in the caveats below: these are obligations, the amounts committed, not outlays, the cash actually paid out, and for a large recent disaster the obligated figure climbs for years as projects are scoped, revised, and closed out. The number is authoritative for the federal commitment; it is not a final settled ledger until the disaster is fully closed.
Hazard Mitigation: paying to prevent the next one
Mitigation is the phase of the cycle that tries to break it. Where Public Assistance puts the place back the way it was, Hazard Mitigation Assistance funds the projects designed to reduce the loss the next time the same hazard strikes: acquisitions and buyouts that remove flood-prone homes from harm's way and return the land to open space, elevations that lift houses above the flood, safe rooms for tornado and hurricane protection, and structural projects like flood walls, drainage improvements, and wildfire fuel reduction. The premise is straightforward and, in study after study, borne out: a dollar spent before the disaster avoids several dollars of loss after it.
The Hazard Mitigation Assistance dataset bundles several distinct funding streams, and the distinction matters for how they join to a disaster. The Hazard Mitigation Grant Program (HMGP) is post-disaster: it is activated by a major disaster declaration and funded as a percentage of the disaster's total assistance, so HMGP projects carry a disaster number and join directly to the declaration that authorized them. The other streams are mostly non-disaster, competitive programs: Flood Mitigation Assistance (FMA), funded from the flood-insurance side to reduce repetitive NFIP losses, and the resilience program that succeeded the older Pre-Disaster Mitigation grants— Building Resilient Infrastructure and Communities (BRIC)—which fund mitigation on a rolling, application basis rather than in the wake of a specific declaration, and therefore may not carry a disaster number at all. For tracing a single catastrophe, the HMGP rows are the ones that join on the DR number; the FMA and resilience projects in the affected geography are best brought in through the county FIPS, the same way the NFIP claims are.
NFIP claims: paying the homeowners
The fourth layer is the one closest to the individual household. The National Flood Insurance Program (NFIP), created by the National Flood Insurance Act of 1968 and administered by FEMA, is the federal program that sells flood insurance—coverage private insurers had largely abandoned—to property owners in participating communities, in exchange for those communities adopting and enforcing floodplain-management standards. When a flood damages an insured property, the owner files a claim, and the program pays out against the building and contents coverage. The NFIP claims dataset records those paid claims—redacted to protect individual privacy but retaining the geography, the year of loss, the flood zone, the occupancy type, and the amounts paid on the building and contents portions of the claim.
The NFIP layer is what makes the disaster cycle whole, because it captures money that the FEMA grant programs do not. Public Assistance pays governments; Hazard Mitigation pays for projects; but the NFIP pays individual property ownersdirectly, and for a major flood event the claims paid to homeowners can rival or exceed the Public Assistance obligated to rebuild the public infrastructure. Setting the two side by side—recovery spending on the public side against flood claims paid on the private side—is one of the more revealing comparisons the assembled data permits. The catch, already flagged, is the join: NFIP claims carry no disaster number, so they are matched to a disaster by selecting the claims whose county FIPS codefalls within the declared counties and whose year of lossfalls within the incident period. The match is approximate—a county can flood in a year for reasons unrelated to the declared event—but for a large, well-bounded disaster it captures the great majority of the relevant claims.
The join keys: disaster number and geography
The whole architecture of cross-dataset disaster analysis reduces to two join keys, and being fluent in which applies where is what separates a clean reconstruction from a double-counted mess. The first key is the disaster number—the DR (or EM or FM) number that FEMA assigns to each declaration. It is the natural primary key of the cycle: the declarations dataset is organized by it, and both the Public Assistance summaries and the disaster-linked Hazard Mitigation (HMGP) projects carry it, so the three FEMA grant datasets join to one another on the disaster number alone. Sum the PA federal obligated amount for a DR number, sum the HMGP federal share for the same DR number, and you have the two largest federal streams for that disaster, no geography required.
The second key is geography—the state and county FIPS codes carried by all four datasets. FIPS, the Federal Information Processing Standards geographic codes, give every state a two-digit code and every county a three-digit code, which concatenate into a five-digit county identifier that is stable and unambiguous in a way that county names (with their duplicate “Washington County”s across states and their punctuation variants) are not. Geography is the join of last resort and of necessity: it is how the NFIP claims, which lack a disaster number, attach to a disaster, and it is how the non-disaster mitigation programs (FMA, BRIC) and any other county-resolved federal dataset can be related to the same event. The disciplined pattern is to use the disaster number wherever it exists and fall back to the county FIPS (plus a date window) only where it does not—and to always pad the FIPS components to their fixed widths before concatenating, because a county code of 5 and a county code of 005 are the same county and a naive string join will miss it.
What the assembled data answers
Joined together, the four datasets answer the questions that actually drive disaster policy—questions that no single dataset can answer alone because each holds only one slice of the spending. The first and most basic is the true all-in federal cost of a disaster. The headline figure for a hurricane is usually just one program's number; the honest total is the Public Assistance obligated to rebuild the public infrastructure, plus the Hazard Mitigation funded in its wake, plus the NFIP claims paid to flooded homeowners in the declared counties—and assembling that sum is the single most valuable thing the joined data does.
The second is the return on mitigation: whether the counties that received mitigation funding after one disaster suffered smaller losses in the next. With buyouts and elevations geocoded by county and NFIP claims geocoded the same way, an analyst can ask whether the counties that elevated and bought out flood-prone homes saw their flood claims fall in subsequent events—the empirical test of the mitigation premise. A third is the balance between recovery and insurance: comparing the Public Assistance spent rebuilding the public realm against the NFIP claims paid to private owners reveals how the burden of a disaster splits between the public purse and the federal insurance pool, and how that split differs between a coastal flood event and an inland wind event. And the fourth is the trajectory of the federal disaster bill itself: laid out across decades, the declarations, the obligations, and the claims together trace how the cost of disasters has climbed as billion-dollar events became more frequent—the macro-trend that frames every individual reconstruction.
Python workflow: tracing one disaster across all four programs
The script below takes a single disaster number and follows it through the whole cycle. It pulls the declaration to learn the incident type, the affected counties, and the incident period; sums the Public Assistance federal obligated amount and the Hazard Mitigation federal share for that disaster number; then pulls the NFIP claims for the affected state over the incident years, filters them to the declared counties by FIPS, and sums the building and contents payouts—finishing with the combined federal exposure across all three spending programs. Everything runs against OpenFEMA's public REST API with no key. Because OpenFEMA field names can vary between dataset versions, the script probes for the working column names rather than hard-coding them, and any production run should be validated against the current OpenFEMA data dictionaries and should page through the full result set for large disasters.
import requests, pandas as pd
# OpenFEMA REST API -- no API key required for any of the public datasets.
# The full disaster cycle lives across four datasets; we follow ONE disaster
# from its declaration through every federal dollar it drew.
# 1. DisasterDeclarationsSummaries -- the declaration + affected counties
# 2. PublicAssistanceFundedProjectsSummaries -- the rebuild grants
# 3. HazardMitigationAssistanceProjects -- the prevent-the-next-loss grants
# 4. FimaNfipClaims -- the flood-insurance claims, joined by geography + date
# The PA and HMA datasets carry disasterNumber; NFIP claims do NOT, so they
# join on the affected counties (FIPS) and the incident period instead.
BASE = "https://www.fema.gov/api/open"
DECLS = f"{BASE}/v2/DisasterDeclarationsSummaries"
PA = f"{BASE}/v1/PublicAssistanceFundedProjectsSummaries"
HMA = f"{BASE}/v4/HazardMitigationAssistanceProjects"
NFIP = f"{BASE}/v2/FimaNfipClaims"
def fetch_all(url, params=None, page=10000):
# OpenFEMA pages with $skip / $top; loop until a short page comes back.
params = dict(params or {})
params["$top"] = page
out, skip = [], 0
while True:
params["$skip"] = skip
r = requests.get(url, params=params, timeout=120)
r.raise_for_status()
body = r.json()
key = next(k for k, v in body.items() if isinstance(v, list))
rows = body[key]
if not rows:
break
out.extend(rows)
if len(rows) < page:
break
skip += page
return out
def _col(df, *names):
for n in names:
if n in df.columns:
return n
return None
def trace_disaster(disaster_number):
# --- The declaration: which counties, what incident, when ------------
decl = pd.DataFrame(fetch_all(
DECLS, {"$filter": f"disasterNumber eq {disaster_number}"}))
if decl.empty:
print(f"No declaration found for DR-{disaster_number}.")
return
title = decl["declarationTitle"].iloc[0]
incident = decl["incidentType"].iloc[0]
state = decl["state"].iloc[0] # two-letter code in this dataset
start = pd.to_datetime(decl["incidentBeginDate"]).min()
end = pd.to_datetime(decl["incidentEndDate"]).max()
# affected counties carry a 5-digit FIPS (state 2 + county 3)
fips = set(decl.get("fipsStateCode", pd.Series(dtype=str)).astype(str).str.zfill(2)
+ decl.get("fipsCountyCode", pd.Series(dtype=str)).astype(str).str.zfill(3))
print(f"DR-{disaster_number}: {title} ({incident}, {state})")
print(f" {len(fips)} declared counties; incident {start.date()} to {end.date()}")
# --- Public Assistance: the rebuild ----------------------------------
pa = pd.DataFrame(fetch_all(
PA, {"$filter": f"disasterNumber eq {disaster_number}"}))
pa_fed = _col(pa, "federalObligatedAmount", "federalShareObligated")
pa_total = pd.to_numeric(pa[pa_fed], errors="coerce").sum() if pa_fed else 0
print(f" Public Assistance: ${pa_total:,.0f} obligated, {len(pa):,} projects")
# --- Hazard Mitigation: prevent the next loss ------------------------
hma = pd.DataFrame(fetch_all(
HMA, {"$filter": f"disasterNumber eq {disaster_number}"}))
hma_fed = _col(hma, "federalShareObligated", "projectAmount")
hma_total = pd.to_numeric(hma[hma_fed], errors="coerce").sum() if hma_fed else 0
print(f" Hazard Mitigation: ${hma_total:,.0f} obligated, {len(hma):,} projects")
# --- NFIP claims: the homeowner payouts (join by county + date) ------
yr0, yr1 = start.year, end.year
claims = pd.DataFrame(fetch_all(NFIP, {
"$filter": f"state eq '{state}' and yearOfLoss ge {yr0} and yearOfLoss le {yr1}"}))
cc = _col(claims, "countyCode")
if cc and fips:
claims = claims[claims[cc].astype(str).str.zfill(5).isin(fips)]
pay_cols = [c for c in ["amountPaidOnBuildingClaim",
"amountPaidOnContentsClaim"] if c in claims.columns]
nfip_total = sum(pd.to_numeric(claims[c], errors="coerce").sum() for c in pay_cols)
print(f" NFIP claims in declared counties: ${nfip_total:,.0f}, "
f"{len(claims):,} claims")
# --- The whole disaster, one number ----------------------------------
grand = pa_total + hma_total + nfip_total
print(f" TOTAL federal exposure (PA + HMA + NFIP): ${grand:,.0f}")
return {"pa": pa_total, "hma": hma_total, "nfip": nfip_total, "total": grand}
trace_disaster(4332) # example: a single major-disaster declaration
Two refinements turn this from a demonstration into a defensible analysis. First, the NFIP join here is deliberately coarse—county FIPS within the declared set, year of loss within the incident years—which will sweep in some claims unrelated to the declared event and may miss claims that span the calendar boundary of the incident period. A rigorous version tightens the date window to the actual incident dates rather than whole calendar years and, where the event is a flood, restricts to the matching cause of damage. Second, for anything beyond a single disaster—ranking every disaster by all-in cost, or testing the mitigation-return hypothesis across hundreds of counties—OpenFEMA's bulk data downloads (the full CSV and Parquet files for each dataset, with the authoritative, version-stamped column definitions) are far more efficient than thousands of paginated API calls, and they are the right foundation for national-scale work.
Limitations and analytical caveats
The four datasets are the most complete public record of how the United States pays for its disasters, but stitching them together introduces hazards that no single-dataset analysis faces, and an analyst must internalize them before reporting a combined total.
Obligation is not outlay, and the books stay open for years. The Public Assistance and Hazard Mitigation figures are federal funds obligated—committed—not cash disbursed, and for a large recent disaster the obligated amount rises for years as projects are scoped, amended, appealed, and closed out. A snapshot of a two-year-old hurricane will understate its eventual obligated total. The combined number this workflow produces is therefore a point-in-time estimate of federal exposure, authoritative for the commitment to date but not a final, settled cost until the disaster is fully closed.
The NFIP geographic join is approximate. Because flood claims carry no disaster number, attaching them to a disaster by county and date is an inference, not an exact match. A declared county can record flood claims in the same year from a separate, undeclared rainfall event; a multi-state disaster requires running the join state by state; and the year-of-loss granularity is coarser than the incident period. The geographic join captures the bulk of the relevant claims for a large, well-bounded flood, but it is the softest link in the chain, and any combined total should flag the NFIP component as estimated rather than exact.
The programs do not partition the loss cleanly. The four datasets are complementary, but they are not a disjoint accounting of every dollar a disaster cost. Individual Assistance to households, Small Business Administration disaster loans, private (non-NFIP) insurance, crop insurance, and uninsured losses borne by residents and businesses all sit outside these four tables entirely. Summing Public Assistance, Hazard Mitigation, and NFIP claims yields a meaningful measure of FEMA-channeled federal exposure, not the total economic cost of the event, and the two should never be conflated. Conversely, one must guard against double-counting at the seams—Flood Mitigation Assistance is funded from the same flood-insurance system whose claims appear in the NFIP table, so an analysis that mixes program streams must be precise about what each dollar represents.
Reporting lag and FIPS hygiene bite at the edges. Each of the four datasets refreshes on its own OpenFEMA schedule, so a recent disaster will be more complete in the fast-moving declarations and Public Assistance tables than in the slower mitigation and claims tables—a cross-dataset snapshot is never uniformly current. And the geographic join depends entirely on disciplined FIPS handling: state and county codes must be zero-padded to their fixed two- and three-digit widths and concatenated consistently across all four sources, or the join silently drops the counties whose codes differ only in leading zeros. Held with these caveats in mind—obligation versus outlay, an approximate insurance join, an incomplete partition of the loss, and careful FIPS hygiene—the four FEMA tables together do something no single dataset can: they let one hurricane, one wildfire, one flood be followed from the day the President signs the declaration through every federal dollar it draws, the full disaster cycle resolved in one connected view.
Related writing
FEMA Disaster Declarations: The Federal Database Behind 70 Years of US Natural Disasters — The declaration is the spine of the whole cycle, and this piece details the disaster-number key, the DR/EM/FM types, and the declared-county geography that every other dataset hangs from.
FEMA Public Assistance: The Federal Record of How Disaster Recovery Money Is Spent — The rebuild layer of the cycle, covering the Stafford Act cost-share, the emergency- and permanent-work categories, and how the funded-project summaries roll up the federal share obligated by disaster.
FEMA Hazard Mitigation: The Federal Record of Spending to Prevent the Next Disaster — The mitigation layer, distinguishing the disaster-linked HMGP from the competitive FMA and resilience programs and explaining why only some mitigation projects carry a disaster number.