-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
475 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
// run from terminal (not console) with: | ||
// Rscript write_area_target_files.R <filename> | ||
|
||
// note: all text values must be in quotes | ||
{ | ||
"areatype": "state", // state or cd in quotes | ||
|
||
// "suffix": "A", // not present, or null, or a capital letter | ||
// "session": 118, // for areatype cd only: not present, or 117 or 118 | ||
|
||
// arealist: | ||
// cds: "all", or a list such as ["AK00", "DE00"] | ||
// Phase 4 cds: ["AK00", "DE00", "ID01", "ID02", "ME02", "MT00", "ND00", "PA08", "SD00", "WY00"], | ||
// states: "all", or a list such as ["ak", "de"] | ||
// Phase 6 states: ["AK", "MN", "NJ", "NM", "VA", "SC"] plus SC | ||
// For testing: ["MN"] | ||
"arealist": ["AK"], | ||
|
||
// target parameters | ||
"notzero": true, // true or false -- whether to allow zero-valued targets | ||
"notnegative": false, // true or false -- whether to allow negative-valued targets | ||
"targets": [ | ||
{ | ||
"varname": "c00100", // agi | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 1 // Single | ||
}, | ||
|
||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 2 // Married joint | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 4 // Head of household | ||
}, | ||
{ | ||
"varname": "e00200", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e00300", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e01500", // Total pensions and annuities | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e02400", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e18400", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e18400", | ||
"scope": 1, | ||
"count": 2, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e18500", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e18500", | ||
"scope": 1, | ||
"count": 2, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e26270", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
tmd/areas/targets/prepare/target_recipes/phase6_states_bak.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// run from terminal (not console) with: | ||
// Rscript write_area_target_files.R <filename> | ||
|
||
// note: all text values must be in quotes | ||
{ | ||
"areatype": "state", // state or cd in quotes | ||
|
||
// "suffix": "A", // not present, or null, or a capital letter | ||
// "session": 118, // for areatype cd only: not present, or 117 or 118 | ||
|
||
// arealist: | ||
// cds: "all", or a list such as ["AK00", "DE00"] | ||
// Phase 4 cds: ["AK00", "DE00", "ID01", "ID02", "ME02", "MT00", "ND00", "PA08", "SD00", "WY00"], | ||
// states: "all", or a list such as ["ak", "de"] | ||
// Phase 6 states: ["AK", "MN", "NJ", "NM", "VA", "SC"] plus SC | ||
// For testing: ["MN"] | ||
"arealist": "all", | ||
|
||
// target parameters | ||
"notzero": true, // true or false -- whether to allow zero-valued targets | ||
"notnegative": true, // true or false -- whether to allow negative-valued targets | ||
"targets": [ | ||
{ | ||
"varname": "c00100", // agi | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 1 // Single | ||
}, | ||
|
||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 2 // Married joint | ||
}, | ||
{ | ||
"varname": "c00100", // agi used to get total count | ||
"scope": 1, | ||
"count": 1, | ||
"fstatus": 4 // Head of household | ||
}, | ||
{ | ||
"varname": "e00200", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e00300", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e01500", // Total pensions and annuities | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e02400", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0 | ||
}, | ||
{ | ||
"varname": "e18400", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0, | ||
"agi_exclude": [1, 2] // not present, or a vector of agistubs to include | ||
}, | ||
{ | ||
"varname": "e18500", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0, | ||
"agi_exclude": [1, 2] | ||
}, | ||
{ | ||
"varname": "e26270", | ||
"scope": 1, | ||
"count": 0, | ||
"fstatus": 0, | ||
"agi_exclude": [1, 2, 3] // not present, or a vector of agistubs to include | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
tmd/areas/targets/prepare/target_recipes/test_variable_mapping.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
varname,basesoivname,description,fstatus | ||
XTOT,XTOT,Population,0 | ||
c00100,n1,Total number of returns,0 | ||
c00100,mars1,fstatus == 1,1 | ||
c00100,mars2,fstatus == 2,2 | ||
c00100,mars4,fstatus == 4,4 | ||
c00100,00100,Adjusted gross income,0 | ||
e00200,00200,Wages,0 | ||
e00300,00300,Taxable interest income,0 | ||
e01500,tmd01500_shared_by_soi01700,Pensions total,0 | ||
e02400,tmd02400_shared_by_soi02500,Social Security total,0 | ||
e26270,26270,Combined partnership and S corporation net income/loss,0 | ||
e18400,tmd18400_shared_by_soi18400,State and local income or sales taxes,0 | ||
e18500,tmd18500_shared_by_soi18500,State and local real estate taxes,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.