Exp 01 · Array of structures
Station Registry
36 fixed slots, one per district weather station. Insert and delete at the end, search by code or name.
insertLast → slot [0] · size 0/8
O(1) insert · O(n) search
Loading HEATSYNC
Historical replay · ERA5 reanalysis
Every particle was a piece of the wordmark. Each district lit up as its share landed — breadth-first from Nagpur, the hottest district, the order alerts would travel.
Move the pointer to shift the camera · scroll up to rewind
01 · The problem
Maharashtra’s heatwaves build over days and spread across borders — Vidarbha one week, Marathwada the next. The data to act on exists: hourly weather, decades of reanalysis, IMD’s criteria. What is missing is an engine that turns it into a coordinated response fast enough to matter.
Readings arrive as streams
Stations report every hour; decisions need a rolling 24-hour picture without re-reading history.
Rankings are rebuilt by hand
Which district is worst, which ones fall in a severity band — recomputed in spreadsheets, every day.
Neighbours are warned late
Heat ignores district lines, but alerts are issued district by district, one at a time.
One bulletin, four audiences
Citizens, farmers, hospitals and control rooms need different words for the same forecast.
45.8°C
Nagpur’s ERA5 daily maximum on 26 May 2024 — the hottest district that day.
12days
In a row, 20–31 May 2024, with at least 16 of 36 districts above 40 °C.
1283district-days
At or above 40 °C in the 2019 season — the worst of 2015–2025 in our archive.
77borders
Shared between districts. Every one is a path the heat — and the help — can travel.
Source: ERA5 reanalysis via Open-Meteo (CC BY 4.0), 36 district points, 1 Mar – 30 Jun 2015–2025. Borders: geoBoundaries.
The asphalt heats first.Then everyone on it.
Outdoor workers, drivers, vendors — the first people every HEATSYNC advisory is written for
02 · Eight structures, one response
HEATSYNC is built from the eight data structures of the course — each one chosen because its operations match a step of the heat response, not bolted on for show.
Exp 01 · Array of structures
36 fixed slots, one per district weather station. Insert and delete at the end, search by code or name.
insertLast → slot [0] · size 0/8
O(1) insert · O(n) search
Exp 02 · Singly linked list
Newest bulletin at the head; follow-ups slot in right after the bulletin they update.
O(1) insert at head
Exp 03 · Stack · infix → postfix
IMD criteria written as readable rules, compiled to postfix and evaluated for every district.
tmax >= 40 && dep >= 4.5
postfix
O(n) per rule
Exp 04 · Circular queue
24 hourly readings per station. The oldest is overwritten in place — a rolling day, no shifting.
rear = (rear + 1) % 12
front = 0
count = 1
full → overwrite oldest
O(1) enqueue
Exp 05 · Binary search tree
Districts keyed by Tmax. Reverse in-order is the live ranking; range queries pull a severity band.
search 45.8 → right, right · reverse in-order = hottest first
O(h) search
Exp 06 · Graph · BFS
Shared borders are edges. BFS finds contiguous hot zones, alert rings and the nearest cooler district.
level 0 · queue → visit → enqueue neighbours
O(V²) matrix
Exp 07 · Sorting · binary search
48,312 daily maxima, sorted once, so today can be ranked against eleven seasons in O(log n).
lo 0 · mid 5 · hi 10 → find 44.2 in O(log n)
O(n log n) · O(log n)
Exp 08 · Hash table · circular array
District by name, former name or HQ PIN — Aurangabad still finds Chhatrapati Sambhajinagar.
h = (h·31 + c) mod 11 · collision → (h + i) mod 11
O(1) average
03 · How an alert travels
Computed in your browser on the 26 May 2024 replay — the same engine that runs the console.
Nagpur’s last 24 hourly readings up to 14:00. Each new hour overwrites the oldest in place — the rolling maximum never needs a re-read.
The heatwave rule is written the way a meteorologist reads it, converted to postfix with a stack, then evaluated for every district.
tmax >= 45 || (tmax >= 40 && dep >= 4.5)
Compiled rules agree with the reference classifier for 36/36 districts.
Postfix: tmax 45 >= tmax 40 >= dep 4.5 >= && ||
36 districts inserted by Tmax. A reverse in-order walk reads them hottest first — tree height 15, not 36.
BFS over 77 shared borders groups hot districts into 2 contiguous zones; the largest spans 18 districts.
Alert rings from Nagpur: 1 → 4 → 6 → 4 → 6 → 5 → 4 → 4 → 2 districts
Every warning becomes a node inserted at the head. Follow-ups go right after the bulletin they update; nothing is copied or shifted.
Drafts are generated per audience from the same analysis, and stay drafts until a person approves them.
Heatwave in Nagpur and Akola — 26 May 2024
Draft · awaiting approval
04 · Live pulse
Open-Meteo’s forecast for each district, refreshed every 30 minutes and ranked, clustered and classified exactly like the replay.
05 · Built for
The use case asks for region-wise heat analysis, hotspot identification, visual decision support and stakeholder-specific advisories. HEATSYNC delivers that slice — with data structures you can inspect line by line.
Human in the loop
Advisories are drafts until a person approves them; only approved bulletins join the alert chain.
Honest data
Replay uses ERA5 reanalysis, live mode uses Open-Meteo guidance — always labelled, never presented as official warnings.
Transparent rules
IMD criteria are written as readable rules and compiled in the open; the step-by-step trace is one click away.
Scrub through the May 2024 heatwave, switch to today’s live guidance, and watch every structure do its job.