Vote up to Idea Polygon, block group and census data Vote down to Idea Polygon, block group and census data

Rank 226

Idea#95

This idea is active.
API Technical Discussions »

Polygon, block group and census data

I would like to get census block group data for various groups that overlap with a polygon map overlay. If I can get the block groups and need say the number of Chinese of ages 18 to 34 in those block groups then how do I do a JavaScript query to get them?

Comment

Submitted by 1 year ago

Comments (6)

  1. According to the Decennial Summary file 1 documentation ( http://www.census.gov/developers/data/sf1.xml ) you appear to be talking about the variables "P012D007, P012D008, P012D009, P012D010, P012D011, and P012D012"

    Also according to the geography documentation we can limit based on block groups. ( http://api.census.gov/data/2010/sf1/geo.html )

    And so our final link would look something like:

    http://api.census.gov/data/2010/sf1?get=P012D007,P012D008,P012D009,P012D010,P012D011,P012D012&for=block+group:1&in=state:2+county:170+tract:000101&key=(yourkeyhere)

    Also this query works on my end, provided I substitute the withheld key with a valid one. As far as overlaying the data on a map, that is not knowledge I have available to me at this current moment.

    1 year ago
    1. Community Member Idea Submitter

      Thank you!!

      What about looking at say Chinese of ages 18 to 34?

      1 year ago
    2. Please refer to the first sentence of my previous post. I selected the variables within Decennial Summary File 1 that satisfies that requirement (they appear after the get= in the query as well).

      1 year ago
    3. Community Member Idea Submitter

      Thank u but that first link is a mess of data with no instructions saying how it is organized??

      1 year ago
    4. Community Member Idea Submitter

      Never mind ... My bad!!

      1 year ago
  2. For those who need help breaking down the link at this point:

    Host name, API sub-folder (this triggers our api to parse the following data).

    http://api.census.gov/data/

    This portion refers to the DataSet/Instance pair (without both, it's difficult to determine what number you want back)

    2010/sf1?

    This determines what variables to retrieve (required, must exist within the variable documentation for the API)

    get=P012D007,P012D008,P012D009,P012D010,P012D011,P012D012

    Geography, all currently available data sets require this to return proper numbers

    &for=block+group:1&in=state:2+county:170+tract:000101

    The reason for this is two-fold, allowing us to limit users, as well as providing us with information as to how many people are using what dataset.

    &key=(yourkeyhere)

    1 year ago

Vote Activity Show

Events

  1. The idea was posted
    1 year ago