Skip to content

Commit 2919b2b

Browse files
dshkolclaude
andcommitted
Add data validation, archive pages, and Manufacturing support
Pipeline improvements: - Add comprehensive data validation to R script (freshness, continuity, outliers, required fields, value ranges) - Add pre-generation validation to Python generator with --strict and --validate-only modes - Add Manufacturing Sales table type detection to R script - Add Manufacturing support to Python generator (headline, slug, lede, note) Site improvements: - Add archive pages with date/indicator filtering (EN/FR) - Add archive links to index pages - Fix GDP data inconsistency in index pages (was "up 0.2%", should be "down 0.3%") - Remove duplicate French CPI article (ipc-november-2025) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3143565 commit 2919b2b

9 files changed

Lines changed: 1025 additions & 272 deletions

File tree

docs/en/archive.md

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
---
2+
title: Archive
3+
toc: false
4+
---
5+
6+
# Article Archive
7+
8+
Browse all releases by date or indicator type.
9+
10+
```js
11+
// Article data - all published releases
12+
const articles = [
13+
{
14+
title: "Airline passengers up 2.2% in October 2025",
15+
slug: "airline-passengers-october-2025",
16+
date: "2025-12-23",
17+
table: "23-10-0079",
18+
indicator: "Transport",
19+
summary: "Major Canadian airlines carried 7.1 million passengers in October 2025, up 2.2% year over year."
20+
},
21+
{
22+
title: "Consumer prices up 2.2% year over year in November 2025",
23+
slug: "cpi-november-2025",
24+
date: "2025-12-22",
25+
table: "18-10-0004",
26+
indicator: "Prices",
27+
summary: "The Consumer Price Index rose 2.2% in November compared with the same month a year earlier."
28+
},
29+
{
30+
title: "Retail sales down 0.2% in October 2025",
31+
slug: "retail-trade-october-2025",
32+
date: "2025-12-20",
33+
table: "20-10-0008",
34+
indicator: "Trade",
35+
summary: "Retail sales decreased 0.2% to $67.0 billion in October 2025."
36+
},
37+
{
38+
title: "New housing prices unchanged in November 2025",
39+
slug: "new-housing-price-index-november-2025",
40+
date: "2025-12-19",
41+
table: "18-10-0205",
42+
indicator: "Housing",
43+
summary: "The New Housing Price Index was unchanged (0.0%) in November 2025."
44+
},
45+
{
46+
title: "Housing starts at 254,058 units in November 2025",
47+
slug: "housing-starts-november-2025",
48+
date: "2025-12-19",
49+
table: "34-10-0158",
50+
indicator: "Housing",
51+
summary: "Housing starts rose 9.4% to a seasonally adjusted annual rate of 254,058 units."
52+
},
53+
{
54+
title: "Real GDP down 0.3% in October 2025",
55+
slug: "gdp-october-2025",
56+
date: "2025-12-23",
57+
table: "36-10-0434",
58+
indicator: "GDP",
59+
summary: "Real gross domestic product decreased 0.3% in October 2025."
60+
},
61+
{
62+
title: "Merchandise exports up 6.3% in October 2025",
63+
slug: "trade-october-2025",
64+
date: "2025-12-18",
65+
table: "12-10-0011",
66+
indicator: "Trade",
67+
summary: "Merchandise exports increased 6.3% to $64.2 billion in October 2025."
68+
},
69+
{
70+
title: "Building permits down 3.4% in October 2025",
71+
slug: "building-permits-october-2025",
72+
date: "2025-12-17",
73+
table: "34-10-0066",
74+
indicator: "Housing",
75+
summary: "The total value of building permits decreased 3.4% to $11.8 billion."
76+
},
77+
{
78+
title: "Gasoline prices up 1.7% in November 2025",
79+
slug: "gasoline-prices-november-2025",
80+
date: "2025-12-15",
81+
table: "18-10-0001",
82+
indicator: "Prices",
83+
summary: "Average gasoline prices rose 1.7% to 139.6 cents per litre in November 2025."
84+
},
85+
{
86+
title: "Wholesale sales up 0.1% in October 2025",
87+
slug: "wholesale-trade-october-2025",
88+
date: "2025-12-12",
89+
table: "20-10-0003",
90+
indicator: "Trade",
91+
summary: "Wholesale sales increased 0.1% to $86.0 billion in October 2025."
92+
},
93+
{
94+
title: "Employment up 54,000 in November 2025",
95+
slug: "lfs-november-2025",
96+
date: "2025-12-05",
97+
table: "14-10-0287",
98+
indicator: "Labour",
99+
summary: "Employment rose by 54,000 in November 2025, and the unemployment rate fell to 6.5%."
100+
}
101+
];
102+
103+
// Get unique months and indicators for filters
104+
const months = [...new Set(articles.map(a => a.date.slice(0, 7)))].sort().reverse();
105+
const indicators = [...new Set(articles.map(a => a.indicator))].sort();
106+
```
107+
108+
```js
109+
// Filter controls
110+
const monthFilter = view(Inputs.select(
111+
["All months", ...months],
112+
{label: "Month", value: "All months"}
113+
));
114+
115+
const indicatorFilter = view(Inputs.select(
116+
["All indicators", ...indicators],
117+
{label: "Indicator", value: "All indicators"}
118+
));
119+
```
120+
121+
```js
122+
// Apply filters
123+
const filteredArticles = articles.filter(a => {
124+
const matchMonth = monthFilter === "All months" || a.date.startsWith(monthFilter);
125+
const matchIndicator = indicatorFilter === "All indicators" || a.indicator === indicatorFilter;
126+
return matchMonth && matchIndicator;
127+
});
128+
```
129+
130+
<div class="article-count">
131+
132+
Showing **${filteredArticles.length}** of ${articles.length} articles
133+
134+
</div>
135+
136+
```js
137+
// Render filtered articles
138+
display(html`
139+
<div class="archive-list">
140+
${filteredArticles.map(a => html`
141+
<div class="archive-item">
142+
<a href="/en/${a.slug}/" class="archive-title">${a.title}</a>
143+
<div class="archive-meta">
144+
<span class="archive-date">${a.date}</span>
145+
<span class="archive-indicator">${a.indicator}</span>
146+
<span class="archive-table">Table ${a.table}</span>
147+
</div>
148+
<p class="archive-summary">${a.summary}</p>
149+
</div>
150+
`)}
151+
</div>
152+
`);
153+
```
154+
155+
<style>
156+
.article-count {
157+
margin: 1.5rem 0;
158+
padding: 0.75rem 1rem;
159+
background: #f5f5f5;
160+
border-radius: 4px;
161+
}
162+
163+
.archive-list {
164+
display: flex;
165+
flex-direction: column;
166+
gap: 1.5rem;
167+
}
168+
169+
.archive-item {
170+
padding-bottom: 1.5rem;
171+
border-bottom: 1px solid #eee;
172+
}
173+
174+
.archive-title {
175+
font-size: 1.1rem;
176+
font-weight: 600;
177+
color: #AF3C43;
178+
text-decoration: none;
179+
}
180+
181+
.archive-title:hover {
182+
text-decoration: underline;
183+
}
184+
185+
.archive-meta {
186+
display: flex;
187+
gap: 1rem;
188+
margin-top: 0.5rem;
189+
font-size: 0.875rem;
190+
color: #666;
191+
}
192+
193+
.archive-indicator {
194+
background: #AF3C43;
195+
color: white;
196+
padding: 0.1rem 0.5rem;
197+
border-radius: 3px;
198+
font-size: 0.75rem;
199+
}
200+
201+
.archive-table {
202+
font-family: monospace;
203+
}
204+
205+
.archive-summary {
206+
margin-top: 0.5rem;
207+
color: #333;
208+
font-size: 0.95rem;
209+
}
210+
</style>

