Skip to content

Commit 0f84041

Browse files
dshkolclaude
andcommitted
Add historical CPI articles and ref-date support in generator
New features: - Added --ref-date option to generator for creating articles from historical periods in time series data - Implemented rebase_data_to_period() function to adjust data to older reference periods New articles (EN/FR pairs): - CPI October 2025 - CPI September 2025 - CPI August 2025 - CPI July 2025 Also updated: - Feed pages with historical articles - Language slug mapping 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8480411 commit 0f84041

12 files changed

Lines changed: 1215 additions & 3 deletions

File tree

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

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: Consumer prices up 1.9% year over year in August 2025
3+
---
4+
5+
# Consumer prices up 1.9% year over year in August 2025
6+
7+
<p class="release-date">Released: 2025-12-25</p>
8+
9+
<div class="metric-box">
10+
<div class="value">+1.9%</div>
11+
<div class="label">Year-over-year change in Consumer Price Index, August 2025</div>
12+
</div>
13+
14+
The Consumer Price Index (CPI) rose 1.9% in August 2025 compared with the same month a year earlier. The index stood at 164.8, up from 161.8 in November 2024. On a monthly basis, prices decreased 0.1% from October 2025.
15+
16+
<div class="highlights">
17+
18+
**Highlights**
19+
20+
- The Consumer Price Index rose 1.9% year over year in August 2025
21+
- Food costs increased 4.2%, the largest contributor to inflation
22+
- Household operations, furnishings and equipment prices rose 3.3% compared to August last year
23+
- Manitoba recorded the highest increase at 3.3%
24+
25+
</div>
26+
27+
## Year-over-year inflation trend
28+
29+
```js
30+
import * as Plot from "npm:@observablehq/plot";
31+
32+
const inflationData = [
33+
{date: new Date("2025-03"), rate: 2.3},
34+
{date: new Date("2025-04"), rate: 1.7},
35+
{date: new Date("2025-05"), rate: 1.7},
36+
{date: new Date("2025-06"), rate: 1.9},
37+
{date: new Date("2025-07"), rate: 1.7},
38+
{date: new Date("2025-08"), rate: 1.9}
39+
];
40+
41+
display(Plot.plot({
42+
title: "Year-over-year inflation rate (%)",
43+
width: 640,
44+
height: 280,
45+
y: {domain: [0, 4], grid: true, label: "Percent"},
46+
x: {type: "utc", label: null},
47+
marks: [
48+
Plot.ruleY([0]),
49+
Plot.ruleY([1, 3], {stroke: "#ddd", strokeDasharray: "4,4"}),
50+
Plot.lineY(inflationData, {x: "date", y: "rate", stroke: "#AF3C43", strokeWidth: 2}),
51+
Plot.dot(inflationData, {x: "date", y: "rate", fill: "#AF3C43", r: 4})
52+
]
53+
}));
54+
```
55+
56+
## Prices by major component
57+
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.
59+
60+
Food prices rose 4.2%.
61+
62+
```js
63+
const components = [
64+
{name: "Food", change: 4.2},
65+
{name: "Household operations, furnishings and equipment", change: 3.3},
66+
{name: "Health and personal care", change: 3.0},
67+
{name: "Shelter", change: 2.3},
68+
{name: "Alcoholic beverages, tobacco products and recreational cannabis", change: 1.4},
69+
{name: "Clothing and footwear", change: 0.8},
70+
{name: "Transportation", change: 0.7},
71+
{name: "Recreation, education and reading", change: 0.4}
72+
];
73+
74+
display(Plot.plot({
75+
title: "Year-over-year change by component (%)",
76+
width: 640,
77+
height: 320,
78+
marginLeft: 140,
79+
x: {domain: [-1, 5], grid: true, label: "Percent change"},
80+
y: {label: null},
81+
marks: [
82+
Plot.ruleX([0]),
83+
Plot.barX(components, {
84+
y: "name",
85+
x: "change",
86+
fill: d => d.change >= 0 ? "#AF3C43" : "#2e7d32",
87+
sort: {y: "-x"}
88+
}),
89+
Plot.text(components, {
90+
y: "name",
91+
x: "change",
92+
text: d => d.change.toFixed(1) + "%",
93+
dx: 20,
94+
fill: "currentColor"
95+
})
96+
]
97+
}));
98+
```
99+
100+
## Provincial variation
101+
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%.
103+
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% |
116+
117+
<div class="note-to-readers">
118+
119+
## Note to readers
120+
121+
The Consumer Price Index measures the rate of price change experienced by Canadian consumers. It is calculated by comparing the cost of a fixed basket of goods and services purchased by consumers over time.
122+
123+
The CPI is not seasonally adjusted. Month-to-month movements can reflect seasonal patterns in addition to underlying price trends.
124+
125+
</div>
126+
127+
<div class="source-info">
128+
129+
**Source:** Statistics Canada, Table 18-10-0004
130+
**Survey:** Consumer Price Index
131+
**Reference period:** August 2025
132+
133+
</div>

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

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: Consumer prices up 1.7% year over year in July 2025
3+
---
4+
5+
# Consumer prices up 1.7% year over year in July 2025
6+
7+
<p class="release-date">Released: 2025-12-25</p>
8+
9+
<div class="metric-box">
10+
<div class="value">+1.7%</div>
11+
<div class="label">Year-over-year change in Consumer Price Index, July 2025</div>
12+
</div>
13+
14+
The Consumer Price Index (CPI) rose 1.7% in July 2025 compared with the same month a year earlier. The index stood at 164.9, up from 161.8 in November 2024. On a monthly basis, prices increased 0.3% from October 2025.
15+
16+
<div class="highlights">
17+
18+
**Highlights**
19+
20+
- The Consumer Price Index rose 1.7% year over year in July 2025
21+
- Food costs increased 4.2%, the largest contributor to inflation
22+
- Household operations, furnishings and equipment prices rose 3.3% compared to July last year
23+
- Manitoba recorded the highest increase at 3.3%
24+
25+
</div>
26+
27+
## Year-over-year inflation trend
28+
29+
```js
30+
import * as Plot from "npm:@observablehq/plot";
31+
32+
const inflationData = [
33+
{date: new Date("2025-02"), rate: 2.6},
34+
{date: new Date("2025-03"), rate: 2.3},
35+
{date: new Date("2025-04"), rate: 1.7},
36+
{date: new Date("2025-05"), rate: 1.7},
37+
{date: new Date("2025-06"), rate: 1.9},
38+
{date: new Date("2025-07"), rate: 1.7}
39+
];
40+
41+
display(Plot.plot({
42+
title: "Year-over-year inflation rate (%)",
43+
width: 640,
44+
height: 280,
45+
y: {domain: [0, 4], grid: true, label: "Percent"},
46+
x: {type: "utc", label: null},
47+
marks: [
48+
Plot.ruleY([0]),
49+
Plot.ruleY([1, 3], {stroke: "#ddd", strokeDasharray: "4,4"}),
50+
Plot.lineY(inflationData, {x: "date", y: "rate", stroke: "#AF3C43", strokeWidth: 2}),
51+
Plot.dot(inflationData, {x: "date", y: "rate", fill: "#AF3C43", r: 4})
52+
]
53+
}));
54+
```
55+
56+
## Prices by major component
57+
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.
59+
60+
Food prices rose 4.2%.
61+
62+
```js
63+
const components = [
64+
{name: "Food", change: 4.2},
65+
{name: "Household operations, furnishings and equipment", change: 3.3},
66+
{name: "Health and personal care", change: 3.0},
67+
{name: "Shelter", change: 2.3},
68+
{name: "Alcoholic beverages, tobacco products and recreational cannabis", change: 1.4},
69+
{name: "Clothing and footwear", change: 0.8},
70+
{name: "Transportation", change: 0.7},
71+
{name: "Recreation, education and reading", change: 0.4}
72+
];
73+
74+
display(Plot.plot({
75+
title: "Year-over-year change by component (%)",
76+
width: 640,
77+
height: 320,
78+
marginLeft: 140,
79+
x: {domain: [-1, 5], grid: true, label: "Percent change"},
80+
y: {label: null},
81+
marks: [
82+
Plot.ruleX([0]),
83+
Plot.barX(components, {
84+
y: "name",
85+
x: "change",
86+
fill: d => d.change >= 0 ? "#AF3C43" : "#2e7d32",
87+
sort: {y: "-x"}
88+
}),
89+
Plot.text(components, {
90+
y: "name",
91+
x: "change",
92+
text: d => d.change.toFixed(1) + "%",
93+
dx: 20,
94+
fill: "currentColor"
95+
})
96+
]
97+
}));
98+
```
99+
100+
## Provincial variation
101+
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%.
103+
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% |
116+
117+
<div class="note-to-readers">
118+
119+
## Note to readers
120+
121+
The Consumer Price Index measures the rate of price change experienced by Canadian consumers. It is calculated by comparing the cost of a fixed basket of goods and services purchased by consumers over time.
122+
123+
The CPI is not seasonally adjusted. Month-to-month movements can reflect seasonal patterns in addition to underlying price trends.
124+
125+
</div>
126+
127+
<div class="source-info">
128+
129+
**Source:** Statistics Canada, Table 18-10-0004
130+
**Survey:** Consumer Price Index
131+
**Reference period:** July 2025
132+
133+
</div>

0 commit comments

Comments
 (0)