Skip to content
This repository has been archived by the owner on May 8, 2022. It is now read-only.

Add suggested changes #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions openfisca_data/datasets/us/cps/base_cps/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,17 @@ def generate(year):
family["family_id"] = family.F_FH_SEQ * 10 + family.F_FFPOS
household["household_id"] = household.H_H_SEQ

person["person_weight"] = person.P_A_FNLWGT
person["person_weight"] = person.P_MARSUPWT
tax_unit = pd.DataFrame(index=person.person_tax_unit_id.unique())
spm_unit = pd.DataFrame(index=person.person_spm_unit_id.unique())
tax_unit["tax_unit_id"] = tax_unit.index
spm_unit["spm_unit_id"] = spm_unit.index
tax_unit[
"tax_unit_weight"
] = 1e5 # not accurate, just a placeholder until development
spm_unit["spm_unit_weight"] = 1e5
spm_unit["spm_unit_weight"] = person.P_SPM_WEIGHT.groupby(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comment

person.person_spm_unit_id
).first()[spm_unit.index]
family["family_weight"] = family.F_FSUP_WGT
household["household_weight"] = household.H_HSUP_WGT

Expand Down