docs/en/cpi-november-2025/index.md

Lines changed: 39 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,41 @@
11
---
22
title: Consumer prices up 2.2% year over year in November 2025
3-
toc: false
43
---
54

65
# Consumer prices up 2.2% year over year in November 2025
76

8-
<p class="release-date">Released: December 22, 2025 <span class="article-type-tag release">New Release</span></p>
7+
<p class="release-date">Released: 2025-12-25</p>
8+
9+
<div class="metric-box">
10+
<div class="value">+2.2%</div>
11+
<div class="label">Year-over-year change in Consumer Price Index, November 2025</div>
12+
</div>
13+
14+
The Consumer Price Index (CPI) rose 2.2% in November 2025 compared with the same month a year earlier. The index stood at 165.4, up from 161.8 in November 2024. On a monthly basis, prices increased 0.1% from October 2025.
915

1016
<div class="highlights">
1117

1218
**Highlights**
1319

14-
- The Consumer Price Index rose 2.2% year over year in November 2025, matching the increase in October
15-
- Grocery prices rose 4.2%, driven by beef (+17.7%) and coffee (+27.8%)
16-
- Lower prices for travel tours and slower rent growth put downward pressure on the CPI
17-
- Manitoba led provincial increases at 3.3%; Prince Edward Island lowest at 1.4%
20+
- The Consumer Price Index rose 2.2% year over year in November 2025
21+
- Food costs increased 4.2%, the largest contributor to inflation
22+
- Household operations, furnishings and equipment prices rose 3.3% compared to November last year
23+
- Manitoba recorded the highest increase at 3.3%
1824

