Vote up to Idea How to decode the Variables? Vote down to Idea How to decode the Variables?

Rank149

Idea#163

This idea is active.
API Technical Discussions »

How to decode the Variables?

I am looking at the examples of Request URL examples. I am wondering if the Variables follow any structure and if so were I can learn about it.

In another words, can those variables be interpreted to what data is requested? If so, is there a document that describe it?

Are the letters in the front has any significance/rules, and are the following digits follow any rules?

P012D007, B02001_001E, PCT012A015 etc....

Thanks,

Eitan

Comment

Submitted by eitanbarazani 1 year ago

Events

  1. The idea was posted
    1 year ago

Comments (9)

  1. Try my site for a bunch of URLs and a brief explanation of how the URLs are structured:

    http://www.databasezone.com/techdocs/CensusBureauAPIs.html

    1 year ago
  2. eitanbarazani Idea Submitter

    Hi Conrad,

    Thanks for you answer.

    I am getting the feeling that this variables are not following a set of rules, but rather they are randomly created? Am I right of wrong?

    Thanks,

    Eitan

    1 year ago
  3. The URLs follow a set of rules.

    1. The URL of the API of the data set you want, such as: http://api.census.gov/data/2011/acs5 for the 2011 ACS data set.

    2. Your key to get in, such as: ?key=b48301d897146e8f8efd9bef3c6eb1fcb864cf

    3. Followed by the table/column of the data you want, such as: &get=B23001_001E

    4. Followed by other data you want, such as the census area name: ,NAME

    5. And then the filters to limit your request to a specific state or other area.

    Look at the URLs in my site. You can edit them to see what happens when you make changes. Remember to apply for and use your own KEY so you can use it to run the URLs I provide.

    1 year ago
  4. Eitan,

    Save my pages to your computer or use View Source to see the actual Census API URLs.

    http://www.databasezone.com/techdocs/CensusPages/2011ACS5_Links&MOE-demo.html

    1 year ago
  5. eitanbarazani Idea Submitter

    Hi Conrad,

    I did get JSON data back, that wasn't the problem. The part I am puzzled about is how to decode the Variables, i.e. B23001_001E or P012D007, B02001_001E, PCT012A015 etc....

    Are those variable follow a set of rules?

    If you are given, for example, B23001_001E, can you tell what type of data this variable request?

    Thanks again,

    Eitan

    1 year ago
  6. Moderator

    Some info on ACS table coding is here: https://ask.census.gov/faq.php?id=5000&faqId=1687

    See also the tech doc at: http://www2.census.gov/acs2011_5yr/summaryfile/ACS_2007_2011_SF_Tech_Doc.pdf

    The full XML list of variables and what table cells they represent on the menu in the Data Sets tab at http://www.census.gov/developers/data/

    The API doesn't return that a this time once you make the call requesting the variables.

    1 year ago
  7. There are lists of the data available and the name of the variable, such as "B01001_001E".

    http://www.census.gov/developers/data/acs_5yr_2011_var.xml is a list of some 2011 ACS5 (5 yr) data, and where it is located by table and column

    http://www.census.gov/developers/data/sf1.xml is a list of some basic Census 2010 data, and where it is located by table and column.

    1 year ago
  8. Moderator

    For census data, try this.

    The data dictionary chapter (table/matrix section) in the technical documentation for each summary file provides the label that is associated with these data lines. The decennial tech docs are online at:

    http://www.census.gov/prod/www/decennial.html

    You must click to open each individual census year to access the technical documentation.

    For example, clicking on Census of Population and Housing, 2010, opens another set of links and then you can get Technical Documentation, and then the specific summary file. If you click on Summary File 1, the technical documentation opens (http://www.census.gov/prod/cen2010/doc/sf1.pdf). A search of PCT012A015 takes you to the page (6-181, or page 343 of the pdf) that says that this data line is for the count of White alone males age 12.

    1 year ago
  9. eitanbarazani Idea Submitter

    Thx!!

    Eitan

    1 year ago