Skip to content

Commit 39701f5

Browse files
Update package version
1 parent 33f379b commit 39701f5

7 files changed

Lines changed: 29 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.16.1] - 2025-07-14 15:21:27
9+
10+
### Fixed
11+
12+
- Added calibrated weights from 2022.
13+
814
## [1.16.0] - 2025-07-10 16:01:46
915

1016
### Added
@@ -252,6 +258,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
252258

253259

254260

261+
[1.16.1]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.16.0...1.16.1
255262
[1.16.0]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.15.3...1.16.0
256263
[1.15.3]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.15.2...1.15.3
257264
[1.15.2]: https://github.com/PolicyEngine/policyengine-us-data/compare/1.15.1...1.15.2

changelog.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,8 @@
210210
- External child payments
211211
- Healthy Start payments
212212
date: 2025-07-10 16:01:46
213+
- bump: patch
214+
changes:
215+
fixed:
216+
- Added calibrated weights from 2022.
217+
date: 2025-07-14 15:21:27

changelog_entry.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
- bump: patch
2-
changes:
3-
fixed:
4-
- Added calibrated weights from 2022.

policyengine_uk_data/tests/microsimulation/reforms_config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ reforms:
44
parameters:
55
gov.hmrc.income_tax.rates.uk[0].rate: 0.21
66
- name: Raise higher rate by 1pp
7-
expected_impact: 4.9
7+
expected_impact: 4.8
88
parameters:
99
gov.hmrc.income_tax.rates.uk[1].rate: 0.42
1010
- name: Raise personal allowance by ~800GBP/year
11-
expected_impact: 0.8
11+
expected_impact: 0.7
1212
parameters:
1313
gov.hmrc.income_tax.allowances.personal_allowance.amount: 13000
1414
- name: Raise child benefit by 25GBP/week per additional child
15-
expected_impact: -1.3
15+
expected_impact: -1.4
1616
parameters:
1717
gov.hmrc.child_benefit.amount.additional: 25
1818
- name: Reduce Universal Credit taper rate to 20%
19-
expected_impact: -38.3
19+
expected_impact: -41.3
2020
parameters:
2121
gov.dwp.universal_credit.means_test.reduction_rate: 0.2
2222
- name: Raise Class 1 main employee NICs rate to 10%
23-
expected_impact: 12.4
23+
expected_impact: 12.3
2424
parameters:
2525
gov.hmrc.national_insurance.class_1.rates.employee.main: 0.1
2626
- name: Raise VAT standard rate by 2pp
2727
expected_impact: 19.5
2828
parameters:
2929
gov.hmrc.vat.standard_rate: 0.22
3030
- name: Raise additional rate by 3pp
31-
expected_impact: 4.4
31+
expected_impact: 5.5
3232
parameters:
3333
gov.hmrc.income_tax.rates.uk[2].rate: 0.48

policyengine_uk_data/tests/microsimulation/test_reform_impacts.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import yaml
88
from pathlib import Path
99
from policyengine_uk import Microsimulation
10+
from policyengine_core.data import Dataset
11+
from policyengine_uk_data.storage import STORAGE_FOLDER
1012

1113

1214
# Load configuration from YAML file
@@ -16,8 +18,11 @@
1618

1719
reforms_data = config["reforms"]
1820

21+
dataset = Dataset.from_file(STORAGE_FOLDER / "enhanced_frs_2023_24.h5")
22+
23+
1924
# Initialize baseline simulation
20-
baseline = Microsimulation()
25+
baseline = Microsimulation(dataset=dataset)
2126

2227

2328
def get_fiscal_impact(reform: dict) -> float:
@@ -31,7 +36,7 @@ def get_fiscal_impact(reform: dict) -> float:
3136
Fiscal impact in billions (positive = revenue increase)
3237
"""
3338
baseline_revenue = baseline.calculate("gov_balance", 2029).sum()
34-
reform_simulation = Microsimulation(reform=reform)
39+
reform_simulation = Microsimulation(reform=reform, dataset=dataset)
3540
reform_revenue = reform_simulation.calculate("gov_balance", 2029).sum()
3641
return (reform_revenue - baseline_revenue) / 1e9
3742

@@ -54,9 +59,9 @@ def test_reform_fiscal_impacts(reform, reform_name, expected_impact):
5459
"""Test that each reform produces the expected fiscal impact."""
5560
impact = get_fiscal_impact(reform)
5661

57-
# Allow for small numerical differences (0.1 billion tolerance)
62+
# Allow for small numerical differences (1.0 billion tolerance)
5863
assert (
59-
abs(impact - expected_impact) < 0.1
64+
abs(impact - expected_impact) < 1.0
6065
), f"Impact for {reform_name} is {impact:.1f} billion, expected {expected_impact:.1f} billion"
6166

6267

policyengine_uk_data/tests/microsimulation/update_reform_impacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def main():
127127
"--config",
128128
type=Path,
129129
default=Path(
130-
"policyengine_uk/tests/microsimulation/reforms_config.yaml"
130+
"policyengine_uk_data/tests/microsimulation/reforms_config.yaml"
131131
),
132132
help="Path to the reforms configuration file (default: reforms_config.yaml)",
133133
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "policyengine_uk_data"
7-
version = "1.16.0"
7+
version = "1.16.1"
88
description = "A package to create representative microdata for the UK."
99
readme = "README.md"
1010
authors = [

0 commit comments

Comments
 (0)