Skip to content

Commit

Permalink
Merge pull request #397 from andersonfrailey/removebens
Browse files Browse the repository at this point in the history
Remove PUF benefits
  • Loading branch information
andersonfrailey committed Jul 20, 2021
2 parents bc45734 + 8ba8ec7 commit be99f62
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
15 changes: 14 additions & 1 deletion createpuf.py
Expand Up @@ -122,7 +122,20 @@ def dataprep(data):
raw_cps["recid"] = range(1, len(raw_cps.index) + 1)
raw_cps["agerange"] = 0
raw_cps["eic"] = np.minimum(3, raw_cps["eic"])
raw_cps.drop(["mcaid_ben", "mcare_ben"], axis=1, inplace=True)
raw_cps.drop(
[
"mcaid_ben",
"mcare_ben",
"other_ben",
"snap_ben",
"housing_ben",
"ssi_ben",
"tanf_ben",
"vet_ben",
],
axis=1,
inplace=True,
)
raw_cps.to_csv(Path(DATA_PATH, "tu16.csv"), index=False)

# split CPS into filers and non-filers
Expand Down
6 changes: 0 additions & 6 deletions tests/puf_agg_expected.txt
Expand Up @@ -79,7 +79,6 @@ ffpos 281535 1 12
fips 6902069 1 56
g20500 17004763 0 720000
h_seq 11813805333 2 94097
housing_ben 0 0 0
k1bx14p -2191586538 -18990000 2341800
k1bx14s -155295865 -7244500 5459500
n1820 21900 0 3
Expand All @@ -88,14 +87,9 @@ n24 121996 0 9
nu06 42816 0 4
nu13 106110 0 7
nu18 152751 0 9
other_ben 250906580 0 88060
p08000 810824 0 31600
p22250 -630200978 -124900000 39410000
p23250 23291182672 -28160000 91220000
pencon_p 426344886 0 16500
pencon_s 280151210 0 16500
s006 18297348057 1 723334
snap_ben 65755832 0 24999
ssi_ben 47359967 0 39600
tanf_ben 6399833 0 36000
vet_ben 75246206 0 109000
12 changes: 6 additions & 6 deletions tests/records_metadata.json
Expand Up @@ -1084,7 +1084,7 @@
"form": {
"2014-20??": "determined using government benefit program data"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand Down Expand Up @@ -1157,7 +1157,7 @@
"form": {
"2014-20??": "imputed using the C-TAM model"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand All @@ -1169,7 +1169,7 @@
"form": {
"2014-20??": "imputed using the C-TAM model"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand All @@ -1181,7 +1181,7 @@
"form": {
"2014-20??": "imputed using the C-TAM model"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand All @@ -1193,7 +1193,7 @@
"form": {
"2014-20??": "imputed using the C-TAM model"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand All @@ -1205,7 +1205,7 @@
"form": {
"2014-20??": "imputed using the C-TAM model"
},
"availability": "taxdata_puf, taxdata_cps",
"availability": "taxdata_cps",
"range": {
"min": 0,
"max": 9e99
Expand Down

0 comments on commit be99f62

Please sign in to comment.