Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parts:
- file: basic/calculate_household_comparison
- file: basic/calculate_single_economy
- file: basic/calculate_economy_comparison
- file: basic/create_charts
- caption: Reference
chapters:
- file: reference/parameters_us
Expand Down
24 changes: 7 additions & 17 deletions docs/basic/calculate_economy_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,16 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING: Gini calculation failed. Setting to 0.4.\n",
"WARNING: Gini calculation failed. Setting to 0.4.\n"
"/Users/nikhilwoodruff/policyengine/policyengine.py/.venv/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
" from .autonotebook import tqdm as notebook_tqdm\n"
]
},
{
"data": {
"text/plain": [
"EconomyComparison(headlines=Headlines(budgetary_impact=12057201822.641846, winner_share=3.096710278402974e-05), fiscal=FiscalComparison(baseline=FiscalSummary(tax_revenue=3013608593152.1895, federal_tax=2583108898331.884, federal_balance=1160152745100.683, state_tax=430499694820.3057, government_spending=1422956153231.2007, tax_benefit_programs={}, household_net_income=12826524419636.805), reform=FiscalSummary(tax_revenue=3013602235736.6367, federal_tax=2583108898330.5815, federal_balance=1172209946923.325, state_tax=430493337406.05536, government_spending=1410898951407.2566, tax_benefit_programs={}, household_net_income=12814482607439.363), change=FiscalSummary(tax_revenue=-6357415.552734375, federal_tax=-1.30224609375, federal_balance=12057201822.641846, state_tax=-6357414.250366211, government_spending=-12057201823.944092, tax_benefit_programs={}, household_net_income=-12041812197.441406), relative_change=FiscalSummary(tax_revenue=-2.1095690950644036e-06, federal_tax=-5.041390607228997e-13, federal_balance=0.01039277101533339, state_tax=-1.476752324532971e-05, government_spending=-0.008473347401861264, tax_benefit_programs={}, household_net_income=-0.0009388211337286318)), inequality=InequalityComparison(baseline=InequalitySummary(gini=0.4, top_10_share=0.3056184716000026, top_1_share=0.07133480442157591), reform=InequalitySummary(gini=0.4, top_10_share=0.30585587458075175, top_1_share=0.0713913687702228), change=InequalitySummary(gini=0.0, top_10_share=0.00023740298074914623, top_1_share=5.65643486468842e-05), relative_change=InequalitySummary(gini=0.0, top_10_share=0.000776795262100068, top_1_share=0.0007929418059745287)), distributional=DecileImpacts(income=IncomeMeasureSpecificDecileImpacts(income_change=IncomeMeasureSpecificDecileIncomeChange(relative={1: -0.003725182447367451, 2: -0.004777925629293106, 3: -0.004427406664007123, 4: -0.003033546615233723, 5: -0.0012295913621786522, 6: -0.0003957445652524665, 7: -9.39759257002033e-05, 8: -3.0593991125471323e-05, 9: -1.4266187310034442e-05, 10: -1.1781514896665692e-05}, average={1: -63.89275812122564, 2: -174.0337390913802, 3: -224.9955222412714, 4: -193.3288209208671, 5: -96.35100483351104, 6: -37.64443533520402, 7: -10.856160889113756, 8: -4.3236716100441095, 9: -2.6063802446197073, 10: -3.9748627643461294}), winners_and_losers=IncomeMeasureSpecificDecileWinnersLosers(deciles={1: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.0657153256192896, lose_less_than_5_percent_share=0.05318331952206108, lose_share=0.11889864514135068, no_change_share=0.8807898379100747, gain_share=0.00031151694857464756, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.00031151694857464756), 2: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.15194453295736532, lose_less_than_5_percent_share=0.07711620163220688, lose_share=0.22906073458957218, no_change_share=0.7709392654104278, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 3: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.17114447859504486, lose_less_than_5_percent_share=0.059347324242194015, lose_share=0.23049180283723886, no_change_share=0.7695081971627611, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 4: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.12989846703096578, lose_less_than_5_percent_share=0.04485983299864166, lose_share=0.17475830002960743, no_change_share=0.8252416999703925, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 5: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.051068199514449644, lose_less_than_5_percent_share=0.024111392231720524, lose_share=0.07517959174617017, no_change_share=0.9248204082538298, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 6: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.015369267341425434, lose_less_than_5_percent_share=0.018481961006501027, lose_share=0.03385122834792646, no_change_share=0.9661487716520736, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 7: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.0029113126526266477, lose_less_than_5_percent_share=0.00904746763596632, lose_share=0.011958780288592966, no_change_share=0.988041219711407, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 8: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.0005094937950111613, lose_less_than_5_percent_share=0.0031321041000860993, lose_share=0.0036415978950972605, no_change_share=0.9963584021049028, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 9: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.00029487893089546547, lose_less_than_5_percent_share=0.0035164203584642836, lose_share=0.003811299289359749, no_change_share=0.9961887007106403, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0), 10: IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.0002281227488112428, lose_less_than_5_percent_share=0.003779501887019752, lose_share=0.004007624635830995, no_change_share=0.9867296828146133, gain_share=0.0, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=0.0)}, all=IncomeMeasureSpecificDecileWinnersLosersGroupOutcomes(lose_more_than_5_percent_share=0.05886871339782029, lose_less_than_5_percent_share=0.02962594712536097, lose_share=0.08849466052318125, no_change_share=0.9105479297614693, gain_share=3.096710278402974e-05, gain_less_than_5_percent_share=0.0, gain_more_than_5_percent_share=3.096710278402974e-05))), wealth=None))"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
Expand Down Expand Up @@ -61,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -255,7 +245,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "base",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -269,7 +259,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
"version": "3.11.11"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/basic/calculate_single_economy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
" time_period=2025,\n",
")\n",
"\n",
"sim.calculate_single_economy()"
"result = sim.calculate_single_economy()"
]
},
{
Expand Down
Loading
Loading