Skip to content

Support SPP tables? #75

@c-zippel

Description

@c-zippel

Hi Claire and Arloc,

(I'm sorry for the weekend email. I just wanted to write this up/send this off now while it was fresh on my mind. And to let Arloc know that I found a solution in case he was going to spend any time looking into this.)

After lots of experimenting and reading through Census API documentation here's what I came up with. I wanted to share with you the details because I think it's pretty powerful, and maybe something that could be incorporated into GetCensus at some point. I think this could be particularly helpful for state groups and civil rights groups that want detailed info on different race and ethnic groups.

I found a solution using "Selected Population Profiles".
Here's the variable list: https://api.census.gov/data/2024/acs/acs1/spp/variables.html

It's pretty powerful because you can choose a population group and get a specific statistic for that group by whatever geography you want.

So to get poverty rates by state for Black AOIC, the url for the Census API would be:

https://api.census.gov/data/2023/acs/acs1/spp?get=NAME,S0201_255E&POPGROUP=005&for=state:*

S0201_255E is the statistic (S0201_255E   Estimate!!POVERTY RATES FOR FAMILIES AND PEOPLE FOR WHOM POVERTY STATUS IS DETERMINED!!All people, I found this through the variable list link above.)

POPGROUP=005 is how you choose the population group. Here's the list of possible population groups: https://api.census.gov/data/2024/acs/acs1/spp/variables/POPGROUP.json (There's a ton of them.)

I used the user-created censusapi command to get the data into stata so then I could combine different variables and generate tables:

censusapi, url(https://api.census.gov/data/2023/acs/acs1/spp?get=NAME,S0201_255E&POPGROUP=005&for=state:*)

I hope that's useful to you at some point,

Danilo

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions