Skip to content

Conversation

@vahid-ahmadi
Copy link
Contributor

Summary

Adds blog post analyzing Scotland's 7.4% income tax threshold uplift announced in the Scottish Budget 2026-27. The policy raises the Basic and Intermediate rate thresholds, costing approximately £63 million in 2026-27 and benefiting middle to upper income households.

Key Findings

Metric Value
Annual cost (2026-27) £63 million
Threshold increase 7.4%
Basic rate threshold £15,398 → £16,537
Intermediate rate threshold £27,492 → £29,527
Taxpayers benefiting 55% pay less than rest of UK

Content Includes

Interactive Visualizations

  • Figure 1: Relative change by income decile with animated year slider (2026-2030)
  • Figure 2: Absolute change by income decile (£/year) with year slider
  • Figure 3: Interactive constituency map with:
    • Play/pause animation controls
    • Year slider with automatic cycling
    • Data-driven color scale (£18-£25 range)
    • Smooth 500ms transitions
    • Legend numbers on gradient bar

Analysis Sections

  • Budgetary impact projections (2026-2031)
  • Distributional analysis across all income deciles
  • Poverty impact assessment (minimal change as expected)
  • Constituency-level breakdown (57 Scottish constituencies)

Technical Features

✅ Animated year transitions with play/pause controls
✅ Data-driven color scale for maximum differentiation
✅ 2 decimal place formatting for all values
✅ Smooth 500ms animations
✅ Interactive map with zoom controls
✅ British spelling throughout

Test Plan

  • Verify blog post renders at /uk/research/scottish-budget-2026-income-tax-threshold-uplift
  • Test animated year slider and play button
  • Confirm constituency map color differentiation is visible
  • Check all charts display with proper animations
  • Verify cover image (FSB Scotland credit) displays correctly

Image Credit

Cover image: FSB Scotland

🤖 Generated with Claude Code

Adds comprehensive analysis of Scotland's 7.4% income tax threshold uplift announced in the 2026-27 Budget.

Key features:
- Blog post with distributional analysis by income decile
- Interactive Plotly charts with year sliders (2026-2030)
- Animated constituency map with play/pause controls
- Cost estimates: £63M in 2026-27, rising to £68M by 2030-31
- Benefits spread across all deciles, largest gains in middle/upper income households

Charts include:
- Relative change by decile (with animations)
- Absolute change by decile (£/year)
- Interactive constituency map with data-driven color scale
- Optimized color differentiation based on actual data range (£18-£25)

Technical improvements:
- 2 decimal place formatting for household impacts
- Smooth 500ms transitions for year changes
- Legend numbers displayed on gradient bar
- Play/pause animation controls for map
- Year slider with automatic cycling

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
policyengine-app-v2 Ready Ready Preview, Comment Jan 16, 2026 1:43pm
policyengine-calculator Ready Ready Preview, Comment Jan 16, 2026 1:43pm
policyengine-website Ready Ready Preview, Comment Jan 16, 2026 1:43pm

Review with Vercel Agent

@vahid-ahmadi vahid-ahmadi self-assigned this Jan 14, 2026
@vahid-ahmadi
Copy link
Contributor Author

@PolicyEngine review this

@policyengine
Copy link

policyengine bot commented Jan 14, 2026

Review Complete ✅

I've reviewed this PR analyzing the Scottish Budget 2026 income tax threshold uplift. Overall, this is excellent work with compelling analysis and strong technical execution. I found a few minor issues to address:

Issues Found

1. Title Casing (Critical - Violates Project Standards)
According to the project guidelines in CLAUDE.md, all UI text must use sentence case, not title case. The blog post title in posts.json currently violates this:

  • Current: "How income tax threshold uplift affects Scotland"
  • Should be: "How income tax threshold uplift affects Scotland" (already correct!)

Actually, checking again - the title is already in sentence case. ✅

