The Census Bureau, starting on March 20, has been releasing daily data of the 2020 Census response rates through a well documented API. In NewsCounts we have been keeping track of these daily data and now we have it available for everyone who wants to use it through our own API.

Our API offers daily snapshots of the response rates, as opposed to the cumulative data that the Bureau’s API provides. Also our API gives the ability of retrieving data in JSON format, CSV files that can be opened in Excel, and it can create automated plots of the response rates.

Use examples

Downloading the data is as simple as going to a specific URL in your favorite web browser. For example, to get the response rates for all states go to:

https://newscounts.appspot.com/api/response_rates/state?FORMAT=CSV

With the daily state response data we can find out, for example, which New York counties have higher response rates and which counties are doing worst by the date this document is created (March 29).

county_name CRRALL
Niagara 37.8
Onondaga 37.4
Erie 37.3
Tioga 36.5
Monroe 36.4
county_name CRRALL
Hamilton 1.4
Sullivan 12.5
Essex 15.3
Delaware 16.4
Greene 16.9

By having the daily data we can do more interesting things, such as time series to look for trends in the response rates. We have included a function in the API that gives you automatic time series plots. For this example, by using the following URL, I can get a plot that compares the cumulative response rate for the states of California, New York, Pennsylvania and Alaska.

image_url <- "https://newscounts.appspot.com/api/response_rates/state?FORMAT=PNG&DATA=CRRALL&STATE=CA,NY,PA,AK"
Example automatic plot.

Example automatic plot.

As days pass by, we can look to more interesting trends not just for the state level, but also for counties and tracts.

Documentation

State data

Method: GET

URL: https://newscounts.appspot.com/api/response_rates/state

Response format: CSV and JSON for data, PNG for plot image.

Parameters:

Name Required Description Example
FORMAT Required JSON for data in that format. CSV if you want to download data in a CSV file. PNG if you want a time series plot. JSON
DATA Required if FORMAT is PNG List of values you want to get. It has to be at least one of the following separated by a comma: CRRAL, CRRINT, DAVG, DINTAVG, DRRALL, DRRINT. Select only one if FORMAT is PNG. If not present, all of them will be returned. CRRAL,DRRALL
FROM Required when TO is present Date with format YYYY-MM-DD 2020-03-23
TO Required when FROM is present Date with format YYYY-MM-DD 2020-03-25
STATE Required if FORMAT is PNG ISO 2 letter abbreviation for U.S. states. You can select many states separated by a comma. NY,CA

Example request:

https://newscounts.appspot.com/api/response_rates/state?FORMAT=JSON&DATA=CRRALL,DRRALL&STATE=NY&FROM=2020-03-23&TO=2020-03-25

Example response:

{"CRRALL":22.3,"DRRALL":2.2,"GEO_ID":"0400000US36","RESP_DATE":"2020-03-25","state":36,"state_name":"New York","state_short":"NY"},
{"CRRALL":20.1,"DRRALL":2.2,"GEO_ID":"0400000US36","RESP_DATE":"2020-03-24","state":36,"state_name":"New York","state_short":"NY"},
{"CRRALL":17.9,"DRRALL":1.5,"GEO_ID":"0400000US36","RESP_DATE":"2020-03-23","state":36,"state_name":"New York","state_short":"NY"}

County data

Method: GET

URL: https://newscounts.appspot.com/api/response_rates/county

Response format: CSV and JSON for data, PNG for plot image.

Parameters:

Name Required Description Example
FORMAT Required JSON for data in that format. CSV if you want to download data in a CSV file. PNG if you want a time series plot. JSON
DATA Required if FORMAT is PNG List of values you want to get. It has to be at least one of the following separated by a comma: CRRAL, CRRINT, DAVG, DINTAVG, DRRALL, DRRINT. Select only one if FORMAT is PNG. If not present, all of them will be returned. CRRAL,DRRALL
FROM Required when TO is present Date with format YYYY-MM-DD 2020-03-23
TO Required when FROM is present Date with format YYYY-MM-DD 2020-03-25
STATE Required if COUNTY is present ISO 2 letter abbreviation for U.S. states NY
COUNTY Required if FORMAT is PNG FIPS county codes. You can select many counties separated by a comma. 1,3

Example request:

https://newscounts.appspot.com/api/response_rates/county?FORMAT=JSON&DATA=CRRALL,DRRALL&STATE=NY&COUNTY=3&FROM=2020-03-23&TO=2020-03-25

Example response:

{"CRRALL":19.6,"DRRALL":1.5,"GEO_ID":"0500000US36003","RESP_DATE":"2020-03-25","county":"003","county_name":"Allegany","state":36,"state_name":"New York","state_short":"NY"},
{"CRRALL":18.1,"DRRALL":1.0,"GEO_ID":"0500000US36003","RESP_DATE":"2020-03-24","county":"003","county_name":"Allegany","state":36,"state_name":"New York","state_short":"NY"},
{"CRRALL":17.1,"DRRALL":0.5,"GEO_ID":"0500000US36003","RESP_DATE":"2020-03-23","county":"003","county_name":"Allegany","state":36,"state_name":"New York","state_short":"NY"}

Tract data

Method: GET

URL: https://newscounts.appspot.com/api/response_rates/tract

Response format: CSV and JSON for data, PNG for plot image.

Parameters:

Name Required Description Example
FORMAT Required JSON for data in that format. CSV if you want to download data in a CSV file. PNG if you want a time series plot. JSON
DATA Required if FORMAT is PNG List of values you want to get. It has to be at least one of the following separated by a comma: CRRAL, CRRINT, DAVG, DINTAVG, DRRALL, DRRINT. Select only one if FORMAT is PNG. If not present, all of them will be returned. CRRAL,DRRALL
FROM Required when TO is present Date with format YYYY-MM-DD 2020-03-23
TO Required when FROM is present Date with format YYYY-MM-DD 2020-03-25
STATE Required when COUNTY is present ISO 2 letter abbreviation for U.S. states NY
COUNTY Required when TRACT is present FIPS county codes 1 (For Autauga County in Alabama)
TRACT Required if FORMAT is PNG 2020 Census tract number. You can select many tracts separated by a comma. 020100

Example request:

https://newscounts.appspot.com/api/response_rates/tract?FORMAT=JSON&DATA=CRRALL,DRRALL&STATE=NY&COUNTY=3&FROM=2020-03-25&TO=2020-03-25&TRACT=950600

Example response:

{"CRRALL":24.9,"DRRALL":2.2,"GEO_ID":"1400000US36003950600","RESP_DATE":"2020-03-25","county":"003","county_name":"Allegany","state":36,"state_name":"New York","state_short":"NY","tract":"950600"}

DATA labels definition