U.S. home prices ticked up 0.14% month over month in October on a seasonally adjusted basis. That is the smallest increase in six months. 

.rhpimr, .rhpimr * { box-sizing: border-box; margin: 0; padding: 0; }

.rhpimr { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #333; font-size: 13px; line-height: 1.4; padding: 0 0 20px; max-width: 980px; margin: 0 auto; overflow-x: hidden; }

.rhpimr-header { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; } .rhpimr-title { font-size: 18px; font-weight: 700; color: #333; line-height: 1.25; }

.rhpimr-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; } .rhpimr-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #555; } .rhpimr-legend-line { width: 20px; height: 3px; border-radius: 1px; flex-shrink: 0; }

.rhpimr-area-title { font-size: 12px; color: #555; margin-bottom: 6px; min-height: 32px; display: flex; align-items: flex-end; } .rhpimr-chart-wrap { position: relative; height: 240px; } .rhpimr-chart-wrap canvas { max-width: 100%; }

#rhpimr-tooltip { position: fixed; display: none; pointer-events: none; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: rgba(255,255,255,0.97); border: 1px solid #ddd; border-radius: 3px; padding: 9px 11px; font-size: 12px; color: #333; z-index: 9999; box-shadow: 0 2px 6px rgba(0,0,0,0.12); min-width: 260px; } .rhpimr-tt-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 20px; } .rhpimr-tt-label { color: #555; white-space: nowrap; } .rhpimr-tt-value { font-weight: 700; white-space: nowrap; text-align: right; }

.rhpimr-loading, .rhpimr-error { display: flex; align-items: center; justify-content: center; height: 300px; color: #999; font-size: 13px; } .rhpimr-error { color: #DE3341; }

@media (max-width: 700px) { .rhpimr-title { font-size: 16px; } .rhpimr-chart-wrap { height: 180px; } }

(function () { const CSV_URL = 'https://redfin-public-data.s3.us-west-2.amazonaws.com/redfin_html_public_dashboards/rhpi.csv.gz';

function fmtPctChange(v) { const n = parseFloat(v); return isNaN(n) ? '—' : (n >= 0 ? '+' : '') + (n * 100).toFixed(2) + '%'; }

function parseCSV(text) { const lines = text.trim().split('\n'); const headers = lines[0].split(',').map(h => h.trim().replace(/^"|"$/g, '').toLowerCase()); return lines.slice(1).map(line => { const vals = []; let inQuote = false, cur = ''; for (let i = 0; i < line.length; i++) { const c = line[i]; if (c === '"') { inQuote = !inQuote; } else if (inQuote ? false : c === ',') { vals.push(cur); cur = ''; } else { cur += c; } } vals.push(cur); return Object.fromEntries(headers.map((h, i) => [h, (vals[i] || '').trim()])); }); }

function fmtMonthYear(iso) { if (!iso) return ''; const [y, m] = iso.split('-'); const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; return months[parseInt(m) - 1] + ' ' + y; }

// Headline from the latest Redfin Home Price Index value, e.g. "Home Prices Ticked Up 0.14% in October". function setHeadline(rows, rhpiVals) { const el = document.getElementById('rhpimr-title'); let li = -1; for (let j = rhpiVals.length - 1; j >= 0; j--) { if (rhpiVals[j] !== null) { li = j; break; } } if (li < 0) return; const months = ['January','February','March','April','May','June','July','August','September','October','November','December']; const month = months[parseInt(rows[li].date.split('-')[1]) - 1]; const pct = Math.round(rhpiVals[li] * 10000) / 100; const amount = ' ' + Math.abs(pct).toFixed(2) + '%'; let phrase; if (pct >= 0.5) phrase = 'Rose' + amount; else if (pct >= 0.05) phrase = 'Ticked Up' + amount; else if (pct > -0.05) phrase = 'Were Flat'; else if (pct > -0.5) phrase = 'Ticked Down' + amount; else phrase = 'Fell' + amount; el.textContent = 'Home Prices ' + phrase + ' in ' + month; }

// WordPress's editor strips <canvas> tags, so build the canvas here instead of in the markup. function getCanvas() { let canvas = document.getElementById('rhpimr-chart'); if (!canvas) { const wrap = document.querySelector('.rhpimr-chart-wrap'); wrap.innerHTML = ''; canvas = document.createElement('canvas'); canvas.id = 'rhpimr-chart'; wrap.appendChild(canvas); } return canvas; }

function showChartTipAt(context, buildHtml) { const el = document.getElementById('rhpimr-tooltip'); const t = context.tooltip; if (t.opacity === 0 || !t.dataPoints?.length) { el.style.display = 'none'; return; } const html = buildHtml(t.dataPoints[0].dataIndex); if (!html) { el.style.display = 'none'; return; } el.innerHTML = html; el.style.display = 'block'; const rect = context.chart.canvas.getBoundingClientRect(); let left = rect.left + t.caretX + 14; if (left + 300 > window.innerWidth - 8) left = rect.left + t.caretX - 300 - 14; el.style.left = Math.max(4, left) + 'px'; el.style.top = Math.max(4, rect.top + t.caretY - 10) + 'px'; }

const xYearLabelsPlugin = { id: 'rhpimrXYearLabels', afterDraw(chart) { const ca = chart.chartArea; if (!ca) return; const meta = chart.getDatasetMeta(0); const data = chart.data.datasets[0].data; const lbls = chart.data.labels; const N = lbls ? lbls.length : 0; if (!N || !meta.data.length) return;

let firstIdx = -1, lastIdx = -1; for (let i = 0; i < data.length; i++) { if (data[i] != null) { if (firstIdx < 0) firstIdx = i; lastIdx = i; } } if (firstIdx < 0 || lastIdx <= firstIdx) return; if (!meta.data[firstIdx] || !meta.data[lastIdx]) return; const x0 = meta.data[firstIdx].x; const x1 = meta.data[lastIdx].x; if (!x0 || !x1 || x1 <= x0) return;

const ctx = chart.ctx; const yPos = ca.bottom + 4; ctx.save(); ctx.font = '10px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'; ctx.fillStyle = '#666'; ctx.textAlign = 'center'; ctx.textBaseline = 'top'; const cands = []; const seen = new Set(); for (let i = 0; i < N; i++) { const lbl = lbls[i]; if (!lbl) continue; const yr = parseInt(String(lbl).substring(0, 4)); if (seen.has(yr)) continue; seen.add(yr); const frac = (i - firstIdx) / (lastIdx - firstIdx); cands.push({ yr, x: x0 + frac * (x1 - x0) }); } if (cands.length) { const labelW = ctx.measureText(String(cands[cands.length - 1].yr)).width; const spacing = cands.length > 1 ? (cands[cands.length - 1].x - cands[0].x) / (cands.length - 1) : Infinity; const step = Math.max(1, Math.ceil((labelW + 8) / spacing)); for (let j = 0; j < cands.length; j += step) { ctx.fillText(String(cands[j].yr), cands[j].x + 12, yPos); } } ctx.restore(); } };

const endLabelPlugin = { id: 'rhpimrEndLabel', afterDatasetsDraw(chart) { const entries = []; chart.data.datasets.forEach((ds, i) => { const meta = chart.getDatasetMeta(i); if (!meta.visible) return; let li = -1; for (let j = ds.data.length - 1; j >= 0; j--) { if (ds.data[j] === null ? false : !isNaN(ds.data[j])) { li = j; break; } } if (li < 0 || !meta.data[li]) return; entries.push({ x: meta.data[li].x, y: meta.data[li].y, text: fmtPctChange(ds.data[li]), color: ds.borderColor || '#333' }); }); if (!entries.length) return;

const MIN_GAP = 13; const ca = chart.chartArea; entries.sort((a, b) => a.y - b.y); for (let i = 1; i < entries.length; i++) { if (entries[i].y - entries[i - 1].y < MIN_GAP) entries[i].y = entries[i - 1].y + MIN_GAP; } for (let i = entries.length - 1; i >= 0; i--) { const maxY = ca.bottom - (entries.length - 1 - i) * MIN_GAP; if (entries[i].y > maxY) entries[i].y = maxY; if (i < entries.length - 1 ? entries[i + 1].y - entries[i].y < MIN_GAP : false) { entries[i].y = entries[i + 1].y - MIN_GAP; } }

const ctx = chart.ctx; ctx.save(); ctx.font = 'bold 12px Inter, -apple-system, BlinkMacSystemFont, sans-serif'; ctx.textAlign = 'left'; ctx.textBaseline = 'middle'; entries.forEach(e => { ctx.fillStyle = e.color; ctx.fillText(e.text, e.x + 4, e.y); }); ctx.restore(); } };

function pctBounds(arr1, arr2) { const all = [...arr1, ...arr2].filter(v => v !== null); const mn = all.length ? Math.min(...all) : -0.05; const mx = all.length ? Math.max(...all) : 0.05; const range = (mx - mn) || 0.01; const rawStep = range / 5; const mag = Math.pow(10, Math.floor(Math.log10(rawStep))); const norm = rawStep / mag; const step = (norm <= 1 ? 1 : norm <= 2 ? 2 : norm <= 5 ? 5 : 10) * mag; return { min: Math.floor(mn / step) * step, max: Math.ceil(mx / step) * step, step }; }

function renderChart(rows) { const labels = rows.map(r => r.date); const rhpiVals = rows.map(r => { const v = parseFloat(r.index_sa_roll3mth_mom); return isNaN(v) ? null : v; }); const csVals = rows.map(r => { const v = parseFloat(r.cs_index_sa_mom); return isNaN(v) ? null : v; }); const bounds = pctBounds(rhpiVals, csVals); setHeadline(rows, rhpiVals);

const ttRow = (l, v) => `<div class="rhpimr-tt-grid"><span class="rhpimr-tt-label">${l}<span class="rhpimr-tt-value">${v}