Live Prediction
Click anywhere to estimate flood risk
Click-to-predict flood risk
Tap anywhere inside Catalonia to get an instant proxy estimate based on 82 AGORA + 56 DesInventar + 8 validated modern events.
Three ways to predict — pick your trade-off
Click anywhere inside Catalonia and the dashboard runs one of three engines on that exact (lat, lon). Switch between them with the toggle on the right.
- Nearest Neighbour (Heuristic) — instant. Inverse-distance kNN over the 146 historical events within a 25 km radius. Best for "how flood-prone is this area historically?". Not a forecast.
- Fast RF (in-browser) — instant. The same 20 Random Forest feature names as production, fitted to the 64 Catalonia training rows with a ridge regression that ships in the JS bundle. Feature values are approximated from the nearest historical events — no real raster extraction. Use it to compare locations side-by-side.
- Extraction Pipeline (Remote API) — 10–20 min per point. POSTs
{ lat, lon, date }to the FloodCat Python service on Hugging Face Spaces (https://brunomarco-floodcat-api.hf.space/). The Space downloads HydroRIVERS + HydroBASINS, ESA WorldCover, Copernicus DEM, CHIRPS, SMAP, GHSL and OSM, computes FloodPotential and the 20 RF features, then runs the trained.pklRandom Forest. This is the "real" prediction.
Coordinate format matters. The pipeline accepts numeric floats only (41.387400, not "41.387400" and not DMS). The dashboard rounds your click to 6 decimals (~11 cm — well below the 30 m DEM cell) and sends them as JSON numbers. Outside the Catalonia bounding box the Space will return an error.
Tile data © OpenStreetMap contributors · administrative outline from GADM v4.1
10–20 min · full DEM + land cover + RF pipeline on Hugging Face.