ResilientRaleigh
ResilientRaleigh is a neighborhood early-warning board for Southeast Raleigh, built for the City of Raleigh’s Bloomberg American Sustainable Cities work. Legacy neighborhoods along Walnut Creek, including Rochester Heights, face flash flooding and extreme heat. Regional weather apps do not show that at street scale.
The FastAPI service writes stream-gauge and heat readings into a Timescale hypertable named sensor_telemetry. A continuous aggregate, water_level_rate_of_rise_15m, buckets gauge samples into 15 minutes and computes average stage plus directional rate of rise. The map flags a rise of 1 foot per hour. That is a demo screening threshold, not an official National Weather Service alert.
Google Gemini 1.5 Flash writes a two-sentence warning in English and Spanish from a neighborhood temperature and the nearest Walnut Creek gauge. A second call estimates standing water in a resident photo. Prompts tell the model not to invent an open shelter or issue an evacuation order. If the API key is missing, the app says so instead of inventing a depth.
Sentry traces those Gemini calls. The Next.js board centers a Leaflet map on Southeast Raleigh (35.755, -78.625), draws the Walnut Creek corridor and heat zones, and shows flashing pins for flood watches. Those zones are illustrative screening layers for the demo, not FEMA maps. If Tiger Data is offline, the board keeps a labeled demo pulse so the story still runs.
Built with
AI tools
Prize Categories Entered
- Submitted
Best Use of the Google Gemini API
`generate_community_alert` sends neighborhood, temperature, and Walnut Creek stage to Gemini 1.5 Flash and asks for exactly two sentences in English or Spanish, including a higher-ground direction that stays off the Walnut Creek Greenway. The prompt forbids inventing a shelter address or claiming an official order. `analyze_flood_photo` sends a resident image to the same model and expects JSON for standing water, depth in inches, confidence, and whether to recommend a field alert. Both calls are wrapped in a Sentry span, `op="ai.gemini.alert_synthesis`.
- Submitted

Best Use of Tiger Data
Stream and heat readings are inserted into sensor_telemetry, then converted with create_hypertable on time. The continuous aggregate water_level_rate_of_rise_15m uses time_bucket('15 minutes'), avg, first(), and last() to store average stage and directional rate of rise in feet per hour. POST /api/telemetry/simulate seeds ten Walnut Creek and downtown rows inside one 15-minute bucket so that aggregate has a real rise. GET /api/sensors/live reads it back onto the map. Alert text is stored in the relational table flood_alerts in the same database.
- Event prizeSubmitted
Sentry Raffle
sentry_sdk.init runs at API startup with traces_sample_rate=1.0. Each Gemini alert and photo call is a child span tagged with the model name. The span records whether the text came from Gemini or from the labeled fallback. That is the path we would open if a gauge write or a model call failed during a storm demo.
- Event prizeSubmitted
Best Use of Raleigh Open Data
ResilientRaleigh is a neighborhood early-warning board for Southeast Raleigh. The map is centered at 35.755, -78.625, on the Walnut Creek corridor through Rochester Heights and South Park. Hand-drawn flood and heat zones sit under flashing pins for a demo rise of 1 foot per hour and for neighborhood temperatures, including a South Park reading of 102.1°F. Those shapes are screening layers for the demo, not a City of Raleigh Open Data layer, tree-canopy assessment, or Wake County floodplain. Gauge and heat numbers come from the app’s demo catalog. The English and Spanish card tells residents to stay off the Walnut Creek Greenway, avoid driving through flooded streets, and check AlertWake before going to John Chavis Memorial Park, 505 Martin Luther King Jr Blvd, to see whether the City opened a cooling site.