-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcensus_datasets.py
More file actions
170 lines (164 loc) · 5.34 KB
/
census_datasets.py
File metadata and controls
170 lines (164 loc) · 5.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
import folktables
from folktables import adult_filter,public_coverage_filter
import numpy as np
ACSIncome_categories = {
"COW": {
1.0: (
"Employee of a private for-profit company or"
"business, or of an individual, for wages,"
"salary, or commissions"
),
2.0: (
"Employee of a private not-for-profit, tax-exempt,"
"or charitable organization"
),
3.0: "Local government employee (city, county, etc.)",
4.0: "State government employee",
5.0: "Federal government employee",
6.0: (
"Self-employed in own not incorporated business,"
"professional practice, or farm"
),
7.0: (
"Self-employed in own incorporated business,"
"professional practice or farm"
),
8.0: "Working without pay in family business or farm",
9.0: "Unemployed and last worked 5 years ago or earlier or never worked",
},
"SCHL": {
1.0: "No schooling completed",
2.0: "Nursery school, preschool",
3.0: "Kindergarten",
4.0: "Grade 1",
5.0: "Grade 2",
6.0: "Grade 3",
7.0: "Grade 4",
8.0: "Grade 5",
9.0: "Grade 6",
10.0: "Grade 7",
11.0: "Grade 8",
12.0: "Grade 9",
13.0: "Grade 10",
14.0: "Grade 11",
15.0: "12th grade - no diploma",
16.0: "Regular high school diploma",
17.0: "GED or alternative credential",
18.0: "Some college, but less than 1 year",
19.0: "1 or more years of college credit, no degree",
20.0: "Associate's degree",
21.0: "Bachelor's degree",
22.0: "Master's degree",
23.0: "Professional degree beyond a bachelor's degree",
24.0: "Doctorate degree",
},
"MAR": {
1.0: "Married",
2.0: "Widowed",
3.0: "Divorced",
4.0: "Separated",
5.0: "Never married or under 15 years old",
},
"SEX": {1.0: "Male", 2.0: "Female"},
"RAC1P": {
1.0: "White alone",
2.0: "Black or African American alone",
3.0: "American Indian alone",
4.0: "Alaska Native alone",
5.0: (
"American Indian and Alaska Native tribes specified;"
"or American Indian or Alaska Native,"
"not specified and no other"
),
6.0: "Asian alone",
7.0: "Native Hawaiian and Other Pacific Islander alone",
8.0: "Some Other Race alone",
9.0: "Two or More Races",
},
}
ACSEmployment_categories = {
"COW": {
1.0: (
"Employee of a private for-profit company or"
"business, or of an individual, for wages,"
"salary, or commissions"
),
2.0: (
"Employee of a private not-for-profit, tax-exempt,"
"or charitable organization"
),
3.0: "Local government employee (city, county, etc.)",
4.0: "State government employee",
5.0: "Federal government employee",
6.0: (
"Self-employed in own not incorporated business,"
"professional practice, or farm"
),
7.0: (
"Self-employed in own incorporated business,"
"professional practice or farm"
),
8.0: "Working without pay in family business or farm",
9.0: "Unemployed and last worked 5 years ago or earlier or never worked",
},
"DIS": {
1.0: "With a disability",
2.0: "Without a disability"
},
"CIT":{
1.0: "Born in the U.S.",
2.0: "Born in Puerto Rico, Guam, the U.S. Virgin Islands, or the .Northern Marianas",
3.0: "Born abroad of American parent(s) ",
4.0: "U.S. citizen by naturalization",
5.0: "Not a citizen of the U.S. "
},
"SCHL": {
1.0: "No schooling completed",
2.0: "Nursery school, preschool",
3.0: "Kindergarten",
4.0: "Grade 1",
5.0: "Grade 2",
6.0: "Grade 3",
7.0: "Grade 4",
8.0: "Grade 5",
9.0: "Grade 6",
10.0: "Grade 7",
11.0: "Grade 8",
12.0: "Grade 9",
13.0: "Grade 10",
14.0: "Grade 11",
15.0: "12th grade - no diploma",
16.0: "Regular high school diploma",
17.0: "GED or alternative credential",
18.0: "Some college, but less than 1 year",
19.0: "1 or more years of college credit, no degree",
20.0: "Associate's degree",
21.0: "Bachelor's degree",
22.0: "Master's degree",
23.0: "Professional degree beyond a bachelor's degree",
24.0: "Doctorate degree",
},
"MAR": {
1.0: "Married",
2.0: "Widowed",
3.0: "Divorced",
4.0: "Separated",
5.0: "Never married or under 15 years old",
},
"SEX": {1.0: "Male", 2.0: "Female"},
"RAC1P": {
1.0: "White alone",
2.0: "Black or African American alone",
3.0: "American Indian alone",
4.0: "Alaska Native alone",
5.0: (
"American Indian and Alaska Native tribes specified;"
"or American Indian or Alaska Native,"
"not specified and no other"
),
6.0: "Asian alone",
7.0: "Native Hawaiian and Other Pacific Islander alone",
8.0: "Some Other Race alone",
9.0: "Two or More Races",
},
}