Code
from folktables import ACSDataSource, ACSEmployment, BasicProblem, adult_filter
import numpy as np
= "MA"
STATE
= ACSDataSource(survey_year='2023', # Get more recent data
data_source ='1-Year',
horizon='person')
survey
= data_source.get_data(states=[STATE], download=True)
acs_data
acs_data.head()
RT | SERIALNO | DIVISION | SPORDER | PUMA | REGION | STATE | ADJINC | PWGTP | AGEP | ... | PWGTP71 | PWGTP72 | PWGTP73 | PWGTP74 | PWGTP75 | PWGTP76 | PWGTP77 | PWGTP78 | PWGTP79 | PWGTP80 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | P | 2023GQ0000077 | 1 | 1 | 503 | 1 | 25 | 1019518 | 11 | 89 | ... | 12 | 13 | 13 | 13 | 13 | 13 | 13 | 12 | 13 | 13 |
1 | P | 2023GQ0000098 | 1 | 1 | 613 | 1 | 25 | 1019518 | 11 | 20 | ... | 3 | 4 | 2 | 20 | 13 | 9 | 2 | 20 | 13 | 2 |
2 | P | 2023GQ0000109 | 1 | 1 | 613 | 1 | 25 | 1019518 | 80 | 68 | ... | 28 | 34 | 78 | 73 | 34 | 68 | 82 | 15 | 17 | 79 |
3 | P | 2023GQ0000114 | 1 | 1 | 801 | 1 | 25 | 1019518 | 69 | 21 | ... | 60 | 74 | 161 | 11 | 127 | 57 | 11 | 12 | 11 | 12 |
4 | P | 2023GQ0000135 | 1 | 1 | 1201 | 1 | 25 | 1019518 | 27 | 84 | ... | 27 | 28 | 27 | 29 | 27 | 29 | 27 | 27 | 28 | 27 |
5 rows × 287 columns