datamade / census_area Goto Github PK
View Code? Open in Web Editor NEW:large_blue_diamond: Get Census Data from the API for arbitrary areas
License: MIT License
:large_blue_diamond: Get Census Data from the API for arbitrary areas
License: MIT License
Since I'm new to these, I figured I'd start out by trying to reproduce the existing examples:
c = Census(api_key)
c.acs5.state_place_tract(('NAME', 'B25034_010E'), 17, 14000)
This raises a TypeError with the following message: " '<' not supported between instances of 'NoneType' and 'NoneType' "
I've been able to access other objects such as c.acs5.years, but the documentation isn't complete enough for me to troubleshoot this. Any help much appreciated!
It would be great if census_area handled the aggregations of census variables correctly.
I am trying to use the example from README.
old_homes_geojson = c.acs5.state_place_tract(('NAME', 'B25034_010E'), 17, 14000), return_geometry=True)
The code is missing a parenthesis. What is the correct format to get tract level geometries?
I am trying to get all the median household income in all census tracts in a county with their geometries.
c.acs5.state_county_tract('NAME',
states.CA.fips,
'075',
Census.ALL,
return_geometry=True)
We need to update the available years for 2018 (and maybe 2019?)
Working on this on the branch documentation
. I'll make a pull request when I think it's ready.
The example for how to use this package is pretty dry right now. We would do well to give more engaging examples, and show how this package can be incorporated into the workflow of an interesting project. (Examples could even be adapted directly from our work on the Crain's article.)
attempted this:
`from census_area import Census
api_key = "key"
c = Census(api_key)`
received this as an error:
Traceback (most recent call last): File "exploration.py", line 1, in <module> from census_area import Census File "/opt/anaconda3/lib/python3.7/site-packages/census_area/__init__.py", line 205, in <module> class SF3Client(census.core.SF3Client, GeoClient): AttributeError: module 'census.core' has no attribute 'SF3Client'
Was able to temporarily resolve this by just commenting out usage of SF3Client, but this doesn't seem like a long-term solution especially if I deploy my application to some place like Heroku/AWS/GCP.
The B25034_010E
value in the examples is a combination of a table identifer B25034
, a row identifier 010
, and whether you want the Estimate E
or Margin M
for that row.
How do you find these?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.