About

ProjectOpen source · Web app + ML pipeline

HazardPrep + HazardCast

By Sachin Gupta
Portrait of Sachin Gupta rendered in binary
HazardPrep + HazardCast — architecture diagram

A free, open-source multi-hazard risk assessment for any US address (HazardPrep) paired with an XGBoost engine that predicts FEMA disaster declarations up to 90 days ahead (HazardCast).

Two companion projects on the same federal open data. HazardPrep tells you the risk at an address right now; HazardCast predicts where disaster is coming next.

HazardPrep: risk for any US address

HazardPrep is a free, open-source multi-hazard risk assessment for any US address, combining federal open data into a single personalized dashboard covering floods, earthquakes, wildfires, hurricanes, and tornadoes.

No single existing tool combines every natural-hazard type for a specific address. The alternatives are county-level only (FEMA National Risk Index), single-state (California's Cal MyHazards), single-hazard (USGS for earthquakes, NOAA for weather), or alerts-only (the FEMA app). HazardPrep unifies them into one profile per address.

An address is geocoded, then the system fetches from ten hazard providers in parallel (FEMA, USGS, NOAA, NIFC, the US Drought Monitor, NOAA Storm Events, FEMA NFIP, USGS/NASA landslide, FEMA shelters, and the HazardCast model) and produces a composite score. All data comes from free US federal APIs with no keys required. The output is a 0 to 100 composite score, individual hazard scores with source transparency, a risk-level classification, a personalized preparation checklist, and an interactive map. The scoring engine ships as a standalone npm package (@hazardprep/core), so it can be dropped into other apps or research; the Next.js dashboard is just one consumer of it.

HazardCast: predicting the next declaration

HazardCast is the machine-learning companion: an engine that predicts which US counties will receive a FEMA disaster declaration up to 90 days in advance. It trains an XGBoost binary classifier on 42 engineered features drawn from seven federal data sources (FEMA, USGS, NOAA, the Census Bureau, the US Drought Monitor, NIFC, and NFIP) across 2000 to 2024.

The 42 features cover ten domains and include multi-hazard cascade interaction terms, capturing how one hazard raises the odds of another. The model is evaluated with a strict temporal split (train on 2000 to 2021, validate on 2022, test on 2023 to 2024) so its accuracy reflects genuine forward prediction rather than hindsight.

Together the two projects span the full arc: HazardPrep turns today's federal data into an address-level risk profile, and HazardCast turns six decades of it into a forward-looking forecast. Both are Apache 2.0. EOF

Related