Complete working scripts demonstrating common workflows. Each script can be run directly with python examples/<filename>.py.
The canonical workflow for comparing a baseline and reform simulation, using both economic_impact_analysis() and ChangeAggregate.
:language: python
Applying parametric reforms, comparing baseline and reform with ChangeAggregate, analysing winners and losers by income decile, and visualising results with Plotly.
:language: python
Calculating net income and tax by income decile using representative microdata and Aggregate with quantile filters.
:language: python
Loading enhanced CPS microdata, running a full microsimulation, and calculating statistics within income deciles.
:language: python
Creating a custom dataset with varied employment income, running a single simulation, and visualising benefit phase-outs.
:language: python
Same approach as the UK version, varying employment income from $0 to $200k and plotting household net income.
:language: python
Using calculate_household_impact() to compute taxes and benefits for individual custom households (both UK and US).
:language: python
Benchmarking how simulation.run() scales with dataset size.
:language: python