The SafeGraph Developer Hub

Welcome to the SafeGraph developer hub. You'll find comprehensive guides and documentation to help you start working with SafeGraph as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Open Census Data

All data from American Community Survey 5-year Estimates by Census Block Group (CBG)

Overview

SafeGraph's Open Census Data includes the United States Census Bureau's American Community Survey 5-year Estimates (5-year ACS), reported at the Census Block Group level, for the release years 2016-2019.

There are five datasets available, which can be downloaded separately depending on your needs:

  • 2016 5-year ACS (1.1gb download, 5.1gb uncompressed)
  • 2017 5-year ACS (1.0gb download, 5.0gb uncompressed)
  • 2018 5-year ACS (1.1gb download, 5.3gb uncompressed)
  • 2019 5-year ACS (1.1gb download, 5.4gb uncompressed)
  • 2010-2019 Census Block Group geometries (300mb download, 1.8gb uncompressed)

Each ACS dataset includes two components:

  • All demographic data from the 5-year ACS for the given release year, reported at the census block group level.
  • Metadata files for parsing Census geographies and variable names.

The datasets are available for download for free :free+: at the SafeGraph Open Census Data page.

Check out the starter guide :tada+:: Everything you need to know to get started with Census and American Community Survey Data

Note that the 5-year ACS contains more precise but less current data than the 1-year ACS. Read more here about the trade-offs between the 5-year and 1-year ACS.

Schema

ACS Data

File Structure

Each ACS dataset is comprised of two directories:

  • /data/
    • Includes all Census attribute tables.
    • All files are comma-delimited CSVs where the Census Block Group ID (census_block_group) is the primary key.
    • Census attribute tables are identified by their Census table ID. For example, cbg_b01.csv contains the table IDs that begin with b01 such as B01001.
  • /geometry/
    • Contains one GeoJSON file entitled cbg.geojson with the polygons for all Census Block Groups.
  • /metadata/
    • cbg_field_descriptions.csv: a mapping between census attribute name and table ID
    • cbg_fips_codes.csv: a mapping between Census Block Group IDs to cities and counties
    • cbg_geographic_data.csv: statistics about Census Block Group geometry (land/water %, interpolated lat/long).

Census Demographic Data

Census Attribute Tables (/data/cbg_[tableid-prefix].csv)

Every attribute table contains several Table ID columns. The specific number of Table ID columns in an attribute table depends on the table ID prefix.

Note that the Table IDs available can vary by release year. For instance the tables beginning with prefix B29 were first made available in the 2018 5-year ACS. Year-to-year changes to ACS tables can be found here.

Column Name Description Type Example
census_block_group The unique 12-digit FIPS code for the Census Block Group. Please note that some CBGs have leading zeroes. String 010010201001
Table ID (e.g., B01001e1) The sample values associated with the table ID of interest. For example, if the table ID of interest was B01001e1 the value would be the SEX BY AGE: Total: Total population -- (Estimate) for the Census Block Group listed in census_block_group. Integer / Double For table ID B01001e1 in the 2019 release, an example value would be 730 for Census Block Group 010010201001.
Table ID As above
... As above Integer As above
[number of columns varies by file]

Field Descriptions (/metadata/cbg_field_descriptions.csv)

The field descriptions table provides a mapping between the table ID used in attribute tables and the description of the field. A full list of table definitions can be found in the American Community Survey documentation.

Note that the schema for the 2016 release differs from the schema used for the 2017-2019 releases.

2017-2019 schema

