Inspiration
We wanted to make it easier to see how the same wildfire or storm can unfold differently depending on the place. Terrain, land cover and weather all matter, but their effects are hard to picture from numbers alone. CA-lamity turns those conditions into a map you can explore and see the effects in real-time.
What it does
CA-lamity simulates 24 hours of wildfire or flooding around one of five locations. You can adjust wind, humidity or rainfall and soil saturation manually, or use yesterday’s hourly weather for the selected place. A timeline shows the disaster spreading over the map, while a statistics panel tracks its impact.
The app also identifies nearby schools, community centres and shelters that remain outside the simulated danger area throughout a run. You can save scenarios and revisit them later. For wildfires we also get data about the location of local firefighters and police and display the quickest path to the fire.
How we built it
We built the interface with Next.js, React, TypeScript and OpenStreetMap API, and the simulation API with FastAPI, NumPy and Rasterio. The wildfire model uses a cellular automaton: fire spreads between neighbouring cells according to fuel, humidity, wind and slope. In the supported Los Angeles area, it uses USGS elevation and NLCD land-cover data.
For floods, a separate model routes rainfall downhill into river channels and spreads water onto the floodplain when channels overflow. We use Open-Meteo for optional hourly weather, OpenStreetMap for nearby facilities, and Tiger Data’s TimescaleDB and PostGIS features to store runs and query safe points.
Challenges we ran into
Combining data from different sources into one simulation grid was a major challenge. We also had to make flooding behave like water moving through rivers, rather than simply colouring low ground blue. Hourly weather added another complication: a local “yesterday” can have 23 or 25 hours when clocks change, while our playback always has 24.
Accomplishments that we're proud of
We brought two different disaster models into one interactive map. The simulations respond to conditions that users can change, and saved runs can be replayed with their original settings. We’re especially proud of connecting the changing hazard area to spatial queries for nearby safe points.
What we learned
We learned how much work sits between a model and a usable map: preparing geographic data, keeping the browser and backend grids aligned, handling time zones, and presenting results clearly. We also learned to be explicit about the model’s limits. CA-lamity is an illustration, not a fully calibrated forecast.
What's next for CA-lamity
A valuable next step would be to validate the models against observed events and expand the detailed wildfire data. That would help us understand where the predictions are useful and where they need improvement.
Built With
- esri-world-imagery
- fastapi
- next.js
- nlcd-2021
- numpy
- open-meteo
- openstreetmap
- overpass-api
- postgis
- postgresql
- python
- rasterio
- react
- sqlmodel
- tailwind-css
- tiger-data
- timescaledb
- typescript
- usgs-3dep
- vercel
- vultr
Log in or sign up for Devpost to join the conversation.