Skip to content

Carry FRS employer sector (mjobsect) and SIC industry into the dataset#433

Open
vahid-ahmadi wants to merge 2 commits into
mainfrom
carry-frs-employer-sector
Open

Carry FRS employer sector (mjobsect) and SIC industry into the dataset#433
vahid-ahmadi wants to merge 2 commits into
mainfrom
carry-frs-employer-sector

Conversation

@vahid-ahmadi

Copy link
Copy Markdown
Collaborator

What this does

Carries two existing FRS fields into the dataset (passthrough, not imputation — they're already in the FRS spine), populating the new Person-level variables added in PolicyEngine/policyengine-uk#1785:

  • employment_sector ← FRS mjobsect (public/private of main job), via categorical()NOT_EMPLOYED / PRIVATE / PUBLIC.
  • sic_industry_division ← FRS sic (SIC 2007 division; 84 = public administration & defence).

Mirrors the existing handling of employment_status (from empstati), region (from gvtregno), and tenure_type (from ptentyp2).

Validation (raw FRS 2022-23 person frame)

Output Result
employment_sector = PUBLIC 6,332 — exactly matches raw mjobsect == 2
employment_sector = PRIVATE 18,314
employment_sector = NOT_EMPLOYED 28,931 (non-workers + children)
unmapped / NaN 0
sic_industry_division == 84 (public admin) 2,999

Ordering

Depends on PolicyEngine/policyengine-uk#1785 (which defines the variables); that PR must merge/release first or the dataset build will not recognise the new variables.

Closes #432.

🤖 Generated with Claude Code

vahid-ahmadi and others added 2 commits June 17, 2026 18:12
Populate the new employment_sector (public/private, from FRS mjobsect) and
sic_industry_division (SIC 2007, from FRS sic) Person-level variables, using
the same categorical() passthrough pattern as employment_status and region.

Requires the matching variables in policyengine-uk (PolicyEngine/policyengine-uk#1785).
Closes #432

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Carry FRS employer sector (mjobsect) and SIC industry into the dataset

1 participant