Hi all -
API newbie question: How do I specify a school district as a location in an API call?
The following displays the ACS5 2020 table B14006 data for Flint Community Schools in the web interface: https://data.census.gov/cedsci/table?q=B14006&g=9700000US2614520
I assume I need &for=<something> but what is the syntax to specify a school district, and where can I find the districts' codes?
Thanks -
Jon
You need specify a state as well as the school district GEOID. In this case Michigan=26 and Flint City School District=14520. The following call will pull the whole table:
https://api.census.gov/data/2020…
https://api.census.gov/data/2020/acs/acs5?get=NAME,group(B14006)&for=school%20district%20(unified):14520&in=state:26
Or you can also request individual variables instead:
api.census.gov/.../acs5
Got it, thanks! (Coincidence: As my notification arrived, I was reading one of your pages! Thanks for that too.)