Changes

Jump to navigation Jump to search
no edit summary
=Notes=
The ACS releases datasets in October of the following year. It has the following datasets:*ACS5: 5-year estimates for a broad list of variables, from 2009-2020, covering 29,573 places.*ACS1: 1-year estimates from 2005-2020 for select variables for 630 places with populations of 65,000 people or 5 more*ACS1s: 1-year estimates. The five year estimates have supplements covering 2,323 places with 20,000 people or more information.
The 1 yr estimates are only available for places with populations of 65,000 people or more, the 1yr supplemental estimates cover down to places with 20,000 people or more, and the 5 yr estimates cover a whopping 29,573 places ACS provides information [https://www.census.gov/programs-surveys/acs/geography-acs/areas-published.html]on a broad range of geographies, including states, places, as compared with just 630 for the 1yr and 2,323 or the 1yr supplementszctas].
One can download the PUMS ==Other data for 2017 here: https://www2.census.gov/programs-surveys/acs/data/pums/2017/1-Year/ However, PUMS is only available for places in the [https://en.wikipedia.org/wiki/Public_Use_Microdata_Area Public Use Microdata Areas], which have a population 100,000 or more. sources==
And state-by-state, it looks possible to get the latest *PUMS data profiles (2013-for 2017 5 yr estimates) but not place by place as data, just as an aggregate:https://wwwwww2.census.gov/programs-surveys/acs/wwwdata/datapums/2017/data-tables1-Year/ *Population and-toolsother data are available from: http://census.ire.org/data-profiles/bulkdata.html*See also: [[Tiger Geocoder]], [[PostGIS Installation]]Note: PUMS is only available for places in the [https://en.wikipedia.org/wiki/Public_Use_Microdata_Area Public Use Microdata Areas], which have a population 100,000 or more.
For just population, also see: http://census.ire.org/data/bulkdata.html=Using api. This seems to be based on the 2000 or 2010 census data only.gov=
=Using The new approach is to use api.census.gov to request information. This applies to ACS and a broad range of other Census datasets. Each year has an API URL, which specifies the dataset and takes '''get''' and '''for''' name-value pairs that specify variables and geographies, respectively. The base URL for ACS is: '''https://api.census.gov/data/yyyy/acs/acsx/''', where yyyy is year and x is 1, 1s, 3 or 5. An example request is:*Requesting variable B06011_001E for ZCTAs from ACS5 for 2019: https://api.census.gov/data/2019/acs/acs5?get=NAME,B06011_001E&for=zip%20code%20tabulation%20area:
The new approach is to use api.census.gov to request information. Each year has an API URLPages listing available geographies, which specifies the dataset and that takes '''get''' and '''for''' name-value pairs that specify variables and geographies, respectively. Generally, one can request geography, variable, and some examples HTML pages are on the same base URL (rather than specifying the params). For, example:*The 2019 ACS5 available geographies: https://api.census.gov/data/2019/acs/acs5/geography.html*The 2019 ACS5 available variables: https://api.census.gov/data goes back to 2009 and /2019/acs/acs5/variables.html*Some example URLs for the ACS1 goes back to 2005 using the base URLAPI: '''https://api.census.gov/data/yyyy2019/acs/acsxacs5/''', where yyyy is year and x is 1 or 5examples.html
==get_ACS.py==
The script produces tab-delimited text files (to change to csv, edit line 63) with timestamped filenames.
Note: In the script, I rely on the response.json() method of request to handle the "JSON" produced by the API. I never use json.loads or similar. The Census doesn't adhere to any reasonable standards for encoding URLs or data.!
==Examples and Documentation==
 
For, example, for 2019, the URLs are:
*The 2019 ACS5 available geographies: https://api.census.gov/data/2019/acs/acs5/geography.html
*The 2019 ACS5 available variables: https://api.census.gov/data/2019/acs/acs5/variables.html
*Some example URLs for the API: https://api.census.gov/data/2019/acs/acs5/examples.html
*An example request: https://api.census.gov/data/2019/acs/acs5?get=NAME,B06011_001E&for=zip%20code%20tabulation%20area:
Example API calls for median income, educational attainment, and race from the 5yr ACS, using the 2019 dataset:

Navigation menu