Skip to content

Instantly share code, notes, and snippets.

View MaxGhenis's full-sized avatar

Max Ghenis MaxGhenis

View GitHub Profile
@MaxGhenis
MaxGhenis / state_ui_child_poverty.ipynb
Created January 31, 2026 21:19
Impact of UI on child poverty by state: repeal vs. doubling (PolicyEngine-US 2026, state-level microsims)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / ui_child_poverty_repeal_and_doubling_executed.ipynb
Created January 31, 2026 20:32
Impact of unemployment insurance on child poverty: repeal vs. doubling (PolicyEngine-US 2026)
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
Created January 28, 2026 20:22
Using PolicyEngine tax-benefit calculations from Stata

Using PolicyEngine from Stata

Three approaches for integrating PolicyEngine tax-benefit calculations with Stata:

1. Direct Python integration (Stata 16+)

Stata 16+ has native Python integration. Install policyengine-us and call it directly:

python:
@MaxGhenis
MaxGhenis / ui_poverty_impact.ipynb
Last active January 27, 2026 00:12
Impact of Unemployment Insurance on Child Poverty (2026) - PolicyEngine-US Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / scp_comparison_executed.ipynb
Created January 17, 2026 02:55
Scottish Child Payment PR #1439 validation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / graphql_upload_500_bug.ipynb
Created January 4, 2026 14:31
OpenCollective GraphQL uploadFile mutation returns 500 error - reproducible example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / versioning_options.html
Created December 27, 2025 01:57
Interactive comparison of .rac temporal versioning options (CTC example)
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Complete .rac Format with Versioning</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'SF Mono', 'Fira Code', monospace;
background: #0a0a0f;
@MaxGhenis
MaxGhenis / la_city_income_85th_percentile.py
Last active December 26, 2025 19:34
85th Percentile Household Income in Los Angeles City (2023-2024) using ACS 1-Year PUMS
"""
85th Percentile Household Income in Los Angeles City
Using 1-year ACS PUMS data for 2023 and 2024
LA City PUMAs identified from Census ACS API by name matching.
These 23 PUMAs are explicitly labeled as LA City areas.
Note: Some LA City areas may be in shared PUMAs (e.g., 03707, 03748) which
include portions of other cities - these are excluded to avoid overestimation.
"""
@MaxGhenis
MaxGhenis / la_city_income_85th_percentile.ipynb
Last active December 26, 2025 19:37
85th Percentile Household Income in Los Angeles City (2023-2024) using ACS 1-Year PUMS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MaxGhenis
MaxGhenis / ons-firm-data-wishlist.md
Last active December 11, 2025 21:30
ONS firm data wishlist for UK microsimulation and OLG models

ONS Firm Data Wishlist for UK Microsimulation & OLG Models

Prepared for Vahid's meeting with ONS firm data team, December 2025

Context

PolicyEngine is exploring building an OLG (Overlapping Generations) model for the UK, similar to OG-USA/OG-Core but with greater firm-level heterogeneity. We also want to expand our firm microsimulation capabilities for tax policy analysis (VAT, corporation tax, business rates).

This document outlines what firm-level data would be most valuable from ONS.