Remediate economic-context contract gaps in 2026-04-20/21 English articles#1937
Remediate economic-context contract gaps in 2026-04-20/21 English articles#1937
Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
…cles Agent-Logs-Url: https://github.com/Hack23/riksdagsmonitor/sessions/11f70692-a69a-4013-b53b-fe3269f46cc0 Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
Remediates Economic Context contract gaps for recent English news outputs by restoring chart markers/runtime includes and replacing a malformed per-article economic artifact so the economic-context audit/validator can pass for the affected dates and article types.
Changes:
- Replaced
analysis/daily/2026-04-21/evening-analysis/economic-data.jsonwith a v2-style structure containingpolicyDomains, non-emptydataPoints,commentary, and structuredsource. - Added “Economic Context” dashboard sections with
data-chart-configcanvases and Chart.js runtime initialisation includes to 2026-04-21 pages. - Added
data-chart-configattributes to existing canvases in 2026-04-20 evening analysis to satisfy chart-count detection.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| news/2026-04-21-government-propositions-en.html | Adds Economic Context section (2+ charts), attribution text, and Chart.js runtime includes. |
| news/2026-04-21-evening-analysis-en.html | Adds Economic Context section (charts + table), attribution text, and Chart.js runtime includes. |
| news/2026-04-20-evening-analysis-en.html | Adds data-chart-config markers to existing config-id canvases for validator compatibility. |
| analysis/daily/2026-04-21/evening-analysis/economic-data.json | Replaces malformed artifact with contract-shaped v2 economic context JSON. |
| </div> | ||
| <div class="dashboard-chart-wrapper"> | ||
| <canvas id="econ-trend-se-unemployment" role="img" aria-label="Sweden: Unemployment Rate Trend" data-chart-config-id="econ-trend-se-unemployment-config"></canvas> | ||
| <canvas id="econ-trend-se-unemployment" role="img" aria-label="Sweden: Unemployment Rate Trend" data-chart-config-id="econ-trend-se-unemployment-config" data-chart-config="{"type":"line","data":{"labels":["2023","2024","2025"],"datasets":[{"label":"Sweden Unemployment Rate (% of labor force)","data":[7.611,8.4,8.694],"backgroundColor":"rgba(0, 217, 255, 0.2)","borderColor":"#00d9ff","borderWidth":2,"tension":0.3,"pointRadius":4,"pointHoverRadius":6,"fill":true}]},"options":{"responsive":true,"maintainAspectRatio":true}}"></canvas> |
There was a problem hiding this comment.
This canvas already has data-chart-config-id referencing a full JSON config, but the change duplicates a full config again in data-chart-config. Because chart-init.js prefers data-chart-config-id when present, this duplication only increases HTML size and can drift out of sync. Consider using a minimal valid JSON marker for data-chart-config (to satisfy the validator’s count) instead of repeating the full config blob.
| <canvas id="econ-trend-se-unemployment" role="img" aria-label="Sweden: Unemployment Rate Trend" data-chart-config-id="econ-trend-se-unemployment-config" data-chart-config="{"type":"line","data":{"labels":["2023","2024","2025"],"datasets":[{"label":"Sweden Unemployment Rate (% of labor force)","data":[7.611,8.4,8.694],"backgroundColor":"rgba(0, 217, 255, 0.2)","borderColor":"#00d9ff","borderWidth":2,"tension":0.3,"pointRadius":4,"pointHoverRadius":6,"fill":true}]},"options":{"responsive":true,"maintainAspectRatio":true}}"></canvas> | |
| <canvas id="econ-trend-se-unemployment" role="img" aria-label="Sweden: Unemployment Rate Trend" data-chart-config-id="econ-trend-se-unemployment-config" data-chart-config="{}"></canvas> |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 0.82, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "DNK", "countryName": "Denmark", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 3.478, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "NOR", "countryName": "Norway", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 2.097, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "FIN", "countryName": "Finland", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 0.416, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2025", "value": 8.694, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2024", "value": 8.4, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2023", "value": 7.611, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "indicatorName": "Inflation Rate", "date": "2024", "value": 2.836, "provider": "worldBank", "projection": false }, | ||
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "indicatorName": "Inflation Rate", "date": "2023", "value": 8.549, "provider": "worldBank", "projection": false } |
There was a problem hiding this comment.
economic-data.json is not schema-compliant: each dataPoints[] entry includes extra keys like indicatorName, but analysis/schemas/economic-data.schema.json sets dataPoints.items.additionalProperties=false and does not allow indicatorName. This will fail any JSON-schema validation of economic artifacts. Remove unsupported fields from each data point (keep only the schema-defined keys), or update the schema+all producers/consumers if indicatorName is intended to be part of the contract.
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 0.82, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "DNK", "countryName": "Denmark", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 3.478, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "NOR", "countryName": "Norway", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 2.097, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "FIN", "countryName": "Finland", "indicatorId": "NY.GDP.MKTP.KD.ZG", "indicatorName": "GDP Growth Rate", "date": "2024", "value": 0.416, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2025", "value": 8.694, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2024", "value": 8.4, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "indicatorName": "Unemployment Rate", "date": "2023", "value": 7.611, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "indicatorName": "Inflation Rate", "date": "2024", "value": 2.836, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "indicatorName": "Inflation Rate", "date": "2023", "value": 8.549, "provider": "worldBank", "projection": false } | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "NY.GDP.MKTP.KD.ZG", "date": "2024", "value": 0.82, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "DNK", "countryName": "Denmark", "indicatorId": "NY.GDP.MKTP.KD.ZG", "date": "2024", "value": 3.478, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "NOR", "countryName": "Norway", "indicatorId": "NY.GDP.MKTP.KD.ZG", "date": "2024", "value": 2.097, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "FIN", "countryName": "Finland", "indicatorId": "NY.GDP.MKTP.KD.ZG", "date": "2024", "value": 0.416, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "date": "2025", "value": 8.694, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "date": "2024", "value": 8.4, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "SL.UEM.TOTL.ZS", "date": "2023", "value": 7.611, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "date": "2024", "value": 2.836, "provider": "worldBank", "projection": false }, | |
| { "countryCode": "SWE", "countryName": "Sweden", "indicatorId": "FP.CPI.TOTL.ZG", "date": "2023", "value": 8.549, "provider": "worldBank", "projection": false } |
| <tr><td>Finland</td><td>0.42</td><td>% annual</td></tr> | ||
| </tbody> | ||
| </table> | ||
| <p class="dashboard-attribution">Data by IMF / World Bank / SCB — World Bank indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> |
There was a problem hiding this comment.
The attribution text claims the dashboard data is “by IMF / World Bank / SCB”, but the companion economic artifact for this date/type indicates only World Bank indicators were sourced (with SCB/IMF empty). Please align the on-page attribution to the actual sources used (e.g., mention World Bank only unless IMF/SCB are present in the artifact).
| <p class="dashboard-attribution">Data by IMF / World Bank / SCB — World Bank indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> | |
| <p class="dashboard-attribution">Data by World Bank — indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> |
| <div class="dashboard-chart-wrapper"> | ||
| <canvas id="econ-2026-04-21-propositions-macro" role="img" aria-label="Sweden Inflation and Unemployment" data-chart-config="{"type":"bar","data":{"labels":["Unemployment 2024","Unemployment 2025","Inflation 2023","Inflation 2024"],"datasets":[{"label":"Percent","data":[8.4,8.694,8.549,2.836],"backgroundColor":["#ff006e","#ffbe0b","#00d9ff","#83cf39"],"borderColor":["#d4004e","#d4a00b","#00b8d4","#6daf2d"],"borderWidth":1}]},"options":{"responsive":true,"maintainAspectRatio":true}}"></canvas> | ||
| </div> | ||
| <p class="dashboard-attribution">Data by IMF / World Bank / SCB — World Bank indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> |
There was a problem hiding this comment.
The attribution text claims the dashboard data is “by IMF / World Bank / SCB”, but the associated analysis/daily/2026-04-21/propositions/economic-data.json sources only list World Bank indicators (SCB is empty and there’s no IMF field in the v1 artifact). Please make the on-page attribution reflect the actual sources used, or update the artifact to include the cited sources.
| <p class="dashboard-attribution">Data by IMF / World Bank / SCB — World Bank indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> | |
| <p class="dashboard-attribution">Data by World Bank — indicators NY.GDP.MKTP.KD.ZG, SL.UEM.TOTL.ZS, FP.CPI.TOTL.ZG.</p> |
| <p class="dashboard-summary">Sweden's 0.82% GDP growth in 2024 — the weakest in five years — provides the fiscal backdrop against which today's Riksrevisionen agricultural-climate indictment (HD01MJU21) and the Social Democrats' eight-question opposition barrage must be read. Denmark's 3.48% growth and Norway's 2.10% in 2024 highlight the Nordic gap that constrains Sweden's room for additional climate-transition spending, even as the audit body finds current state efforts insufficient. Elevated Swedish unemployment at 8.69% in 2025 — up from 7.61% in 2023 — both heightens political pressure on the Tidö coalition and, paradoxically, supplies a labour pool for the HD03237 paid-police-training proposition aimed at the 10,000-officer target. Inflation, which peaked at 8.55% in 2023, has normalised to 2.84% in 2024, removing the acute cost-of-living shock but leaving households with a cumulative price-level gap that amplifies the electoral salience of fuel-tax and energy-support debates ahead of the September 2026 election.</p> | ||
| <div class="dashboard-chart-wrapper"> | ||
| <canvas id="econ-nordic-gdp-growth-2024" role="img" aria-label="Nordic GDP Growth (2024)" data-chart-config-id="econ-nordic-gdp-growth-2024-config"></canvas> | ||
| <canvas id="econ-nordic-gdp-growth-2024" role="img" aria-label="Nordic GDP Growth (2024)" data-chart-config-id="econ-nordic-gdp-growth-2024-config" data-chart-config="{"type":"bar","data":{"labels":["Sweden","Denmark","Norway","Finland"],"datasets":[{"label":"GDP Growth (% annual, 2024)","data":[0.82,3.478,2.097,0.416],"backgroundColor":["#00d9ff","#ff006e","#ffbe0b","#83cf39"],"borderColor":["#00b8d4","#d4004e","#d4a00b","#6daf2d"],"borderWidth":1}]},"options":{"responsive":true,"maintainAspectRatio":true}}"></canvas> |
There was a problem hiding this comment.
This canvas already has data-chart-config-id referencing a full JSON config, but the change duplicates a full config again in data-chart-config. Because chart-init.js prefers data-chart-config-id when present, this duplication only increases HTML size and can drift out of sync. Consider using a minimal valid JSON marker for data-chart-config (to satisfy the validator’s count) instead of repeating the full config blob.
| <canvas id="econ-nordic-gdp-growth-2024" role="img" aria-label="Nordic GDP Growth (2024)" data-chart-config-id="econ-nordic-gdp-growth-2024-config" data-chart-config="{"type":"bar","data":{"labels":["Sweden","Denmark","Norway","Finland"],"datasets":[{"label":"GDP Growth (% annual, 2024)","data":[0.82,3.478,2.097,0.416],"backgroundColor":["#00d9ff","#ff006e","#ffbe0b","#83cf39"],"borderColor":["#00b8d4","#d4004e","#d4a00b","#6daf2d"],"borderWidth":1}]},"options":{"responsive":true,"maintainAspectRatio":true}}"></canvas> | |
| <canvas id="econ-nordic-gdp-growth-2024" role="img" aria-label="Nordic GDP Growth (2024)" data-chart-config-id="econ-nordic-gdp-growth-2024-config" data-chart-config="{}"></canvas> |
Daily economic-context audit flagged missing chart markers, malformed/missing economic artifact data, and missing attribution in recent English news outputs. This PR restores contract compliance for the affected
evening-analysisandgovernment-propositionspages.Economic artifact repair
analysis/daily/2026-04-21/evening-analysis/economic-data.jsonwith contract-compliant structure:version,articleType,date,policyDomainsdataPointscommentarysourceattribution (worldBank/scb/imf)2026-04-21 evening analysis: restore economic dashboard contract
data-chart-configcanvases.chart.umd+chart-init).Data by IMF / World Bank / SCB ....2026-04-21 government propositions: add required chart coverage
data-chart-configcanvases.chart.umd+chart-init).2026-04-20 evening analysis: align canvas markers with validator
data-chart-configattributes to existing canvases (while retaining existing config-id pattern) so chart count detection matches contract expectations.Example (new canvas contract marker)