1925
</div>
2026

21-
The Consumer Price Index (CPI) rose 2.2% on a year-over-year basis in November 2025, matching the increase in October. The index stood at 165.4, up from 161.8 a year earlier.
22-
23-
Lower prices for travel tours and traveller accommodation, in addition to slower growth for rent prices, put downward pressure on the all-items CPI. Offsetting this were higher prices for goods, driven by price increases for groceries as well as a smaller decline for gasoline prices.
24-
25-
Excluding gasoline, the CPI rose 2.6% for the third consecutive month.
27+
## Year-over-year inflation trend
2628

2729
```js
2830
import * as Plot from "npm:@observablehq/plot";
2931

30-
// Real data from Statistics Canada Table 18-10-0004
31-
const cpiData = [
32-
{date: new Date("2023-12"), value: 158.3},
33-
{date: new Date("2024-01"), value: 158.3},
34-
{date: new Date("2024-02"), value: 158.8},
35-
{date: new Date("2024-03"), value: 159.8},
36-
{date: new Date("2024-04"), value: 160.6},
37-
{date: new Date("2024-05"), value: 161.5},
38-
{date: new Date("2024-06"), value: 161.4},
39-
{date: new Date("2024-07"), value: 162.1},
40-
{date: new Date("2024-08"), value: 161.8},
41-
{date: new Date("2024-09"), value: 161.1},
42-
{date: new Date("2024-10"), value: 161.8},
43-
{date: new Date("2024-11"), value: 161.8},
44-
{date: new Date("2024-12"), value: 161.2},
45-
{date: new Date("2025-01"), value: 161.3},
46-
{date: new Date("2025-02"), value: 163.0},
47-
{date: new Date("2025-03"), value: 163.5},
48-
{date: new Date("2025-04"), value: 163.4},
49-
{date: new Date("2025-05"), value: 164.3},
50-
{date: new Date("2025-06"), value: 164.4},
51-
{date: new Date("2025-07"), value: 164.9},
52-
{date: new Date("2025-08"), value: 164.8},
53-
{date: new Date("2025-09"), value: 164.9},
54-
{date: new Date("2025-10"), value: 165.3},
55-
{date: new Date("2025-11"), value: 165.4}
56-
];
57-
58-
display(Plot.plot({
59-
title: "Consumer Price Index, December 2023 to November 2025",
60-
width: 680,
61-
height: 300,
62-
y: {grid: true, label: "↑ Index (2002=100)"},
63-
x: {type: "utc", label: null},
64-
marks: [
65-
Plot.lineY(cpiData, {x: "date", y: "value", stroke: "#AF3C43", strokeWidth: 2}),
66-
Plot.dot(cpiData.slice(-1), {x: "date", y: "value", fill: "#AF3C43", r: 5}),
67-
Plot.text(cpiData.slice(-1), {x: "date", y: "value", text: d => d.value.toFixed(1), dy: -12, fill: "#AF3C43", fontWeight: 600})
68-
]
69-
}));
70-
```
71-
72-
## Year-over-year inflation trend
73-
74-
```js
75-
// Real YoY inflation rates calculated from Table 18-10-0004
7632
const inflationData = [
77-
{date: new Date("2025-06"), rate: 1.9}, // 164.4 vs 161.4
78-
{date: new Date("2025-07"), rate: 1.7}, // 164.9 vs 162.1
79-
{date: new Date("2025-08"), rate: 1.9}, // 164.8 vs 161.8
80-
{date: new Date("2025-09"), rate: 2.4}, // 164.9 vs 161.1
81-
{date: new Date("2025-10"), rate: 2.2}, // 165.3 vs 161.8
82-
{date: new Date("2025-11"), rate: 2.2} // 165.4 vs 161.8
33+
{date: new Date("2025-06"), rate: 1.9},
34+
{date: new Date("2025-07"), rate: 1.7},
35+
{date: new Date("2025-08"), rate: 1.9},
36+
{date: new Date("2025-09"), rate: 2.4},
37+
{date: new Date("2025-10"), rate: 2.2},
38+
{date: new Date("2025-11"), rate: 2.2}
8339
];
8440

8541
display(Plot.plot({
@@ -97,11 +53,11 @@ display(Plot.plot({
9753
}));
9854
```
9955

