From 489d76356a0087073e30db0c58546316c6d62ae6 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Mon, 9 Mar 2026 10:36:24 -0400 Subject: [PATCH] Fix weekly hours worked deflation bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HRSWK and A_HRS1 are already weekly measures from the CPS — they don't need to be multiplied by WKSWORK/52. The old code deflated part-year workers' weekly hours (e.g. someone working 40 hrs/wk for 26 weeks showed as 20 hrs/wk). Fixes part of #561 Co-Authored-By: Claude Opus 4.6 --- policyengine_us_data/datasets/cps/cps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us_data/datasets/cps/cps.py b/policyengine_us_data/datasets/cps/cps.py index f932e0d5e..fd25b6b89 100644 --- a/policyengine_us_data/datasets/cps/cps.py +++ b/policyengine_us_data/datasets/cps/cps.py @@ -400,8 +400,8 @@ def add_personal_income_variables( # Assign CPS variables. cps["employment_income"] = person.WSAL_VAL - cps["weekly_hours_worked"] = person.HRSWK * person.WKSWORK / 52 - cps["hours_worked_last_week"] = person.A_HRS1 * person.WKSWORK / 52 + cps["weekly_hours_worked"] = person.HRSWK + cps["hours_worked_last_week"] = person.A_HRS1 cps["taxable_interest_income"] = person.INT_VAL * ( p["taxable_interest_fraction"]