Column Name Description Example
table_id The Census Table ID as defined by the Census Bureau. B23007e36
table_number The sequence of numbers that identifies the table within a subject. B23007
table_title The name of the table. Presence Of Own Children Under 18 Years By Family Type By Employment Status
table_topics The topics covered by the table. Children, Employment and Labor Force Status, Family Size and Type
table_universe The subset of the population surveyed for this table. Opposite-sex married-couple families and families maintained by women and men with no spouse present
field_level_1 Whether the values for the Table ID represent an estimate or a margin of error. Estimate
field_level_2 The first level of demographic focus for the selected attribute. PRESENCE OF OWN CHILDREN UNDER 18 YEARS BY FAMILY TYPE BY EMPLOYMENT STATUS
field_level_3 The second level of demographic focus for the selected attribute. Opposite-sex married-couple families and families maintained by women and men with no spouse present
field_level_4 The third level of demographic focus for the selected attribute. Total
field_level_5 The fourth level of demographic focus for the selected attribute. No children under 18 years
field_level_6 The fifth level of demographic focus for the selected attribute. Married-couple family
field_level_7 The sixth level of demographic focus for the selected attribute. Husband in labor force
field_level_8 The seventh level of demographic focus for the selected attribute. Employed or in Armed Forces
field_level_9 The eighth level of demographic focus for the selected attribute. Wife in labor force
field_level_10 The ninth level of demographic focus for the selected attribute. Employed or in Armed Forces

2016 schema

Column Name Description Example
table_id The Census Table ID as defined by the Census Bureau. B23007e36
field_full_name The full name of the census attribute. Presence Of Own Children Under 18 Years By Family Type By Employment: No children under 18 years: Married-couple family: Husband in labor force: Employed or in Armed Forces: Wife in labor force: Employed or in Armed Forces: Opposite-sex married-couple families and families maintained by women and men with no spouse present -- (Estimate)
field_level_1 The first level of demographic focus for the selected attribute. Presence Of Own Children Under 18 Years By Family Type By Employment Status
field_level_2 The second level of demographic focus for the selected attribute. No Children Under 18 Years
field_level_3 The third level of demographic focus for the selected attribute. Married-Couple Family
field_level_4 The fourth level of demographic focus for the selected attribute. Husband In Labor Force
field_level_5 The fifth level of demographic focus for the selected attribute. Employed Or In Armed Forces
field_level_6 The sixth level of demographic focus for the selected attribute. Wife In Labor Force
field_level_7 The seventh level of demographic focus for the selected attribute. Employed Or In Armed Forces
field_level_8 The eighth level of demographic focus for the selected attribute. Opposite-Sex Married-Couple Families And Families Maintained By Women And Men With No Spouse Present -- (Estimate)

Other Reference Data

FIPS Codes (/metadata/cbg_fips_codes.csv)

The FIPS codes file provides a reference file to derive state and county for a census block group through the state and county FIPS codes. The first two digits of a Census Block Group represent the state_fips code and the next three digits represent a county_fips code.

Column Name Description Example
state State Abbreviation AL
state_fips The state FIPS code that maps to the first 2 digits of a CBG. 01
county_fips The county FIPS code that maps to the 3rd-5th digits of a CBG. 013
county County Name Butler County
class_code Geographic Class Code representing types of geographies per Census documentation. H1

Census Block Group Geometry Data

File Structure

The Census Block Group geometry dataset contains a single GeoJSON file titled cbg.geojson with the polygons for all Census Block Groups used by the Census Bureau between the years 2010-2019.

We publish the 2016 vintage of the Census Block Groups, which match the geometries used to produce our Patterns and Neighborhood Patterns products. Note that changes to county and state boundaries can cause minor changes to Census Block Group boundaries year-to-year.

Geographic Data (/metadata/cbg_geographic_data.csv)

Column Name Description Example
census_block_group Census Block Group ID 010010203001
amount_land The amount of land in the Census Block Group in square meters. 3866515
amount_water The amount of water in the Census Block Group in square meters. 9054
latitude The interpolated center latitude coordinate of the Census Block Group. 32.480175
longitude The interpolated center longitude coordinate of the Census Block Group. -86.4607925

Terms of Use

Census Data is made available under the CC0 license

This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.

Updated about a month ago


Open Census Data


All data from American Community Survey 5-year Estimates by Census Block Group (CBG)

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.