100-
## Grocery price inflation accelerates
56+
## Prices by major component
10157

102-
Prices for food purchased from stores rose 4.2% year over year in November, the largest increase since late 2023. The main contributors to the acceleration were fresh fruit (+4.4%), led by higher prices for berries, and other food preparations (+6.6%).
58+
Among the eight major components of the CPI, food prices showed the largest year-over-year increase at 4.2%. Mortgage interest costs and rent continued to put upward pressure on this category.
10359

104-
Prices for fresh or frozen beef (+17.7%) and coffee (+27.8%) continued to be significant contributors to overall grocery inflation on an annual basis. Higher beef prices have been driven, in part, by lower cattle inventories in North America. Coffee prices have been impacted by adverse weather conditions in growing regions and rose amid American tariffs on coffee-producing countries.
60+
Food prices rose 4.2%.
10561

10662
```js
10763
const components = [
@@ -117,9 +73,9 @@ const components = [
11773

11874
display(Plot.plot({
11975
title: "Year-over-year change by component (%)",
120-
width: 700,
76+
width: 640,
12177
height: 320,
122-
marginLeft: 340,
78+
marginLeft: 140,
12379
x: {domain: [-1, 5], grid: true, label: "Percent change"},
12480
y: {label: null},
12581
marks: [
@@ -141,26 +97,22 @@ display(Plot.plot({
14197
}));
14298
```
14399

144-
## Regional highlights
145-
146-
On an annual basis in November, prices rose at a faster pace in five provinces, were unchanged in two, and rose at a slower pace in the remaining three compared with October.
147-
148-
Of all the provinces, prices accelerated the most in Manitoba, rising 3.3% year over year in November—the highest provincial rate. Higher shelter costs, particularly mortgage interest, were a key driver. At the other end, Prince Edward Island recorded the slowest increase at 1.4%, well below the national average of 2.2%.
100+
## Provincial variation
149101

150-
Quebec (+3.0%) and New Brunswick (+2.7%) also exceeded the national rate, while Ontario (+1.9%) and Alberta (+1.9%) remained below it. The 1.9 percentage point spread between Manitoba and Prince Edward Island reflects significant regional variation in inflation pressures across the country.
102+
Price increases varied across provinces and territories. Manitoba recorded the highest year-over-year increase at 3.3%, driven by rising shelter and transportation costs. Prince Edward Island showed the lowest increase at 1.4%.
151103

152-
| Province | Year-over-year change | vs. National |
153-
|----------|----------------------|--------------|
154-
| Manitoba | +3.3% | +1.1 pp |
155-
| Quebec | +3.0% | +0.8 pp |
156-
| New Brunswick | +2.7% | +0.5 pp |
157-
| Nova Scotia | +2.4% | +0.2 pp |
158-
| Newfoundland and Labrador | +2.2% ||
159-
| Saskatchewan | +2.1% | -0.1 pp |
160-
| British Columbia | +2.0% | -0.2 pp |
161-
| Ontario | +1.9% | -0.3 pp |
162-
| Alberta | +1.9% | -0.3 pp |
163-
| Prince Edward Island | +1.4% | -0.8 pp |
104+
| Province | Year-over-year change |
105+
|----------|----------------------|
106+
| Manitoba | +3.3% |
107+
| Quebec | +3.0% |
108+
| New Brunswick | +2.7% |
109+
| Nova Scotia | +2.4% |
110+
| Newfoundland and Labrador | +2.2% |
111+
| Saskatchewan | +2.1% |
112+
| British Columbia | +2.0% |
113+
| Ontario | +1.9% |
114+
| Alberta | +1.9% |
115+
| Prince Edward Island | +1.4% |
164116

165117
<div class="note-to-readers">
166118

@@ -174,9 +126,8 @@ The CPI is not seasonally adjusted. Month-to-month movements can reflect seasona
174126

175127
<div class="source-info">
176128

177-
**Source:** Statistics Canada, [Table 18-10-0004](https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000401)
129+
**Source:** Statistics Canada, Table 18-10-0004
178130
**Survey:** Consumer Price Index
179131
**Reference period:** November 2025
180-
**DOI:** [https://doi.org/10.25318/1810000401-eng](https://doi.org/10.25318/1810000401-eng)
181132

182133
</div>

0 commit comments

Comments
 (0)