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
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
changed:
- Remove birth_year from FRS dataset generation to allow dynamic calculation
3 changes: 2 additions & 1 deletion policyengine_uk_data/datasets/frs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def create_frs(
# Add basic personal variables
age = person.age80 + person.age
pe_person["age"] = age
pe_person["birth_year"] = np.ones_like(person.age) * (year - age)
# birth_year should be calculated from age and period in the model,
# not stored as static data (see PolicyEngine/policyengine-uk#1352)
# Age fields are AGE80 (top-coded) and AGE in the adult and child tables, respectively.
pe_person["gender"] = np.where(person.sex == 1, "MALE", "FEMALE")
pe_person["hours_worked"] = np.maximum(person.tothours, 0) * 52
Expand Down
Loading