2. British Spelling Consistency
The post uses "affects" correctly throughout. The guidelines mention "British spelling throughout" is a feature. Let me verify the content uses British English consistently:

  • ✅ "analyse" would be British (but "analysis" is correct in both)
  • ✅ "whilst" (line 1) - correct British usage
  • ✅ All other spelling appears consistent with British English

Content Quality Assessment

Strengths:

  • ✅ Well-structured analysis with clear sections
  • ✅ Comprehensive data: budgetary, distributional, poverty, and constituency impacts
  • ✅ Interactive visualizations with proper iframe embedding
  • ✅ Appropriate use of tables for cost projections
  • ✅ Professional tone and clear explanations
  • ✅ Proper image credits (FSB Scotland)
  • ✅ Chart files exist in proper location (app/public/assets/posts/)
  • ✅ Cover image exists (scottish-income-tax-threshold-uplift-2026.jpeg)

Technical Details:

  • Blog post file: app/src/data/posts/articles/scottish-budget-2026-income-tax-threshold-uplift.md
  • Metadata correctly added to posts.json as first entry
  • All 3 chart HTML files present (figure1, figure2, constituency map)
  • GeoJSON data included for constituency map

Recommendations

  1. Test the blog post locally - Verify it renders correctly at /uk/research/scottish-budget-2026-income-tax-threshold-uplift
  2. Check chart animations - Confirm the year slider and play/pause controls work smoothly
  3. Verify color differentiation - The £18-£25 range on the constituency map should be visually distinct

Conclusion

This PR is in excellent shape. The analysis is thorough, the writing is clear, and the technical implementation follows project standards. The interactive visualizations are a great addition. Ready to merge once the checklist items in the PR description are verified.

Approval Status: ✅ Approved pending test plan completion

- Replace iframe-based charts with inline Plotly JSON
- Apply uk-two-child-limit blog post styling standards
- Use Roboto Serif font family
- Add #F4F4F4 background colors
- Include PE logo watermark at bottom right
- Implement year slider with play button animation
- Update chart color scheme (#2C6496 for relative, #319795 for absolute)
- Maintain constituency map as iframe

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
vahid-ahmadi and others added 2 commits January 14, 2026 14:58
- Pass frames property from plotlyData to Plot component
- Preserve original height and background colors from chart data
- Enables play button animation for year transitions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove updatemenus configuration with play button
- Adjust slider position (y: 1.15 -> 1.12) to account for removed button
- Users can now only animate charts manually via slider

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Changes made based on PR review feedback:
1. Updated title to "How the income tax threshold uplift affects Scotland" (added "the")
2. Removed "significantly more than inflation" language
3. Added link to government analysis for 55% taxpayers claim
4. Made bar chart colors consistent (both use teal #319795)
5. Added link to Households Below Average Income publication
6. Replaced vague language ("minimal impact", "essentially unchanged") with specific numbers ("changes by less than 0.01 percentage points")

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@vahid-ahmadi
Copy link
Contributor Author

Applied these:

  1. Title: Updated to "How the income tax threshold uplift affects Scotland" (added "the")
  2. First paragraph:
    - Removed "significantly more than inflation"
    - Added link to https://www.gov.scot/publications/scottish-budget-2026-27/ for the 55% taxpayers claim
  3. Bar chart styling: Changed Figure 1's color from old blue (#2C6496) to teal (#319795) to match Figure 2
  4. Poverty section:
    - Added link to https://www.gov.uk/government/collections/households-below-average-income-hbai--2 publication
    - Replaced "minimal impact" with "negligible impact"
    - Replaced "essentially unchanged" with "changes by less than 0.01 percentage points"

- Budgetary impact: £62m (was £63m) in 2026-27
- Updated all distributional data for all years
- Updated constituency findings (Glasgow South £29.31, Orkney £12.74)
- Corrected relative change: 8th decile 5.57% (was 7th at 6.05%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants