A heat calendar for 42 cities, one row for every year since 1950
Climate
Open Data
Interactive
A heat calendar for 42 big cities: one row for every year since 1950, one red mark for every hot day. Pick a city and your birth year.
Author
Zobaer Ahmed, PhD
calRaw =FileAttachment("data/hot_calendar.csv").csv()cityInfo =FileAttachment("data/cities.csv").csv({typed:true})thresholds =FileAttachment("data/thresholds.csv").csv({typed:true})monthNames = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]// One record per city and year, with everything the charts needyears = calRaw.map(r => {const y =+r.year;const s = r.days;const n = s.length;const info = cityInfo.find(c => c.city=== r.city);const south = info ? info.lat<0:false;const off = n ===366?182:181;// July 1 when the calendar runs July to Juneconst hotCols = [];let nData =0;for (let c =0; c < n; c++) {const i = south ? (c + off) % n : c;const ch = s[i];if (ch !=="-") nData++;if (ch ==="h") hotCols.push(c); }const season = hotCols.length>=5? hotCols[Math.floor(hotCols.length*0.95)] - hotCols[Math.floor(hotCols.length*0.05)]:NaN;return {city: r.city,year: y,days: s, n, south, off, hotCols,hot: hotCols.length, nData, season};})full = years.filter(d => d.nData>=360)lastFull = d3.max(full, d => d.year)recentStart = lastFull -9avgOf = (rows, a, b, key) => d3.mean(rows.filter(d => d.year>= a && d.year<= b &&!isNaN(d[key])), d => d[key])summary =Array.from(d3.group(full, d => d.city), ([name, rows]) => ({city: name,then:avgOf(rows,1951,1960,"hot"),now:avgOf(rows, recentStart, lastFull,"hot"),base:avgOf(rows,1951,1980,"hot")})).map(d => ({...d,change: d.now- d.then})).sort((a, b) => d3.descending(a.change, b.change))nCities = summary.lengthnUp = summary.filter(d => d.now> d.base).lengtholdNormal = d3.mean(summary, d => d.base)
Interactive · updated every week
md`Summers feel hotter than they used to. But is that true where we live? We looked at the high temperature for every day since 1950 in ${nCities} big cities around the world and marked each hot day.`
What counts as a hot day?
Every city is different. A hot day in London would feel like a normal day in Delhi. So we let each city set its own bar.
Here is how we set it:
We took every day from 1951 to 1980 in that city. That is 30 years, or about 11,000 days.
We lined those days up from coolest to hottest.
We found the temperature where only the hottest 1 in 10 days were warmer. That temperature is the city’s hot day line.
Then, for every year since 1950, we counted how many days went above that line.
For example, New York’s line is 28.3°C (83°F). Any day warmer than that counts as a hot day.
Since 1 in 10 days were above the line back then, a city had about 36 hot days a year in those years (365 days divided by 10). We call that the old normal. A city with more hot days than that now has more hot days than it used to.
viewof city = Inputs.select(summary.map(d => d.city).sort(), {label:"Pick a city",value: summary.some(d => d.city==="New York") ?"New York": summary[0].city})viewof born = Inputs.range([1950,2010], {step:1,value:1985,label:"The year you were born"})
cityRows = years.filter(d => d.city=== city).sort((a, b) => a.year- b.year)cityFull = cityRows.filter(d => d.nData>=360)thr = (thresholds.find(t => t.city=== city) || {}).threshold_ctoF = c =>Math.round(c *9/5+32)sign = v => (v >=0?"+":"") +Math.round(v)southNote = cityRows[0].south? city +" is south of the equator, so its summer is December to February. Its calendar runs July to June to keep summer in the middle.":""stats = {const then =avgOf(cityFull,1951,1960,"hot");const now =avgOf(cityFull, recentStart, lastFull,"hot");const sThen =avgOf(cityFull,1951,1960,"season");const sNow =avgOf(cityFull, recentStart, lastFull,"season");const b =avgOf(cityFull,Math.max(1950, born -2), born +2,"hot");const el =html`<div class="hd-stats"> <div class="hd-stat"><span class="k">Hot days a year</span> <span class="v">${Math.round(then)} <small>to</small> ${Math.round(now)}</span> <span class="s">The 1950s compared with ${recentStart} to ${lastFull}</span></div> <div class="hd-stat"><span class="k">Hot season</span> <span class="v">${sign(sNow - sThen)} <small>days</small></span> <span class="s">${sNow >= sThen ?"longer":"shorter"} from the first hot days to the last, than in the 1950s</span></div> <div class="hd-stat"><span class="k">Since you were born</span> <span class="v">${sign(now - b)} <small>days</small></span> <span class="s">hot days a year in ${city} now, compared with around ${born}</span></div> </div>`;const btns =window.zaShare.buttons(() => ({file:"hot-days-numbers-"+ city.toLowerCase().replace(/[^a-z]+/g,"-") +".png",text:`How hot days changed in ${city} since the 1950s. By Zobaer Ahmed, PhD.`,url:"https://www.zobaerahmed.us/posts/hot-days/",kicker:`Hot days in ${city} · 1950 to ${lastFull}`,title:`${city} went from about ${Math.round(then)} to ${Math.round(now)} hot days a year`,sub:`The 1950s compared with ${recentStart} to ${lastFull}.`,source:"Data: Open-Meteo historical weather (ERA5), daily highs",draw: (g, x, y, w, h, C, F, wrap) => {const rows = [ ["HOT DAYS A YEAR",`${Math.round(then)} to ${Math.round(now)}`,`The 1950s compared with ${recentStart} to ${lastFull}`], ["HOT SEASON",`${sign(sNow - sThen)} days`,`${sNow >= sThen ?"Longer":"Shorter"} from the first hot day to the last, than in the 1950s`], ["SINCE "+ born,`${sign(now - b)} days`,`Hot days a year now, compared with around ${born}`] ];const rh =Math.min(260, h /3); rows.forEach((r, i) => {const ty = y + i * rh +40; g.fillStyle= C.ink; g.fillRect(x, ty -36, w,3); g.fillStyle= C.muted; g.font="500 24px "+ F.mono; g.fillText(r[0], x, ty); g.fillStyle= C.red; g.font="104px "+ F.disp; g.fillText(r[1], x, ty +110); g.fillStyle= C.ink; g.font="28px "+ F.body;wrap(g, r[2], x, ty +160, w,36,2); }); } }));returnhtml`<div>${el}${btns}</div>`;}
md`In **${city}**, a hot day is any day above **${thr ===undefined?"": thr.toFixed(1)}°C (${thr ===undefined?"":toF(thr)}°F)**.`
The heat calendar
Read it like the pages of a calendar stacked on top of each other. Each row is one year, from 1950 at the top to today at the bottom. Each red mark is one hot day. When the red band gets wider, the hot season starts earlier and ends later. Hover over or tap any row to see that year.
calendar = {const W = width;const rowH = W <560?4:5;const pad = {l:40,r:6,t:22,b:26};const iw = W - pad.l- pad.r;const y0 = cityRows[0].year;const H = pad.t+ cityRows.length* rowH + pad.b;const dpr =window.devicePixelRatio||1;const canvas = DOM.canvas(Math.round(W * dpr),Math.round(H * dpr)); canvas.style.width= W +"px"; canvas.style.height= H +"px";const ctx = canvas.getContext("2d"); ctx.scale(dpr, dpr);const col = c => pad.l+ c /366* iw;const south = cityRows[0].south;// background grid of "not hot" days, then the hot days in red ctx.fillStyle="#C9D1D8"; ctx.fillRect(pad.l, pad.t, iw, cityRows.length* rowH); ctx.fillStyle="#B23A2B"; cityRows.forEach((r, k) => {for (const c of r.hotCols) ctx.fillRect(col(c), pad.t+ k * rowH,Math.max(1, iw /366), rowH -1); });// month and year labels ctx.font="11px 'IBM Plex Mono', monospace"; ctx.fillStyle="#5C6B78";const months = south ? monthNames.slice(6).concat(monthNames.slice(0,6)) : monthNames; months.forEach((m, i) => { if (W <560&& i %2) return; ctx.fillText(m, pad.l+ i * iw /12+2, pad.t-7); }); ctx.textAlign="right"; ctx.textBaseline="middle"; [1950,1970,1990,2010, cityRows[cityRows.length-1].year].forEach(yr => {if (yr >= y0) ctx.fillText(yr, pad.l-6, pad.t+ (yr - y0) * rowH + rowH /2); });// the birth year row ctx.strokeStyle="#1E2A36"; ctx.lineWidth=1.5;if (born >= y0) ctx.strokeRect(pad.l-0.5, pad.t+ (born - y0) * rowH -1, iw +1, rowH +1);// credit inside the picture, so it travels with screenshots ctx.textAlign="right"; ctx.textBaseline="alphabetic"; ctx.fillText("Chart: Zobaer Ahmed, PhD | Data: Open-Meteo, ERA5", W - pad.r, H -6);// hover readoutconst tip =html`<div class="hd-tip" hidden></div>`;const label = (r, c) => {const i = r.south? (c + r.off) % r.n: c;const d =newDate(Date.UTC(r.year,0,1+ i));return monthNames[d.getUTCMonth()] +" "+ d.getUTCDate(); };const show = e => {const box = canvas.getBoundingClientRect();const x = e.clientX- box.left, y = e.clientY- box.top;const k =Math.floor((y - pad.t) / rowH);const r = cityRows[k];if (!r || x < pad.l) { tip.hidden=true;return; }const span = r.hot>0?`first ${label(r, r.hotCols[0])}, last ${label(r, r.hotCols[r.hotCols.length-1])}`:"no hot days"; tip.innerHTML=`<strong>${r.year}</strong>: ${r.hot} hot days<br>${span}${r.nData<360?"<br>(year not finished)":""}`; tip.hidden=false;const left =Math.min(Math.max(0, x +12), W - tip.offsetWidth-4); tip.style.left= left +"px"; tip.style.top=Math.max(0, y - tip.offsetHeight-10) +"px"; }; canvas.addEventListener("pointermove", show); canvas.addEventListener("pointerdown", show); canvas.addEventListener("pointerleave", () => { tip.hidden=true; });const key =html`<div class="hd-key"><span style="--sw:#B23A2B">Hot day</span><span style="--sw:#C9D1D8">Not hot</span><span style="--sw:#1E2A36">Your birth year (${born})</span></div>`;const fig =html`<div class="hd-figure">${key}<div class="hd-cal">${canvas}${tip}</div></div>`; fig.append(window.zaShare.buttons(() => ({el: fig,file:"heat-calendar-"+ city.toLowerCase().replace(/[^a-z]+/g,"-") +".png",text:`Every hot day in ${city} since 1950. By Zobaer Ahmed, PhD.`,url:"https://www.zobaerahmed.us/posts/hot-days/",kicker:`Heat calendar · ${city} · 1950 to ${cityRows[cityRows.length-1].year}`,title:`Every hot day in ${city} since 1950`,sub:"Each row is one year, oldest at the top. Each red mark is one hot day. The outlined row is "+ born +".",legend: [{lab:"Hot day",c:"#B23A2B"}, {lab:"Not hot",c:"#C9D1D8"}],source:"Data: Open-Meteo historical weather (ERA5), daily highs" })));return fig;}
md`${southNote}`
Share your city
Save or share a card with your city’s heat calendar.
shareCard = {const S =1080, c =document.createElement("canvas"); c.width= S; c.height= S;const g = c.getContext("2d");const then =avgOf(cityFull,1951,1960,"hot"), now =avgOf(cityFull, recentStart, lastFull,"hot");const b =avgOf(cityFull,Math.max(1950, born -2), born +2,"hot"); g.fillStyle="#F3EFE8"; g.fillRect(0,0, S, S); g.fillStyle="#B23A2B"; g.fillRect(0,0, S,14); g.fillStyle="#5E5D57"; g.font="500 28px 'IBM Plex Mono', monospace"; g.fillText("HOT DAYS A YEAR · 1950 TO "+ lastFull,64,96); g.fillStyle="#1C1C1A"; g.font="72px 'Libre Caslon Display', Georgia, serif"; g.fillText(city,64,186); g.font="34px 'Work Sans', Arial, sans-serif"; g.fillStyle="#1C1C1A"; g.fillText(`About ${Math.round(then)} hot days a year in the 1950s.`,64,250); g.fillText(`About ${Math.round(now)} a year in ${recentStart} to ${lastFull}.`,64,298);// the heat calendarconst top =340, H =560, rowH = H / cityRows.length, L =64, W = S -128; g.fillStyle="#C9D1D8"; g.fillRect(L, top, W, H); g.fillStyle="#B23A2B"; cityRows.forEach((r, k) => { for (const col of r.hotCols) g.fillRect(L + col /366* W, top + k * rowH,Math.max(1.5, W /366),Math.max(1, rowH -1)); });if (born >= cityRows[0].year) { g.strokeStyle="#1C1C1A"; g.lineWidth=3; g.strokeRect(L -2, top + (born - cityRows[0].year) * rowH -2, W +4, rowH +4); } g.fillStyle="#5E5D57"; g.font="24px 'IBM Plex Mono', monospace"; g.fillText("1950", L, top -10); g.textAlign="right"; g.fillText("each row is a year · red = hot day", L + W, top -10); g.textAlign="left"; g.fillStyle="#1C1C1A"; g.font="30px 'Work Sans', Arial, sans-serif"; g.fillText(`Since ${born}: ${now - b >=0?"+":""}${Math.round(now - b)} hot days a year`,64,950); g.font="600 30px 'Work Sans', Arial, sans-serif"; g.fillText("Zobaer Ahmed, PhD",64,1030); g.fillStyle="#5E5D57"; g.font="28px 'IBM Plex Mono', monospace"; g.textAlign="right"; g.fillText("zobaerahmed.us", S -64,1030);return c;}
{const name ="hot-days-"+ city.toLowerCase().replace(/[^a-z]+/g,"-") +".png";const url ="https://www.zobaerahmed.us/posts/hot-days/";const text =`Hot days in ${city}, every year since 1950. By Zobaer Ahmed, PhD.`;const share =html`<button type="button" class="dark">Share this card</button>`;const dl =html`<button type="button">Download image</button>`; share.onclick= () =>window.zaShare.share(shareCard, name, text, url, share); dl.onclick= () =>window.zaShare.download(shareCard, name);const img =html`<img class="za-cardprev" alt="Share card for ${city}">`; img.src= shareCard.toDataURL("image/png");returnhtml`<div>${img}<div class="za-share">${share}${dl}</div></div>`;}
Hot days each year
Each bar is one year. The red bars are the last 10 full years. The dark bar is the year you picked. The dashed line is this city’s old normal. Hover over a bar to see its count.
{const fig =html`<div class="hd-figure">${Plot.plot({width: width -30,height:260,marginLeft:40,style: {background:"transparent",fontFamily:"'IBM Plex Mono', monospace",fontSize:"11px"},x: {label:null,tickFormat:"d"},y: {label:"Hot days",grid:true},marks: [ Plot.rectY(cityFull, {x1:"year",x2: d => d.year+1,y:"hot",insetLeft:0.5,insetRight:0.5,fill: d => d.year=== born ?"#1E2A36": d.year>= recentStart ?"#B23A2B":"#A3ACB6",title: d =>`${d.year}: ${d.hot} hot days`,tip:true }), Plot.ruleY([avgOf(cityFull,1951,1980,"hot")], {stroke:"#1E2A36",strokeDasharray:"4,3"}), Plot.ruleY([0]) ]})}<div class="hd-credit">Chart: Zobaer Ahmed, PhD | Data: Open-Meteo, ERA5</div></div>`;fig.append(window.zaShare.buttons(() => ({el: fig,file:"hot-days-each-year-"+ city.toLowerCase().replace(/[^a-z]+/g,"-") +".png",text:`Hot days in ${city}, every year since 1950. By Zobaer Ahmed, PhD.`,url:"https://www.zobaerahmed.us/posts/hot-days/",kicker:`Hot days each year · ${city} · 1950 to ${lastFull}`,title:`Hot days in ${city}, every year since 1950`,sub:"The dashed line is the old normal (1951 to 1980).",legend: [{lab:`${recentStart} to ${lastFull}`,c:"#B23A2B"}, {lab:"Earlier years",c:"#A3ACB6"}, {lab:`${born}`,c:"#1E2A36"}],source:"Data: Open-Meteo historical weather (ERA5), daily highs"})));return fig;}
How all the cities compare
The grey dot is how many hot days a year each city had in the 1950s. The red dot is the last 10 full years. Cities are sorted by how much they changed. Hover over a red dot to see the numbers.
{const fig =html`<div class="hd-figure">${Plot.plot({width: width -30,height: summary.length*20+50,marginLeft:110,style: {background:"transparent",fontFamily:"'IBM Plex Mono', monospace",fontSize:"11px"},x: {label:"Hot days per year",grid:true},y: {label:null,domain: summary.map(d => d.city)},marks: [ Plot.ruleX([oldNormal], {stroke:"#1E2A36",strokeDasharray:"4,3"}), Plot.link(summary, {y1:"city",y2:"city",x1:"then",x2:"now",stroke: d => d.city=== city ?"#1E2A36":"#A3ACB6",strokeWidth: d => d.city=== city ?2.5:1.5 }), Plot.dot(summary, {y:"city",x:"then",r:4,fill:"#FFFFFF",stroke:"#5C6B78"}), Plot.dot(summary, {y:"city",x:"now",r:5,fill:"#B23A2B",title: d =>`${d.city}\n1950s: ${Math.round(d.then)} hot days a year\nLast 10 years: ${Math.round(d.now)}\nChange: ${sign(d.change)}`,tip:true }) ]})}<div class="hd-credit">Chart: Zobaer Ahmed, PhD | Data: Open-Meteo, ERA5</div></div>`;fig.append(window.zaShare.buttons(() => ({el: fig,file:"hot-days-all-cities.png",text:`${nUp} of ${nCities} big cities now get more hot days than their old normal. By Zobaer Ahmed, PhD.`,url:"https://www.zobaerahmed.us/posts/hot-days/",kicker:`Hot days a year · ${nCities} cities · 1950s vs ${recentStart} to ${lastFull}`,title:`${nUp} of ${nCities} cities now get more hot days than their old normal`,legend: [{lab:"1950s",c:"#FFFFFF"}, {lab:`${recentStart} to ${lastFull}`,c:"#B23A2B"}],source:"Data: Open-Meteo historical weather (ERA5), daily highs"})));return fig;}
md`**${nUp} out of ${nCities}** cities now get more hot days than their old normal.`
A few cities have fewer hot days now, like Delhi and Chicago. Scientists think farming plays a part in both places. In north India, watering huge fields puts more moisture in the air, which keeps daytime highs down. In the American Midwest, big corn fields do something similar. In Delhi, the 1950s were also unusually hot, and records from that time are less certain.
Why does this matter?
Hot days make people sick, make it harder to work outside, and push up power bills. Older people, babies, and people without air conditioning feel it most. When a city gets more hot days, and a longer hot season, it needs more shade, more cooling centers, and better plans for heat waves.
How we did it
The data: daily high temperatures from Open-Meteo, a free weather data service. It uses a record called ERA5, which scientists built by combining millions of past weather readings into one map of the whole world.
Older records: before about 1980, there were fewer weather stations in some places, like parts of Africa, so the early years there are less certain than recent ones.
One spot per city: we used one point near the center of each city. A busy downtown can be a bit hotter than this point shows.
Hot season: the number of days from the start to the end of the hot days in a year. To keep one odd day from stretching it, we skip the first and last few hot days of each year.
Always fresh: this page updates itself every week with the newest days. The current year shows in the heat calendar, but the other charts wait until a year is over.
Please check before relying on these numbers. Public data can have mistakes, gaps and late updates, and the steps used to count and chart it can miss things too. Treat this page as a starting point for learning. Before using any of it to make a decision, check it against the original sources linked above.
Made by Zobaer Ahmed, PhD. Weather data by Open-Meteo.com, shared under CC BY 4.0. ERA5 data comes from the Copernicus Climate Change Service at the European Centre for Medium-Range Weather Forecasts.