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
71 changes: 1 addition & 70 deletions changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,4 @@
added:
- Initial version of package.
date: 2024-11-30 00:00:00
version: 1.0.0
- bump: patch
changes:
added:
- Changelog entries.
date: 2024-11-30 17:01:37
- bump: major
changes:
added:
- Major version bump to succeed old versions of the package under a different
repo.
date: 2024-12-01 12:38:17
- bump: minor
changes:
added:
- Budget chart.
- Budget window chart and data.
date: 2024-12-02 12:12:59
- bump: minor
changes:
added:
- State level subsets.
- Huggingface token CLI entry.
date: 2024-12-02 13:48:27
- bump: patch
changes:
fixed:
- Formatting in constituency charts.
date: 2024-12-03 13:16:27
- bump: patch
changes:
fixed:
- Household simulation example broken due to a type error.
date: 2024-12-06 14:02:41
- bump: minor
changes:
added:
- Household variation charts.
- Region filtering improvements.
date: 2024-12-06 14:07:31
- bump: minor
changes:
fixed:
- Bug causing local authority impacts to fail.
date: 2024-12-23 08:05:21
- bump: patch
changes:
fixed:
- Subsetting bug with time periods.
date: 2025-01-09 10:52:28
- bump: minor
changes:
changed:
- Moved to strong typing.
date: 2025-01-24 00:08:26
- bump: minor
changes:
added:
- General `calculate` method.
date: 2025-01-29 03:14:45
- bump: minor
changes:
added:
- Chart generation for macro charts.
date: 2025-01-31 02:39:31
- bump: patch
changes:
changed:
- Updated documentation link in README
date: 2025-02-12 09:19:58
version: 0.1.0
4 changes: 4 additions & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ parts:
- caption: Concepts
chapters:
- file: concepts/simulation
- file: concepts/extending
- caption: Outputs
chapters:
- file: outputs/calculate_average_earnings

20 changes: 11 additions & 9 deletions docs/basic/calculate_economy_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -28,16 +28,18 @@
"source": [
"from policyengine import Simulation\n",
"\n",
"sim = Simulation({\n",
" \"scope\": \"macro\", # Required for this\n",
" \"country\": \"uk\", # or \"us\"\n",
" \"time_period\": 2025,\n",
" \"reform\": {\n",
" \"gov.hmrc.income_tax.allowances.personal_allowance.amount\": 15_000,\n",
"sim = Simulation(\n",
" scope=\"macro\", # Required for this\n",
" country=\"us\", # or \"us\"\n",
" time_period=2025, # Defaults to 2025\n",
" reform={\n",
" \"gov.usda.snap.income.deductions.earned_income\": {\n",
" \"2025\": 0.05\n",
" }\n",
" }\n",
"})\n",
")\n",
"\n",
"sim.calculate()"
"sim.calculate_economy_comparison()"
]
},
{
Expand Down
21 changes: 11 additions & 10 deletions docs/basic/calculate_household_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -28,11 +28,10 @@
"source": [
"from policyengine import Simulation\n",
"\n",
"sim = Simulation({\n",
" \"scope\": \"household\", # Required for this\n",
" \"country\": \"uk\", # or \"us\"\n",
" \"time_period\": 2025,\n",
" \"data\": { # Required for this\n",
"sim = Simulation(\n",
" scope=\"household\",\n",
" country=\"us\",\n",
" data={ # Required for this\n",
" \"people\": {\n",
" \"person\": {\n",
" \"age\": {\n",
Expand All @@ -44,12 +43,14 @@
" }\n",
" }\n",
" },\n",
" \"reform\": {\n",
" \"gov.hmrc.income_tax.allowances.personal_allowance.amount\": 15_000,\n",
" reform={\n",
" \"gov.usda.snap.income.deductions.earned_income\": {\n",
" \"2025\": 0.05\n",
" }\n",
" }\n",
"})\n",
")\n",
"\n",
"sim.calculate()"
"sim.calculate_single_household()"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions docs/basic/calculate_single_economy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -28,13 +28,13 @@
"source": [
"from policyengine import Simulation\n",
"\n",
"sim = Simulation({\n",
" \"scope\": \"macro\", # Required for this\n",
" \"country\": \"uk\", # or \"us\"\n",
" \"time_period\": 2025,\n",
"})\n",
"sim = Simulation(\n",
" scope=\"macro\",\n",
" country=\"us\",\n",
" time_period=2025,\n",
")\n",
"\n",
"sim.calculate()"
"sim.calculate_single_economy()"
]
},
{
Expand Down
15 changes: 7 additions & 8 deletions docs/basic/calculate_single_household.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -28,11 +28,10 @@
"source": [
"from policyengine import Simulation\n",
"\n",
"sim = Simulation({\n",
" \"scope\": \"household\", # Required for this\n",
" \"country\": \"uk\", # or \"us\"\n",
" \"time_period\": 2025,\n",
" \"data\": { # Required for this\n",
"sim = Simulation(\n",
" scope=\"household\",\n",
" country=\"us\",\n",
" data={ # Required for this\n",
" \"people\": {\n",
" \"person\": {\n",
" \"age\": {\n",
Expand All @@ -44,9 +43,9 @@
" }\n",
" }\n",
" }\n",
"})\n",
")\n",
"\n",
"sim.calculate()"
"sim.calculate_single_household()"
]
},
{
Expand Down
Loading
Loading