policyengine-uk 2.39.3__py3-none-any.whl → 2.40.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- policyengine_uk/__init__.py +0 -4
- policyengine_uk/data/__init__.py +4 -1
- policyengine_uk/data/dataset_schema.py +115 -3
- policyengine_uk/data/economic_assumptions.py +174 -171
- policyengine_uk/data/uprating_indices.yaml +87 -0
- policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml +191 -1
- policyengine_uk/system.py +25 -3
- policyengine_uk/tests/microsimulation/reforms_config.yaml +5 -5
- {policyengine_uk-2.39.3.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/CHANGELOG.md +15 -0
- {policyengine_uk-2.39.3.dist-info → policyengine_uk-2.40.1.dist-info}/METADATA +2 -2
- {policyengine_uk-2.39.3.dist-info → policyengine_uk-2.40.1.dist-info}/RECORD +15 -15
- policyengine_uk/data/uprating_growth_factors.csv +0 -83
- {policyengine_uk-2.39.3.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/LICENSE +0 -0
- {policyengine_uk-2.39.3.data → policyengine_uk-2.40.1.data}/data/share/openfisca/openfisca-country-template/README.md +0 -0
- {policyengine_uk-2.39.3.dist-info → policyengine_uk-2.40.1.dist-info}/WHEEL +0 -0
- {policyengine_uk-2.39.3.dist-info → policyengine_uk-2.40.1.dist-info}/licenses/LICENSE +0 -0
policyengine_uk/__init__.py
CHANGED
@@ -13,9 +13,5 @@ from policyengine_uk.system import (
|
|
13
13
|
from pathlib import Path
|
14
14
|
import os
|
15
15
|
from policyengine_core.taxbenefitsystems import TaxBenefitSystem
|
16
|
-
from policyengine_uk.data.economic_assumptions import (
|
17
|
-
BASELINE_GROWFACTORS,
|
18
|
-
apply_growth_factors,
|
19
|
-
)
|
20
16
|
|
21
17
|
REPO = Path(__file__).parent
|
policyengine_uk/data/__init__.py
CHANGED
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
8
8
|
import h5py
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class UKSingleYearDataset:
|
12
12
|
person: pd.DataFrame
|
13
13
|
benunit: pd.DataFrame
|
14
14
|
household: pd.DataFrame
|
@@ -61,6 +61,7 @@ class UKDataset:
|
|
61
61
|
|
62
62
|
self.data_format = "arrays"
|
63
63
|
self.tables = (self.person, self.benunit, self.household)
|
64
|
+
self.table_names = ("person", "benunit", "household")
|
64
65
|
|
65
66
|
def save(self, file_path: str):
|
66
67
|
with pd.HDFStore(file_path) as f:
|
@@ -80,10 +81,11 @@ class UKDataset:
|
|
80
81
|
return data
|
81
82
|
|
82
83
|
def copy(self):
|
83
|
-
return
|
84
|
+
return UKSingleYearDataset(
|
84
85
|
person=self.person.copy(),
|
85
86
|
benunit=self.benunit.copy(),
|
86
87
|
household=self.household.copy(),
|
88
|
+
fiscal_year=self.time_period,
|
87
89
|
)
|
88
90
|
|
89
91
|
def validate(self):
|
@@ -110,9 +112,119 @@ class UKDataset:
|
|
110
112
|
input_variables, period=fiscal_year
|
111
113
|
)
|
112
114
|
|
113
|
-
return
|
115
|
+
return UKSingleYearDataset(
|
114
116
|
person=entity_dfs["person"],
|
115
117
|
benunit=entity_dfs["benunit"],
|
116
118
|
household=entity_dfs["household"],
|
117
119
|
fiscal_year=fiscal_year,
|
118
120
|
)
|
121
|
+
|
122
|
+
|
123
|
+
class UKMultiYearDataset:
|
124
|
+
def __init__(
|
125
|
+
self,
|
126
|
+
file_path: str = None,
|
127
|
+
datasets: list[UKSingleYearDataset] | None = None,
|
128
|
+
):
|
129
|
+
if datasets is not None:
|
130
|
+
self.datasets = {}
|
131
|
+
for dataset in datasets:
|
132
|
+
if not isinstance(dataset, UKSingleYearDataset):
|
133
|
+
raise TypeError(
|
134
|
+
"All items in datasets must be of type UKSingleYearDataset."
|
135
|
+
)
|
136
|
+
year = int(dataset.time_period[:4])
|
137
|
+
self.datasets[year] = dataset
|
138
|
+
|
139
|
+
if file_path is not None:
|
140
|
+
UKSingleYearDataset.validate_file_path(file_path)
|
141
|
+
with pd.HDFStore(file_path) as f:
|
142
|
+
self.datasets = {}
|
143
|
+
for year in f.keys():
|
144
|
+
if year.startswith("/person/"):
|
145
|
+
fiscal_year = int(year.split("/")[2])
|
146
|
+
person_df = f[year]
|
147
|
+
benunit_df = f[f"/benunit/{fiscal_year}"]
|
148
|
+
household_df = f[f"/household/{fiscal_year}"]
|
149
|
+
self.datasets[fiscal_year] = UKSingleYearDataset(
|
150
|
+
person=person_df,
|
151
|
+
benunit=benunit_df,
|
152
|
+
household=household_df,
|
153
|
+
fiscal_year=fiscal_year,
|
154
|
+
)
|
155
|
+
|
156
|
+
self.data_format = "time_period_arrays"
|
157
|
+
self.time_period = list(sorted(self.datasets.keys()))[0]
|
158
|
+
|
159
|
+
def get_year(self, fiscal_year: int) -> UKSingleYearDataset:
|
160
|
+
if fiscal_year in self.datasets:
|
161
|
+
return self.datasets[fiscal_year]
|
162
|
+
else:
|
163
|
+
raise ValueError(f"No dataset found for year {fiscal_year}.")
|
164
|
+
|
165
|
+
def __getitem__(self, fiscal_year: int):
|
166
|
+
return self.get_year(fiscal_year)
|
167
|
+
|
168
|
+
def save(self, file_path: str):
|
169
|
+
Path(file_path).unlink(
|
170
|
+
missing_ok=True
|
171
|
+
) # Remove existing file if it exists
|
172
|
+
with pd.HDFStore(file_path) as f:
|
173
|
+
for year, dataset in self.datasets.items():
|
174
|
+
f.put(
|
175
|
+
f"person/{year}",
|
176
|
+
dataset.person,
|
177
|
+
format="table",
|
178
|
+
data_columns=True,
|
179
|
+
)
|
180
|
+
f.put(
|
181
|
+
f"benunit/{year}",
|
182
|
+
dataset.benunit,
|
183
|
+
format="table",
|
184
|
+
data_columns=True,
|
185
|
+
)
|
186
|
+
f.put(
|
187
|
+
f"household/{year}",
|
188
|
+
dataset.household,
|
189
|
+
format="table",
|
190
|
+
data_columns=True,
|
191
|
+
)
|
192
|
+
f.put(
|
193
|
+
f"time_period/{year}",
|
194
|
+
pd.Series([year]),
|
195
|
+
format="table",
|
196
|
+
data_columns=True,
|
197
|
+
)
|
198
|
+
|
199
|
+
def copy(self):
|
200
|
+
new_datasets = {
|
201
|
+
year: dataset.copy() for year, dataset in self.datasets.items()
|
202
|
+
}
|
203
|
+
return UKMultiYearDataset(datasets=list(new_datasets.values()))
|
204
|
+
|
205
|
+
@staticmethod
|
206
|
+
def validate_file_path(file_path: str):
|
207
|
+
if not file_path.endswith(".h5"):
|
208
|
+
raise ValueError(
|
209
|
+
"File path must end with '.h5' for UKMultiYearDataset."
|
210
|
+
)
|
211
|
+
if not Path(file_path).exists():
|
212
|
+
raise FileNotFoundError(f"File not found: {file_path}")
|
213
|
+
|
214
|
+
# Check if the file contains datasets for multiple years
|
215
|
+
with h5py.File(file_path, "r") as f:
|
216
|
+
for required_dataset in ["person", "benunit", "household"]:
|
217
|
+
if not any(f"{required_dataset}" in key for key in f.keys()):
|
218
|
+
raise ValueError(
|
219
|
+
f"Dataset '{required_dataset}' not found in the file: {file_path}"
|
220
|
+
)
|
221
|
+
|
222
|
+
def load(self):
|
223
|
+
data = {}
|
224
|
+
for year, dataset in self.datasets.items():
|
225
|
+
for df in (dataset.person, dataset.benunit, dataset.household):
|
226
|
+
for col in df.columns:
|
227
|
+
if col not in data:
|
228
|
+
data[col] = {}
|
229
|
+
data[col][year] = df[col].values
|
230
|
+
return data
|
@@ -1,181 +1,184 @@
|
|
1
|
-
import
|
1
|
+
from policyengine_uk.data import UKMultiYearDataset, UKSingleYearDataset
|
2
|
+
from policyengine_uk.system import system
|
3
|
+
import yaml
|
4
|
+
from policyengine_core.parameters import ParameterNode
|
2
5
|
from pathlib import Path
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def create_policyengine_uprating_factors_table(print_diff=True):
|
10
|
-
from policyengine_uk.system import system
|
11
|
-
|
12
|
-
df = pd.DataFrame()
|
13
|
-
|
14
|
-
variable_names = []
|
15
|
-
years = []
|
16
|
-
yoy_values = []
|
17
|
-
|
18
|
-
parameter_by_variable = {}
|
19
|
-
|
20
|
-
for variable in system.variables.values():
|
21
|
-
if variable.uprating is not None:
|
22
|
-
parameter = system.parameters.get_child(
|
23
|
-
variable.uprating.replace("indices", "yoy_growth")
|
24
|
-
)
|
25
|
-
parameter_by_variable[variable.name] = parameter.name
|
26
|
-
for year in range(START_YEAR, END_YEAR + 1):
|
27
|
-
variable_names.append(variable.name)
|
28
|
-
years.append(str(year))
|
29
|
-
yoy_values.append(round(parameter(year), 3))
|
30
|
-
|
31
|
-
df["Variable"] = variable_names
|
32
|
-
df["Year"] = years
|
33
|
-
df["Value"] = yoy_values
|
34
|
-
|
35
|
-
# Convert to there is a column for each year
|
36
|
-
df = df.pivot(index="Variable", columns="Year", values="Value")
|
37
|
-
df = df.sort_values("Variable")
|
38
|
-
|
39
|
-
file_path = Path(__file__).parent / "uprating_growth_factors.csv"
|
40
|
-
|
41
|
-
# Read old CSV if it exists
|
42
|
-
old_df = None
|
43
|
-
if file_path.exists():
|
44
|
-
old_df = pd.read_csv(file_path, index_col=0)
|
45
|
-
# Ensure all columns are strings in old_df
|
46
|
-
old_df.columns = old_df.columns.astype(str)
|
47
|
-
|
48
|
-
# Prepare new dataframe
|
49
|
-
df["Parameter"] = df.index.map(parameter_by_variable)
|
50
|
-
df = df[
|
51
|
-
["Parameter"] + [str(year) for year in range(START_YEAR, END_YEAR + 1)]
|
52
|
-
]
|
53
|
-
|
54
|
-
# Print diff if old CSV existed and print_diff is True
|
55
|
-
if old_df is not None and print_diff:
|
56
|
-
print_csv_diff(old_df, df)
|
57
|
-
# Save new CSV
|
58
|
-
df.to_csv(file_path)
|
59
|
-
|
60
|
-
return pd.read_csv(file_path)
|
61
|
-
|
62
|
-
|
63
|
-
def print_csv_diff(old_df, new_df):
|
64
|
-
"""Print differences between old and new dataframes."""
|
65
|
-
print("\n" + "=" * 80)
|
66
|
-
print("CSV diff report")
|
67
|
-
print("=" * 80)
|
68
|
-
|
69
|
-
# Check for new rows
|
70
|
-
new_rows = set(new_df.index) - set(old_df.index)
|
71
|
-
if new_rows:
|
72
|
-
print(f"\n✅ New rows added ({len(new_rows)}):")
|
73
|
-
for row in sorted(new_rows):
|
74
|
-
print(f" - {row}")
|
75
|
-
|
76
|
-
# Check for deleted rows
|
77
|
-
deleted_rows = set(old_df.index) - set(new_df.index)
|
78
|
-
if deleted_rows:
|
79
|
-
print(f"\n❌ Rows deleted ({len(deleted_rows)}):")
|
80
|
-
for row in sorted(deleted_rows):
|
81
|
-
print(f" - {row}")
|
82
|
-
|
83
|
-
# Check for changed values
|
84
|
-
common_rows = set(old_df.index) & set(new_df.index)
|
85
|
-
common_cols = set(old_df.columns) & set(new_df.columns)
|
86
|
-
|
87
|
-
changes = []
|
88
|
-
for row in common_rows:
|
89
|
-
for col in common_cols:
|
90
|
-
old_val = old_df.loc[row, col]
|
91
|
-
new_val = new_df.loc[row, col]
|
92
|
-
|
93
|
-
# Handle NaN values
|
94
|
-
if pd.isna(old_val) and pd.isna(new_val):
|
95
|
-
continue
|
96
|
-
elif pd.isna(old_val) or pd.isna(new_val):
|
97
|
-
changes.append((row, col, old_val, new_val))
|
98
|
-
elif old_val != new_val:
|
99
|
-
changes.append((row, col, old_val, new_val))
|
100
|
-
|
101
|
-
if changes:
|
102
|
-
print(f"\n🔄 Value changes ({len(changes)}):")
|
103
|
-
print(
|
104
|
-
f"{'Variable':<30} {'Column':<15} {'Old value':<15} {'New value':<15}"
|
105
|
-
)
|
106
|
-
print("-" * 75)
|
107
|
-
for row, col, old_val, new_val in sorted(changes):
|
108
|
-
old_str = str(old_val) if not pd.isna(old_val) else "NaN"
|
109
|
-
new_str = str(new_val) if not pd.isna(new_val) else "NaN"
|
110
|
-
print(f"{row:<30} {str(col):<15} {old_str:<15} {new_str:<15}")
|
111
|
-
|
112
|
-
# Check for new columns
|
113
|
-
new_cols = set(new_df.columns) - set(old_df.columns)
|
114
|
-
if new_cols:
|
115
|
-
print(f"\n✅ New columns added ({len(new_cols)}):")
|
116
|
-
for col in sorted(new_cols):
|
117
|
-
print(f" - {col}")
|
118
|
-
|
119
|
-
# Check for deleted columns
|
120
|
-
deleted_cols = set(old_df.columns) - set(new_df.columns)
|
121
|
-
if deleted_cols:
|
122
|
-
print(f"\n❌ Columns deleted ({len(deleted_cols)}):")
|
123
|
-
for col in sorted(deleted_cols):
|
124
|
-
print(f" - {col}")
|
125
|
-
|
126
|
-
if not (new_rows or deleted_rows or changes or new_cols or deleted_cols):
|
127
|
-
print("\n✨ No changes detected - CSV is identical!")
|
128
|
-
|
129
|
-
print("\n" + "=" * 80 + "\n")
|
130
|
-
|
131
|
-
|
132
|
-
def convert_yoy_growth_to_index(
|
133
|
-
growth_factors: pd.DataFrame,
|
134
|
-
):
|
135
|
-
"""
|
136
|
-
Convert year-on-year growth factors to an index.
|
137
|
-
"""
|
138
|
-
growth_factors = growth_factors.copy()
|
139
|
-
# Get the first year column (skip 'Variable' and 'Parameter' columns)
|
140
|
-
year_columns = [
|
141
|
-
col
|
142
|
-
for col in growth_factors.columns
|
143
|
-
if col not in ["Variable", "Parameter"]
|
144
|
-
]
|
145
|
-
index = growth_factors[year_columns[0]] * 0 + 1
|
146
|
-
for year in year_columns:
|
147
|
-
index *= 1 + growth_factors[year]
|
148
|
-
growth_factors[year] = index
|
149
|
-
return growth_factors
|
150
|
-
|
151
|
-
|
152
|
-
def apply_growth_factors(
|
153
|
-
dataset: UKDataset,
|
154
|
-
growth_factors: pd.DataFrame,
|
155
|
-
start_year: int,
|
156
|
-
end_year: int,
|
6
|
+
import numpy as np
|
7
|
+
|
8
|
+
|
9
|
+
def apply_uprating(
|
10
|
+
dataset: UKMultiYearDataset,
|
157
11
|
):
|
158
|
-
|
159
|
-
end_year = str(end_year)
|
12
|
+
# Apply uprating to the dataset.
|
160
13
|
dataset = dataset.copy()
|
161
|
-
growth_factors_indices = convert_yoy_growth_to_index(growth_factors)
|
162
|
-
for i in range(len(growth_factors)):
|
163
|
-
variable = growth_factors["Variable"].values[i]
|
164
|
-
start_index = growth_factors_indices[start_year].values[i]
|
165
|
-
end_index = growth_factors_indices[end_year].values[i]
|
166
14
|
|
167
|
-
|
168
|
-
|
169
|
-
|
15
|
+
if not isinstance(dataset, UKMultiYearDataset):
|
16
|
+
raise TypeError("dataset must be of type UKMultiYearDataset.")
|
17
|
+
|
18
|
+
for year in dataset.datasets.keys():
|
19
|
+
if year == min(dataset.datasets.keys()):
|
20
|
+
continue # Don't uprate the first year
|
21
|
+
current_year = dataset.datasets[year]
|
22
|
+
prev_year = dataset.datasets[year - 1]
|
23
|
+
apply_single_year_uprating(current_year, prev_year, system.parameters)
|
170
24
|
|
171
25
|
return dataset
|
172
26
|
|
173
27
|
|
174
|
-
|
175
|
-
|
176
|
-
|
28
|
+
def apply_single_year_uprating(
|
29
|
+
current_year: UKSingleYearDataset,
|
30
|
+
previous_year: UKSingleYearDataset,
|
31
|
+
parameters: ParameterNode,
|
32
|
+
):
|
33
|
+
# Apply uprating to a single year dataset.
|
34
|
+
|
35
|
+
# First, apply standard variable-YoY growth based uprating.
|
36
|
+
|
37
|
+
with open(Path(__file__).parent / "uprating_indices.yaml", "r") as f:
|
38
|
+
uprating = yaml.safe_load(f)
|
39
|
+
for index_name, variables in uprating.items():
|
40
|
+
index_rel_change = parameters.get_child(index_name)(
|
41
|
+
current_year.time_period
|
42
|
+
)
|
43
|
+
for variable in variables:
|
44
|
+
for table_name, df in zip(
|
45
|
+
current_year.table_names, current_year.tables
|
46
|
+
):
|
47
|
+
if variable in df.columns:
|
48
|
+
prev_year_value = getattr(previous_year, table_name)[
|
49
|
+
variable
|
50
|
+
]
|
51
|
+
current_year_value = prev_year_value * index_rel_change
|
52
|
+
getattr(current_year, table_name)[
|
53
|
+
variable
|
54
|
+
] = current_year_value
|
55
|
+
|
56
|
+
# Next, apply custom uprating.
|
57
|
+
|
58
|
+
# Council Tax is uprated by OBR forecasts/outturns by country.
|
59
|
+
|
60
|
+
current_year = uprate_council_tax(current_year, previous_year, parameters)
|
61
|
+
|
62
|
+
# Rent is uprated by OBR forecasts/outturns by region.
|
63
|
+
|
64
|
+
current_year = uprate_rent(current_year, previous_year, parameters)
|
65
|
+
|
66
|
+
current_year.validate()
|
67
|
+
|
68
|
+
return current_year
|
177
69
|
|
178
70
|
|
179
|
-
|
180
|
-
|
181
|
-
|
71
|
+
def uprate_council_tax(
|
72
|
+
current_year: UKSingleYearDataset,
|
73
|
+
previous_year: UKSingleYearDataset,
|
74
|
+
parameters: ParameterNode,
|
75
|
+
):
|
76
|
+
# Uprate council tax for a single year dataset.
|
77
|
+
|
78
|
+
council_tax = (
|
79
|
+
parameters.gov.economic_assumptions.yoy_growth.obr.council_tax
|
80
|
+
)
|
81
|
+
region = current_year.household["region"]
|
82
|
+
country = np.select(
|
83
|
+
[
|
84
|
+
region == "WALES",
|
85
|
+
region == "SCOTLAND",
|
86
|
+
region == "NORTHERN IRELAND",
|
87
|
+
],
|
88
|
+
[
|
89
|
+
"WALES",
|
90
|
+
"SCOTLAND",
|
91
|
+
"NORTHERN IRELAND",
|
92
|
+
],
|
93
|
+
default="ENGLAND",
|
94
|
+
)
|
95
|
+
growth_rates = np.select(
|
96
|
+
[
|
97
|
+
country == "ENGLAND",
|
98
|
+
country == "WALES",
|
99
|
+
country == "SCOTLAND",
|
100
|
+
],
|
101
|
+
[
|
102
|
+
council_tax.england(current_year.time_period),
|
103
|
+
council_tax.wales(current_year.time_period),
|
104
|
+
council_tax.scotland(current_year.time_period),
|
105
|
+
],
|
106
|
+
default=0,
|
107
|
+
)
|
108
|
+
|
109
|
+
current_year.household["council_tax"] = previous_year.household[
|
110
|
+
"council_tax"
|
111
|
+
] * (1 + growth_rates)
|
112
|
+
return current_year
|
113
|
+
|
114
|
+
|
115
|
+
def uprate_rent(
|
116
|
+
current_year: UKSingleYearDataset,
|
117
|
+
previous_year: UKSingleYearDataset,
|
118
|
+
parameters: ParameterNode,
|
119
|
+
):
|
120
|
+
# Uprate rent for a single year dataset.
|
121
|
+
is_private_rented = (
|
122
|
+
current_year.household["tenure_type"] == "RENT_PRIVATELY"
|
123
|
+
)
|
124
|
+
region = current_year.household["region"]
|
125
|
+
prev_rent = previous_year.household["rent"]
|
126
|
+
growth = parameters.gov.economic_assumptions.yoy_growth
|
127
|
+
year = int(current_year.time_period)
|
128
|
+
social_rent_growth = growth.obr.social_rent(year)
|
129
|
+
|
130
|
+
if year < 2022:
|
131
|
+
raise ValueError(
|
132
|
+
"Rent uprating is not supported for years before 2022."
|
133
|
+
)
|
134
|
+
elif year < 2025:
|
135
|
+
# We have regional growth rates for private rent.
|
136
|
+
regional_growth_rate = growth.ons.private_rental_prices(year)[
|
137
|
+
region.values
|
138
|
+
]
|
139
|
+
current_year.household["rent"] = np.where(
|
140
|
+
is_private_rented,
|
141
|
+
prev_rent * (1 + regional_growth_rate),
|
142
|
+
prev_rent * (1 + social_rent_growth),
|
143
|
+
)
|
144
|
+
elif year >= 2025:
|
145
|
+
# Back out private rent growth from the aggregate
|
146
|
+
# from latest English Housing Survey data
|
147
|
+
PRIVATE_RENTAL_HOUSEHOLDS = 0.188
|
148
|
+
SOCIAL_RENTAL_HOUSEHOLDS = 0.164
|
149
|
+
|
150
|
+
total_rental_households = (
|
151
|
+
PRIVATE_RENTAL_HOUSEHOLDS + SOCIAL_RENTAL_HOUSEHOLDS
|
152
|
+
)
|
153
|
+
|
154
|
+
private_weight = PRIVATE_RENTAL_HOUSEHOLDS / total_rental_households
|
155
|
+
social_weight = SOCIAL_RENTAL_HOUSEHOLDS / total_rental_households
|
156
|
+
|
157
|
+
aggregate_growth = growth.obr.rent(year)
|
158
|
+
private_rent_growth = (
|
159
|
+
aggregate_growth - social_weight * social_rent_growth
|
160
|
+
) / private_weight
|
161
|
+
print(
|
162
|
+
f"Backed out private rent growth: {private_rent_growth:.1%} in {year}"
|
163
|
+
)
|
164
|
+
print(f"OBR aggregate rent growth: {aggregate_growth:.1%} in {year}")
|
165
|
+
print(f"Social rent growth: {social_rent_growth:.1%} in {year}")
|
166
|
+
|
167
|
+
current_year.household["rent"] = np.where(
|
168
|
+
is_private_rented,
|
169
|
+
prev_rent * (1 + private_rent_growth),
|
170
|
+
prev_rent * (1 + social_rent_growth),
|
171
|
+
)
|
172
|
+
|
173
|
+
return current_year
|
174
|
+
|
175
|
+
|
176
|
+
def reset_uprating(
|
177
|
+
dataset: UKMultiYearDataset,
|
178
|
+
):
|
179
|
+
# Remove all uprating from the dataset.
|
180
|
+
|
181
|
+
first_year = min(dataset.datasets.keys())
|
182
|
+
for year in dataset.datasets:
|
183
|
+
if year != first_year:
|
184
|
+
dataset.datasets[year] = dataset.datasets[first_year].copy()
|
@@ -0,0 +1,87 @@
|
|
1
|
+
gov.economic_assumptions.yoy_growth.obr.average_earnings:
|
2
|
+
- employee_pension_contributions
|
3
|
+
- employer_pension_contributions
|
4
|
+
- employment_income
|
5
|
+
- employment_income_before_lsr
|
6
|
+
- personal_pension_contributions
|
7
|
+
- student_loan_repayments
|
8
|
+
gov.economic_assumptions.yoy_growth.obr.consumer_price_index:
|
9
|
+
- afcs_reported
|
10
|
+
- alcohol_and_tobacco_consumption
|
11
|
+
- attendance_allowance_reported
|
12
|
+
- bsp_reported
|
13
|
+
- carers_allowance_reported
|
14
|
+
- child_benefit_reported
|
15
|
+
- child_tax_credit_reported
|
16
|
+
- childcare_expenses
|
17
|
+
- clothing_and_footwear_consumption
|
18
|
+
- communication_consumption
|
19
|
+
- diesel_spending
|
20
|
+
- dla_m_reported
|
21
|
+
- dla_sc_reported
|
22
|
+
- domestic_energy_consumption
|
23
|
+
- education_consumption
|
24
|
+
- esa_contrib_reported
|
25
|
+
- esa_income_reported
|
26
|
+
- food_and_non_alcoholic_beverages_consumption
|
27
|
+
- free_school_fruit_veg
|
28
|
+
- free_school_meals
|
29
|
+
- free_school_milk
|
30
|
+
- health_consumption
|
31
|
+
- household_furnishings_consumption
|
32
|
+
- housing_benefit_reported
|
33
|
+
- housing_water_and_electricity_consumption
|
34
|
+
- iidb_reported
|
35
|
+
- incapacity_benefit_reported
|
36
|
+
- income_support_reported
|
37
|
+
- jsa_contrib_reported
|
38
|
+
- jsa_income_reported
|
39
|
+
- maintenance_expenses
|
40
|
+
- maternity_allowance_reported
|
41
|
+
- miscellaneous_consumption
|
42
|
+
- pension_credit_reported
|
43
|
+
- petrol_spending
|
44
|
+
- pip_dl_reported
|
45
|
+
- pip_m_reported
|
46
|
+
- recreation_consumption
|
47
|
+
- restaurants_and_hotels_consumption
|
48
|
+
- sda_reported
|
49
|
+
- state_pension
|
50
|
+
- state_pension_reported
|
51
|
+
- statutory_maternity_pay
|
52
|
+
- statutory_paternity_pay
|
53
|
+
- statutory_sick_pay
|
54
|
+
- transport_consumption
|
55
|
+
- universal_credit_reported
|
56
|
+
- winter_fuel_allowance_reported
|
57
|
+
- working_tax_credit_reported
|
58
|
+
gov.economic_assumptions.yoy_growth.obr.mortgage_interest:
|
59
|
+
- mortgage_interest_repayment
|
60
|
+
gov.economic_assumptions.yoy_growth.obr.per_capita.gdp:
|
61
|
+
- capital_gains
|
62
|
+
- capital_gains_before_response
|
63
|
+
- corporate_wealth
|
64
|
+
- dividend_income
|
65
|
+
- gross_financial_wealth
|
66
|
+
- lump_sum_income
|
67
|
+
- main_residence_value
|
68
|
+
- maintenance_income
|
69
|
+
- miscellaneous_income
|
70
|
+
- mortgage_capital_repayment
|
71
|
+
- net_financial_wealth
|
72
|
+
- non_residential_property_value
|
73
|
+
- other_investment_income
|
74
|
+
- other_residential_property_value
|
75
|
+
- owned_land
|
76
|
+
- pension_income
|
77
|
+
- private_transfer_income
|
78
|
+
- property_income
|
79
|
+
- savings
|
80
|
+
- savings_interest_income
|
81
|
+
- sublet_income
|
82
|
+
gov.economic_assumptions.yoy_growth.obr.per_capita.mixed_income:
|
83
|
+
- self_employment_income
|
84
|
+
gov.economic_assumptions.yoy_growth.obr.private_pension_index:
|
85
|
+
- private_pension_income
|
86
|
+
gov.economic_assumptions.yoy_growth.ons.population:
|
87
|
+
- household_weight
|
@@ -257,7 +257,7 @@ obr:
|
|
257
257
|
description: Rent year-on-year growth (CPI+1%, one year lagged).
|
258
258
|
values:
|
259
259
|
2022-01-01: 0.050
|
260
|
-
2023-01-01: 0.
|
260
|
+
2023-01-01: 0.070
|
261
261
|
2024-01-01: 0.067
|
262
262
|
2025-01-01: 0.033
|
263
263
|
2026-01-01: 0.042
|
@@ -270,6 +270,25 @@ obr:
|
|
270
270
|
reference:
|
271
271
|
- title: OBR EFO March 2025
|
272
272
|
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
|
273
|
+
rent:
|
274
|
+
description: Rent year-on-year growth, private and social (ONS series D7GQ).
|
275
|
+
|
276
|
+
values:
|
277
|
+
2022-01-01: 0.041
|
278
|
+
2023-01-01: 0.063
|
279
|
+
2024-01-01: 0.074
|
280
|
+
2025-01-01: 0.057
|
281
|
+
2026-01-01: 0.036
|
282
|
+
2027-01-01: 0.027
|
283
|
+
2028-01-01: 0.023
|
284
|
+
2029-01-01: 0.024
|
285
|
+
|
286
|
+
metadata:
|
287
|
+
unit: /1
|
288
|
+
label: rent growth
|
289
|
+
reference:
|
290
|
+
- title: OBR EFO March 2025
|
291
|
+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
|
273
292
|
|
274
293
|
ons:
|
275
294
|
population:
|
@@ -290,6 +309,177 @@ ons:
|
|
290
309
|
reference:
|
291
310
|
- title: ONS Population Projections
|
292
311
|
href: https://www.ons.gov.uk/
|
312
|
+
private_rental_prices:
|
313
|
+
UNITED_KINGDOM:
|
314
|
+
description: Private rental prices year-on-year growth in United Kingdom.
|
315
|
+
values:
|
316
|
+
2022-01-01: 0.050398
|
317
|
+
2023-01-01: 0.080953
|
318
|
+
2024-01-01: 0.086137
|
319
|
+
metadata:
|
320
|
+
unit: /1
|
321
|
+
label: united kingdom private rental prices growth
|
322
|
+
reference:
|
323
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
324
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
325
|
+
ENGLAND:
|
326
|
+
description: Private rental prices year-on-year growth in England.
|
327
|
+
values:
|
328
|
+
2022-01-01: 0.048965
|
329
|
+
2023-01-01: 0.078981
|
330
|
+
2024-01-01: 0.08694
|
331
|
+
metadata:
|
332
|
+
unit: /1
|
333
|
+
label: england private rental prices growth
|
334
|
+
reference:
|
335
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
336
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
337
|
+
WALES:
|
338
|
+
description: Private rental prices year-on-year growth in Wales.
|
339
|
+
values:
|
340
|
+
2022-01-01: 0.049352
|
341
|
+
2023-01-01: 0.090369
|
342
|
+
2024-01-01: 0.082778
|
343
|
+
metadata:
|
344
|
+
unit: /1
|
345
|
+
label: wales private rental prices growth
|
346
|
+
reference:
|
347
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
348
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
349
|
+
SCOTLAND:
|
350
|
+
description: Private rental prices year-on-year growth in Scotland.
|
351
|
+
values:
|
352
|
+
2022-01-01: 0.062296
|
353
|
+
2023-01-01: 0.107356
|
354
|
+
2024-01-01: 0.073967
|
355
|
+
metadata:
|
356
|
+
unit: /1
|
357
|
+
label: scotland private rental prices growth
|
358
|
+
reference:
|
359
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
360
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
361
|
+
NORTHERN_IRELAND:
|
362
|
+
description: Private rental prices year-on-year growth in Northern Ireland.
|
363
|
+
values:
|
364
|
+
2022-01-01: 0.08965
|
365
|
+
2023-01-01: 0.089197
|
366
|
+
2024-01-01: 0.090822
|
367
|
+
metadata:
|
368
|
+
unit: /1
|
369
|
+
label: northern ireland private rental prices growth
|
370
|
+
reference:
|
371
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
372
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
373
|
+
NORTH_EAST:
|
374
|
+
description: Private rental prices year-on-year growth in North East.
|
375
|
+
values:
|
376
|
+
2022-01-01: 0.042495
|
377
|
+
2023-01-01: 0.055804
|
378
|
+
2024-01-01: 0.073116
|
379
|
+
metadata:
|
380
|
+
unit: /1
|
381
|
+
label: north east private rental prices growth
|
382
|
+
reference:
|
383
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
384
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
385
|
+
NORTH_WEST:
|
386
|
+
description: Private rental prices year-on-year growth in North West.
|
387
|
+
values:
|
388
|
+
2022-01-01: 0.062822
|
389
|
+
2023-01-01: 0.07947
|
390
|
+
2024-01-01: 0.094498
|
391
|
+
metadata:
|
392
|
+
unit: /1
|
393
|
+
label: north west private rental prices growth
|
394
|
+
reference:
|
395
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
396
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
397
|
+
YORKSHIRE:
|
398
|
+
description:
|
399
|
+
Private rental prices year-on-year growth in Yorkshire and The
|
400
|
+
Humber.
|
401
|
+
values:
|
402
|
+
2022-01-01: 0.05625
|
403
|
+
2023-01-01: 0.072295
|
404
|
+
2024-01-01: 0.063506
|
405
|
+
metadata:
|
406
|
+
unit: /1
|
407
|
+
label: yorkshire and the humber private rental prices growth
|
408
|
+
reference:
|
409
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
410
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
411
|
+
EAST_MIDLANDS:
|
412
|
+
description: Private rental prices year-on-year growth in East Midlands.
|
413
|
+
values:
|
414
|
+
2022-01-01: 0.053405
|
415
|
+
2023-01-01: 0.067085
|
416
|
+
2024-01-01: 0.087371
|
417
|
+
metadata:
|
418
|
+
unit: /1
|
419
|
+
label: east midlands private rental prices growth
|
420
|
+
reference:
|
421
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
422
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
423
|
+
WEST_MIDLANDS:
|
424
|
+
description: Private rental prices year-on-year growth in West Midlands.
|
425
|
+
values:
|
426
|
+
2022-01-01: 0.043415
|
427
|
+
2023-01-01: 0.077504
|
428
|
+
2024-01-01: 0.084456
|
429
|
+
metadata:
|
430
|
+
unit: /1
|
431
|
+
label: west midlands private rental prices growth
|
432
|
+
reference:
|
433
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
434
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
435
|
+
EAST_OF_ENGLAND:
|
436
|
+
description: Private rental prices year-on-year growth in East of England.
|
437
|
+
values:
|
438
|
+
2022-01-01: 0.044759
|
439
|
+
2023-01-01: 0.058668
|
440
|
+
2024-01-01: 0.077271
|
441
|
+
metadata:
|
442
|
+
unit: /1
|
443
|
+
label: east of england private rental prices growth
|
444
|
+
reference:
|
445
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
446
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
447
|
+
LONDON:
|
448
|
+
description: Private rental prices year-on-year growth in London.
|
449
|
+
values:
|
450
|
+
2022-01-01: 0.042829
|
451
|
+
2023-01-01: 0.095307
|
452
|
+
2024-01-01: 0.103031
|
453
|
+
metadata:
|
454
|
+
unit: /1
|
455
|
+
label: london private rental prices growth
|
456
|
+
reference:
|
457
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
458
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
459
|
+
SOUTH_EAST:
|
460
|
+
description: Private rental prices year-on-year growth in South East.
|
461
|
+
values:
|
462
|
+
2022-01-01: 0.050307
|
463
|
+
2023-01-01: 0.071938
|
464
|
+
2024-01-01: 0.077617
|
465
|
+
metadata:
|
466
|
+
unit: /1
|
467
|
+
label: south east private rental prices growth
|
468
|
+
reference:
|
469
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
470
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
471
|
+
SOUTH_WEST:
|
472
|
+
description: Private rental prices year-on-year growth in South West.
|
473
|
+
values:
|
474
|
+
2022-01-01: 0.059055
|
475
|
+
2023-01-01: 0.069351
|
476
|
+
2024-01-01: 0.06671
|
477
|
+
metadata:
|
478
|
+
unit: /1
|
479
|
+
label: south west private rental prices growth
|
480
|
+
reference:
|
481
|
+
- title: ONS Index of Private Housing Rental Prices, UK monthly estimates
|
482
|
+
href: https://www.ons.gov.uk/economy/inflationandpriceindices/datasets/indexofprivatehousingrentalpricesreferencetables
|
293
483
|
ofwat:
|
294
484
|
water_bills:
|
295
485
|
description: Water and sewerage bills year-on-year growth.
|
policyengine_uk/system.py
CHANGED
@@ -6,7 +6,10 @@ from policyengine_core.simulations import (
|
|
6
6
|
Simulation as CoreSimulation,
|
7
7
|
Microsimulation as CoreMicrosimulation,
|
8
8
|
)
|
9
|
-
from policyengine_uk.data.dataset_schema import
|
9
|
+
from policyengine_uk.data.dataset_schema import (
|
10
|
+
UKSingleYearDataset,
|
11
|
+
UKMultiYearDataset,
|
12
|
+
)
|
10
13
|
from policyengine_core.tools.hugging_face import download_huggingface_dataset
|
11
14
|
|
12
15
|
import pandas as pd
|
@@ -183,9 +186,28 @@ class Microsimulation(CoreMicrosimulation):
|
|
183
186
|
if Path(dataset_file_path).exists():
|
184
187
|
if dataset_file_path.endswith(".h5"):
|
185
188
|
try:
|
186
|
-
|
187
|
-
|
189
|
+
UKSingleYearDataset.validate_file_path(
|
190
|
+
dataset_file_path
|
191
|
+
)
|
192
|
+
dataset = UKSingleYearDataset(
|
193
|
+
file_path=dataset_file_path
|
194
|
+
)
|
188
195
|
except:
|
196
|
+
pass
|
197
|
+
|
198
|
+
try:
|
199
|
+
UKMultiYearDataset.validate_file_path(
|
200
|
+
dataset_file_path
|
201
|
+
)
|
202
|
+
dataset = UKMultiYearDataset(
|
203
|
+
file_path=dataset_file_path
|
204
|
+
)
|
205
|
+
except Exception as e:
|
206
|
+
pass
|
207
|
+
|
208
|
+
if not isinstance(
|
209
|
+
dataset, (UKSingleYearDataset, UKMultiYearDataset)
|
210
|
+
):
|
189
211
|
dataset = Dataset.from_file(dataset_file_path)
|
190
212
|
|
191
213
|
super().__init__(*args, dataset=dataset, **kwargs)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
reforms:
|
2
2
|
- name: Raise basic rate by 1pp
|
3
|
-
expected_impact: 7.
|
3
|
+
expected_impact: 7.5
|
4
4
|
parameters:
|
5
5
|
gov.hmrc.income_tax.rates.uk[0].rate: 0.21
|
6
6
|
- name: Raise higher rate by 1pp
|
7
|
-
expected_impact: 4.
|
7
|
+
expected_impact: 4.7
|
8
8
|
parameters:
|
9
9
|
gov.hmrc.income_tax.rates.uk[1].rate: 0.42
|
10
10
|
- name: Raise personal allowance by ~800GBP/year
|
@@ -16,7 +16,7 @@ reforms:
|
|
16
16
|
parameters:
|
17
17
|
gov.hmrc.child_benefit.amount.additional: 25
|
18
18
|
- name: Reduce Universal Credit taper rate to 20%
|
19
|
-
expected_impact: -36.
|
19
|
+
expected_impact: -36.4
|
20
20
|
parameters:
|
21
21
|
gov.dwp.universal_credit.means_test.reduction_rate: 0.2
|
22
22
|
- name: Raise Class 1 main employee NICs rate to 10%
|
@@ -24,10 +24,10 @@ reforms:
|
|
24
24
|
parameters:
|
25
25
|
gov.hmrc.national_insurance.class_1.rates.employee.main: 0.1
|
26
26
|
- name: Raise VAT standard rate by 2pp
|
27
|
-
expected_impact: 18.
|
27
|
+
expected_impact: 18.9
|
28
28
|
parameters:
|
29
29
|
gov.hmrc.vat.standard_rate: 0.22
|
30
30
|
- name: Raise additional rate by 3pp
|
31
|
-
expected_impact: 5.
|
31
|
+
expected_impact: 5.3
|
32
32
|
parameters:
|
33
33
|
gov.hmrc.income_tax.rates.uk[2].rate: 0.48
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [2.40.1] - 2025-07-21 15:37:49
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Bug in handling downloads of UKMultiYearDataset from HuggingFace.
|
13
|
+
|
14
|
+
## [2.40.0] - 2025-07-21 13:23:31
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
- UKMultiYearDataset class to handle multiple fiscal years.
|
19
|
+
- Uprating of datasets using the `uprate` method.
|
20
|
+
|
8
21
|
## [2.39.3] - 2025-07-17 12:45:26
|
9
22
|
|
10
23
|
### Fixed
|
@@ -1967,6 +1980,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
1967
1980
|
|
1968
1981
|
|
1969
1982
|
|
1983
|
+
[2.40.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.40.0...2.40.1
|
1984
|
+
[2.40.0]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.3...2.40.0
|
1970
1985
|
[2.39.3]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.2...2.39.3
|
1971
1986
|
[2.39.2]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.1...2.39.2
|
1972
1987
|
[2.39.1]: https://github.com/PolicyEngine/openfisca-uk/compare/2.39.0...2.39.1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: policyengine-uk
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.40.1
|
4
4
|
Summary: PolicyEngine tax and benefit system for the UK
|
5
5
|
Project-URL: Homepage, https://github.com/PolicyEngine/policyengine-uk
|
6
6
|
Project-URL: Repository, https://github.com/PolicyEngine/policyengine-uk
|
@@ -15,7 +15,7 @@ Classifier: Operating System :: POSIX
|
|
15
15
|
Classifier: Programming Language :: Python
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
17
17
|
Requires-Python: >=3.10
|
18
|
-
Requires-Dist: microdf-python
|
18
|
+
Requires-Dist: microdf-python==0.4.4
|
19
19
|
Requires-Dist: policyengine-core>=3.6.4
|
20
20
|
Provides-Extra: dev
|
21
21
|
Requires-Dist: black; extra == 'dev'
|
@@ -1,13 +1,13 @@
|
|
1
|
-
policyengine_uk/__init__.py,sha256=
|
1
|
+
policyengine_uk/__init__.py,sha256=ud1uvjBep-lcZKBWUd0eo-PAT_FM92_PqUlDp5OYl4g,355
|
2
2
|
policyengine_uk/entities.py,sha256=9yUbkUWQr3WydNE-gHhUudG97HGyXIZY3dkgQ6Z3t9A,1212
|
3
3
|
policyengine_uk/model_api.py,sha256=D5OuQpQbdBXiF6r7LvCLWjsTkAWtkeBJWz2ebsJ-GN0,189
|
4
4
|
policyengine_uk/modelled_policies.yaml,sha256=TLhvmkuI9ip-Fjq63n66RzDErCkN8K4BzY6XLxLMtFg,463
|
5
5
|
policyengine_uk/repo.py,sha256=-dqpIMUD7UUj94ql9XwaMrFJUYKvNhFQ_9uj83Z8uh0,55
|
6
|
-
policyengine_uk/system.py,sha256=
|
7
|
-
policyengine_uk/data/__init__.py,sha256=
|
8
|
-
policyengine_uk/data/dataset_schema.py,sha256=
|
9
|
-
policyengine_uk/data/economic_assumptions.py,sha256=
|
10
|
-
policyengine_uk/data/
|
6
|
+
policyengine_uk/system.py,sha256=jfMN-0cDBMsbqIgTenRxCblSY3o69YIeSWGFaBgF76s,9719
|
7
|
+
policyengine_uk/data/__init__.py,sha256=J0bZ3WnvPzZ4qfVLYcwOc4lziMUMdbcMqJ3xwjoekbM,101
|
8
|
+
policyengine_uk/data/dataset_schema.py,sha256=aiBxxEwuYQ5TobkX1U8PM0sQK9c58MGJHnHfL2Aymso,8215
|
9
|
+
policyengine_uk/data/economic_assumptions.py,sha256=YOwoY2Id5Zrhvz5hFbjZEc-maPCzNvNgsVD7xXzu5v4,5825
|
10
|
+
policyengine_uk/data/uprating_indices.yaml,sha256=kQtfeGWyqge4dbJhs0iF4kTMqovuegill_Zfs8orJi4,2394
|
11
11
|
policyengine_uk/parameters/gov/README.md,sha256=bHUep1_2pLHD3Or8SwjStOWXDIbW9OuYxOd4ml8IXcM,13
|
12
12
|
policyengine_uk/parameters/gov/benefit_uprating_cpi.yaml,sha256=2zOSdJeUhDZYYsKE2vLkcK-UbKNoOSVwfac0QIAp02g,250
|
13
13
|
policyengine_uk/parameters/gov/contrib/README.md,sha256=b282dmUFAmj7cXSfiMLyE81q5Y0Gnehy-6atLus-ESs,70
|
@@ -313,7 +313,7 @@ policyengine_uk/parameters/gov/dwp/winter_fuel_payment/eligibility/taxable_incom
|
|
313
313
|
policyengine_uk/parameters/gov/economic_assumptions/create_economic_assumption_indices.py,sha256=Z4dYghSit5gXo4V3wBpnLIc9zgTX4cfEyb_TUlJkTGY,1937
|
314
314
|
policyengine_uk/parameters/gov/economic_assumptions/lag_average_earnings.py,sha256=ksHcyUQkLAJmKizCeSg8j0hzPc7ajgIvbExWLgCra4U,701
|
315
315
|
policyengine_uk/parameters/gov/economic_assumptions/lag_cpi.py,sha256=IdtaMLN1_OSu-RFZsQV8vBlbOvXsPlnNlsOuinRHrxg,642
|
316
|
-
policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml,sha256
|
316
|
+
policyengine_uk/parameters/gov/economic_assumptions/yoy_growth.yaml,sha256=-jlJMshUlEw2D26ToNoToxidGmXdRECl8-n2owy9o2E,16734
|
317
317
|
policyengine_uk/parameters/gov/hmrc/README.md,sha256=nkHVZl6lsjI93sR8uC7wAbul3_61wJrsP08iaW8f5lk,7
|
318
318
|
policyengine_uk/parameters/gov/hmrc/minimum_wage.yaml,sha256=1oMbevU0ESHR51mcAG39POd1DA1FgPUep4hL6ojj-P4,2049
|
319
319
|
policyengine_uk/parameters/gov/hmrc/business_rates/README.md,sha256=9ud50i_gMjGj6VymF-nzFDTzkFRMMJx6ybpLwbWzvpI,17
|
@@ -528,7 +528,7 @@ policyengine_uk/reforms/policyengine/disable_simulated_benefits.py,sha256=siEs1E
|
|
528
528
|
policyengine_uk/tests/test_parameter_metadata.py,sha256=_2w2dSokAf5Jskye_KIL8eh80N7yIrUszlmqnZtwQws,450
|
529
529
|
policyengine_uk/tests/code_health/test_variables.py,sha256=9Y-KpmzhyRGy9eEqocK9z91NXHX5QIF3mDMNGvegb7Q,1398
|
530
530
|
policyengine_uk/tests/microsimulation/README.md,sha256=1toB1Z06ynlUielTrsAaeo9Vb-c3ZrB3tbbR4E1xUGk,3924
|
531
|
-
policyengine_uk/tests/microsimulation/reforms_config.yaml,sha256=
|
531
|
+
policyengine_uk/tests/microsimulation/reforms_config.yaml,sha256=nBWu7nUmxnK4DddKvtpYwqcBeMVKFMUo_hxyy84JPqg,1086
|
532
532
|
policyengine_uk/tests/microsimulation/test_reform_impacts.py,sha256=xM3M2pclEhA9JIFpnuiPMy1fEBFOKcSzroRPk73FPls,2635
|
533
533
|
policyengine_uk/tests/microsimulation/test_validity.py,sha256=RWhbSKrnrZCNQRVmGYlM8hnpe1_Blo5_xP8vr8u3kV0,694
|
534
534
|
policyengine_uk/tests/microsimulation/update_reform_impacts.py,sha256=2pxp2RNLWxV4CesGKKHmg3qBs79Jq2Jcq3GJIBk4euU,4824
|
@@ -1367,10 +1367,10 @@ policyengine_uk/variables/misc/spi_imputed.py,sha256=iPVlBF_TisM0rtKvO-3-PQ2UYCe
|
|
1367
1367
|
policyengine_uk/variables/misc/uc_migrated.py,sha256=zFNcUJaO8gwmbL1iY9GKgUt3G6J9yrCraqBV_5dCvlM,306
|
1368
1368
|
policyengine_uk/variables/misc/categories/lower_middle_or_higher.py,sha256=C54tHYz2DmOyvQYCC1bF8RJwRZinhAq_e3aYC-9F5fM,157
|
1369
1369
|
policyengine_uk/variables/misc/categories/lower_or_higher.py,sha256=81NIbLLabRr9NwjpUZDuV8IV8_mqmp5NM-CZvt55TwE,129
|
1370
|
-
policyengine_uk-2.
|
1371
|
-
policyengine_uk-2.
|
1372
|
-
policyengine_uk-2.
|
1373
|
-
policyengine_uk-2.
|
1374
|
-
policyengine_uk-2.
|
1375
|
-
policyengine_uk-2.
|
1376
|
-
policyengine_uk-2.
|
1370
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/CHANGELOG.md,sha256=1thWgvi6m-2TluD4E_pjDHWlMO9yylKoKoJI44sAWOw,57255
|
1371
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
1372
|
+
policyengine_uk-2.40.1.data/data/share/openfisca/openfisca-country-template/README.md,sha256=PCy7LRLdUDQS8U4PaeHeBVnyBZAqHv1dAVDDvEcom20,1976
|
1373
|
+
policyengine_uk-2.40.1.dist-info/METADATA,sha256=daR6DOfA6QpGQy4k8iW-m4nS-rpSt4sljKKw8Vk8Oac,3502
|
1374
|
+
policyengine_uk-2.40.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
1375
|
+
policyengine_uk-2.40.1.dist-info/licenses/LICENSE,sha256=dql8h4yceoMhuzlcK0TT_i-NgTFNIZsgE47Q4t3dUYI,34520
|
1376
|
+
policyengine_uk-2.40.1.dist-info/RECORD,,
|
@@ -1,83 +0,0 @@
|
|
1
|
-
Variable,Parameter,2022,2023,2024,2025,2026,2027,2028,2029
|
2
|
-
afcs_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
3
|
-
alcohol_and_tobacco_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
4
|
-
attendance_allowance_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
5
|
-
bsp_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
6
|
-
capital_gains,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
7
|
-
capital_gains_before_response,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
8
|
-
carers_allowance_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
9
|
-
child_benefit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
10
|
-
child_tax_credit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
11
|
-
childcare_expenses,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
12
|
-
clothing_and_footwear_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
13
|
-
communication_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
14
|
-
corporate_wealth,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
15
|
-
council_tax,gov.economic_assumptions.yoy_growth.obr.council_tax,0.053,0.056,0.064,0.046,0.045,0.046,0.045,0.045
|
16
|
-
diesel_spending,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
17
|
-
dividend_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
18
|
-
dla_m_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
19
|
-
dla_sc_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
20
|
-
domestic_energy_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
21
|
-
education_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
22
|
-
employee_pension_contributions,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
23
|
-
employer_pension_contributions,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
24
|
-
employment_income,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
25
|
-
employment_income_before_lsr,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
26
|
-
esa_contrib_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
27
|
-
esa_income_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
28
|
-
food_and_non_alcoholic_beverages_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
29
|
-
free_school_fruit_veg,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
30
|
-
free_school_meals,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
31
|
-
free_school_milk,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
32
|
-
gross_financial_wealth,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
33
|
-
health_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
34
|
-
household_furnishings_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
35
|
-
household_weight,gov.economic_assumptions.yoy_growth.ons.population,0.003,0.014,0.01,0.011,0.007,0.008,0.004,0.005
|
36
|
-
housing_benefit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
37
|
-
housing_water_and_electricity_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
38
|
-
iidb_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
39
|
-
incapacity_benefit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
40
|
-
income_support_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
41
|
-
jsa_contrib_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
42
|
-
jsa_income_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
43
|
-
lump_sum_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
44
|
-
main_residence_value,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
45
|
-
maintenance_expenses,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
46
|
-
maintenance_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
47
|
-
maternity_allowance_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
48
|
-
miscellaneous_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
49
|
-
miscellaneous_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
50
|
-
mortgage_capital_repayment,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
51
|
-
mortgage_interest_repayment,gov.economic_assumptions.yoy_growth.obr.mortgage_interest,0.262,0.485,0.221,0.136,0.126,0.082,0.042,0.047
|
52
|
-
net_financial_wealth,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
53
|
-
non_residential_property_value,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
54
|
-
other_investment_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
55
|
-
other_residential_property_value,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
56
|
-
owned_land,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
57
|
-
pension_credit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
58
|
-
pension_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
59
|
-
personal_pension_contributions,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
60
|
-
petrol_spending,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
61
|
-
pip_dl_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
62
|
-
pip_m_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
63
|
-
private_pension_income,gov.economic_assumptions.yoy_growth.obr.private_pension_index,0.05,0.05,0.05,0.047,0.037,0.022,0.021,0.023
|
64
|
-
private_transfer_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
65
|
-
property_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
66
|
-
recreation_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
67
|
-
rent,gov.economic_assumptions.yoy_growth.obr.rent,0.04,0.063,0.074,0.057,0.036,0.027,0.023,0.024
|
68
|
-
restaurants_and_hotels_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
69
|
-
savings,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
70
|
-
savings_interest_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
71
|
-
sda_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
72
|
-
self_employment_income,gov.economic_assumptions.yoy_growth.obr.per_capita.mixed_income,0.063,0.024,0.048,0.047,0.031,0.031,0.036,0.038
|
73
|
-
state_pension,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
74
|
-
state_pension_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
75
|
-
statutory_maternity_pay,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
76
|
-
statutory_paternity_pay,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
77
|
-
statutory_sick_pay,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
78
|
-
student_loan_repayments,gov.economic_assumptions.yoy_growth.obr.average_earnings,0.064,0.069,0.047,0.037,0.022,0.021,0.023,0.025
|
79
|
-
sublet_income,gov.economic_assumptions.yoy_growth.obr.per_capita.gdp,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
|
80
|
-
transport_consumption,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
81
|
-
universal_credit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
82
|
-
winter_fuel_allowance_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
83
|
-
working_tax_credit_reported,gov.economic_assumptions.yoy_growth.obr.consumer_price_index,0.1,0.057,0.023,0.032,0.019,0.02,0.02,0.02
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|