GithubHelp home page GithubHelp logo

datamade / census_area Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 10.0 275 KB

:large_blue_diamond: Get Census Data from the API for arbitrary areas

License: MIT License

Python 100.00%
census census-api geospatial python

census_area's People

Contributors

derekeder avatar fgregg avatar hancush avatar jeancochrane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

census_area's Issues

Unable to reproduce example in README

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!

image

state place tract with return_geometry argument doesn't work

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)

Add documentation

Working on this on the branch documentation. I'll make a pull request when I think it's ready.

Cannot import census_area library

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.

Finding the list of tables and fields

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.