uscensusbureau / citysdk

Convenient JavaScript utilities for working with Census APIs: Statistics, Cartographic GeoJSON, lat/lng -> FIPS, and other niceties (written in ClojureScript)
https://uscensusbureau.github.io/citysdk
MIT License
959 stars 184 forks source link

Enable easy retrieval of data for every block group within a city (Census Place) #112

Closed tyronegrandison closed 8 years ago

tyronegrandison commented 9 years ago

From Forest Gregg:

The container interface only is present for GeoJSON. Very often, I want to get data for every block group within a city (Census Place). This interface means that I have to download the geographies each time I want an additional piece of information.

@logantpowell @jmeisel Arman says that this is a CENSUS API issue.

afrasier commented 9 years ago

Census geographies don't align perfectly with city boundaries - thus, there's no hierarchical structure to define which block groups/tracts/etc. are within a city. This is why we have to grab the boundaries for the city and use the TigerWeb server to find all block groups that are within or intersect.

ghost commented 9 years ago

Arman is right, but I'm not even sure what Forest is asking for...

afrasier commented 9 years ago

Basically he wants to tell the ACS api "Give me the population of every block group within place 4000 in state 04"; but like we noted this can't be done because a place's geography doesn't fit in the census hierarchy. We have to use the boundary geographies as a request polygon to Tigerweb to get all of the Census block groups.

I could write a function that doe the request and throws away the geography, but that might be kind of pointless as the users would still be using the bandwidth for the geography, just throwing away that extra data when they get it.

ghost commented 9 years ago

@tyronegrandison can you tell him to do what @afrasier is recommending (i.e., use the custom boundary function with a census place to pull down the overlapping+nested boundaries)?