census
census copied to clipboard
support for state_place_tract, state_place_blockgroup, and state_place_block
I have extended the census class to implement methods for getting data on the the tracts, blockgroups, and blocks that intersect with a census incorporated place.
https://github.com/datamade/census_area/blob/master/census_area/init.py
This use's the census's tiger web rest APIs to get the geometry of a place and then find the tracts, blocks groups, or blocks within the place. Because their API limits the complexity of target geometry to use for the intersection, I also use shapely to calculate intersections locally.
Is this functionality that you would like in this library. Shapely is, unfortunately, a kind of big dependency.
@fgregg I don't mean to steel any thunder here, but we might have something for you over at @uscensusbureau. The citysdk is a beta/prototype which includes these features. We use terraformer for the cross/nesting boundary functions yo seem to be looking for...
Thanks, @logantpowell, but I want a python solution.
yes, but that's a javascript solution.
On Mon, Oct 24, 2016 at 6:35 AM Logan [email protected] wrote:
@fgregg https://github.com/fgregg I don't mean to steel any thunder here, but we might have something for you over at @uscensusbureau https://github.com/uscensusbureau. The citysdk https://github.com/uscensusbureau/citysdk/blob/master/src/api/README.md is a beta/prototype which includes these features. We use terraformer http://terraformer.io for the cross/nesting boundary functions yo seem to be looking for...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sunlightlabs/census/issues/28#issuecomment-255716462, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgxbRuUaCDu3_h7rFb_2F_5wf6EyNPoks5q3JffgaJpZM4Kd568 .
@fgregg @logantpowell just noticed this issue, but I won't have time to dig into it until this weekend.
I just got word that a more reliable project maintainer might be taking over, hopefully more responsive than I am!
@jcarbaugh Great to hear and from you! @fgregg, We now have a Node API, which allows you to use the CitySDK from any language
@jcarbaugh that other project maintainer might be me (I told [email protected] that DataMade would be willing to adopt this project).
In any case, I would still like your opinion on whether the heavier dependencies contemplated in this issue make sense for this project.
@fgregg I was just put in touch with a contact at Commerce, but I'm not sure when transition will officially occur.
Shapely itself doesn't seem to be that big of a deal or add any additional dependencies, other than requiring GEOS to actually do stuff. I'd be hesitant to have GEOS be a requirement in general for running the project, but think it could make sense as a contrib-style submodule. census could still have shapely as a requirement, but move the use of shapely into a defined module. Accessing methods of that module could throw an error if GEOS isn't installed.
What do you think?
I like the idea of an optional features:
http://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
let me put together a PR, and you can see what you think.