Skip to content

Instantly share code, notes, and snippets.

View MaxGhenis's full-sized avatar

Max Ghenis MaxGhenis

View GitHub Profile
@MaxGhenis
MaxGhenis / COMPARATORS.md
Created August 23, 2026 10:26
policyengine-uk-data#452/#448 diagnosis — aggregate measurement scripts and outputs (no microdata); 2026-08-22

Official council-tax comparators (public statistics, fetched 2026-08-22)

nation year measure value source
Scotland 2024-25 total council tax billed, net of Council Tax Reduction (net of discounts/exemptions; excludes water & sewerage per the series definition — confirm on page 7 "Data and Methodology") £3.077bn (£3,076,770,000) https://www.gov.scot/publications/council-tax-collection-statistics-2024-25/pages/3/
Scotland 2024-25 reduction in liability due to CTR ≈ £389m https://www.gov.scot/news/council-tax-collection-statistics-2024-25/
Scotland 2025-26 total council tax billed, net of CTR £3.389bn (£3,388,884,000); collected £3.227bn (95.2%) https://www.gov.scot/publications/council-tax-collection-statistics-2025-26/pages/3/
Wales 2024-25 collectable, excluding council tax reduction scheme £2,332m (collected £2,228m) https://www.gov.wales/council-tax-collection-rates-april-2024-march-2025-html
Wales 2025-26 collectable
@MaxGhenis
MaxGhenis / README.md
Last active May 13, 2026 20:14
PolicyEngine Social Security microdata regression investigation

Social Security microdata regression investigation

Reproducibility appendix for the PolicyEngine postmortem on social_security and social_security_retirement being dropped or ignored in microsimulation.

Files:

  • social_security_microdata_regression_investigation.ipynb: executed notebook with source-control, GitHub Actions, and PyPI evidence.
  • reproduce_social_security_microdata_regression.py: plain Python script with
@MaxGhenis
MaxGhenis / ny_supplemental_recapture_household_types.ipynb
Last active May 5, 2026 00:17
NY supplemental tax recapture cliff by household type
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / axiom_co_snap_ecps_parity.ipynb
Created May 1, 2026 16:50
Axiom Colorado SNAP eCPS parity demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""Generate hero image for the Madoff fact-check post.
Uses PolicyEngine design tokens (theme.css CSS variables).
See: @policyengine/ui-kit/theme.css
"""
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
from pathlib import Path
@MaxGhenis
MaxGhenis / wealth_tax_analysis.py
Created April 20, 2026 13:48
PolicyEngine-US Enhanced CPS analysis: do the wealthiest households appear among federal nonpayers? (Supporting analysis for https://maxghenis.com/blog/madoff-billionaire-nonpayers/)
"""Are the wealthiest U.S. households in the top 1% of federal income+payroll tax payers?
Uses PolicyEngine-US Enhanced CPS microdata. Net worth is imputed from the Federal
Reserve's Survey of Consumer Finances and caps at ~$190M in the 2026 file — true
centibillionaires are not represented.
"""
import numpy as np
import pandas as pd
from policyengine_us import Microsimulation
@MaxGhenis
MaxGhenis / v4_trace_walkthrough.executed.ipynb
Last active April 20, 2026 11:26
PolicyEngine v4 TRACE TRO walkthrough — real household calc + replicability chain
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / trace_tro_walkthrough.ipynb
Last active April 18, 2026 15:47
PolicyEngine TRACE TRO walkthrough — executed notebook showing bundle TRO, per-simulation TRO chaining, and verifier workflow per TROv 2023/05 vocabulary (PolicyEngine/policyengine.py#237)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / README.md
Last active April 11, 2026 00:21
Historical PolicyEngine US CTC reform reproduction for Nov 1 2025 package + HF snapshot

Historical PolicyEngine US CTC Reform Reproduction

This directory contains an executed notebook reproducing the reform run against the historical PolicyEngine US stack current by the end of November 1, 2025 in America/New_York.

It includes both the main credit aggregates and the federal/state/payroll tax decomposition behind the household_net_income change.

Re-execution

Run the notebook from a clean environment with:

@MaxGhenis
MaxGhenis / org_validation_2024.ipynb
Last active March 31, 2026 12:01
ORG validation for policyengine-us-data PR
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.