Name File Type Size Last Modified
  CensusAPI_PopulationDistributionMap_Shapefiles_2020-07-31 07/31/2020 11:30:AM
CensusAPI_PopulationDistributionMap_2020-07-31.csv text/csv 3 KB 07/31/2020 07:10:AM
CensusAPI_PopulationDistributionMap_2020-07-31.html text/html 216.5 KB 07/31/2020 07:10:AM
CensusAPI_PopulationDistributionMap_2020-07-31.ipynb text/plain 408 KB 07/31/2020 06:51:AM
CensusAPI_PopulationDistributionMap_2020-07-31.pdf application/pdf 1.2 MB 07/31/2020 07:08:AM

Project Citation: 

Goodman, Cooper, Rosenheim, Nathanael, Day, Wayne, Gu, Donghwan, and Korukonda, Jayasaree. Population Distribution Workflow using Census API in Jupyter Notebook: Dynamic Map of Census Tracts in Boone County, KY, 2000. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2020-07-31. https://doi.org/10.3886/E120382V1

Project Description

Summary:  View help for Summary This archive reproduces a figure titled "Figure 3.2 Boone County population distribution" from Wang and vom Hofe (2007, p.60). The archive provides a Jupyter Notebook that uses Python and can be run in Google Colaboratory. The workflow uses the Census API to retrieve data, reproduce the figure, and ensure reproducibility for anyone accessing this archive.

The Python code was developed in Google Colaboratory, or Google Colab for short, which is an Integrated Development Environment (IDE) of JupyterLab and streamlines package installation, code collaboration, and management. The Census API is used to obtain population counts from the 2000 Decennial Census (Summary File 1, 100% data). Shapefiles are downloaded from the TIGER/Line FTP Server. All downloaded data are maintained in the notebook's temporary working directory while in use. The data and shapefiles are stored separately with this archive. The final map is also stored as an HTML file.

The notebook features extensive explanations, comments, code snippets, and code output. The notebook can be viewed in a PDF format or downloaded and opened in Google Colab. References to external resources are also provided for the various functional components. 

The notebook features code that performs the following functions:

  • install/import necessary Python packages
  • download the Census Tract shapefile from the TIGER/Line FTP Server
  • download Census data via CensusAPI 
  • manipulate Census tabular data 
  • merge Census data with TIGER/Line shapefile
  • apply a coordinate reference system
  • calculate land area and population density
  • map and export the map to HTML
  • export the map to ESRI shapefile
  • export the table to CSV

The notebook can be modified to perform the same operations for any county in the United States by changing the State and County FIPS code parameters for the TIGER/Line shapefile and Census API downloads. The notebook can be adapted for use in other environments (i.e., Jupyter Notebook) as well as reading and writing files to a local or shared drive, or cloud drive (i.e., Google Drive).

Funding Sources:  View help for Funding Sources National Institute for Standards and Technology (70NANB15H044); National Institute for Standards and Technology (70NANB20H008); Texas A&M University Department of Landscape Architecture and Urban Planning; Hazard Reduction and Recovery Center at Texas A&M University

Scope of Project

Subject Terms:  View help for Subject Terms census data; API; google colaboratory; google colab; population density; population distribution; jupyter notebook; US Census API; CensusAPI; Census API
Geographic Coverage:  View help for Geographic Coverage Census Tracts in Boone County, Kentucky
Time Period(s):  View help for Time Period(s) 2000 – 2000
Universe:  View help for Universe For Population: All Persons
Data Type(s):  View help for Data Type(s) aggregate data; census/enumeration data; geographic information system (GIS) data; images: photographs, drawings, graphical representations; program source code
Collection Notes:  View help for Collection Notes Python Environment Information

Python Version 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
requests version: 2.23.0
pandas version: 1.0.5
geopandas version: 0.8.1
folium version: 0.8.3


Methodology

Data Source:  View help for Data Source U.S. Census Bureau (2000). 2000 Decennial Census, Summary File 1 (SF 1) 100% Data. Retrieved from https://api.census.gov.

U.S. Census Bureau (2010). TIGER/Line: Census Tract Shapefiles 2000. Data retrieved from ftp://ftp2.census.gov/geo/tiger.
Unit(s) of Observation:  View help for Unit(s) of Observation Persons
Geographic Unit:  View help for Geographic Unit Census Tract

Related Publications

Published Versions

Export Metadata

Report a Problem

Found a serious problem with the data, such as disclosure risk or copyrighted content? Let us know.

This material is distributed exactly as it arrived from the data depositor. ICPSR has not checked or processed this material. Users should consult the investigator(s) if further information is desired.