Name File Type Size Last Modified
CensusAPI_PopulationSize_2020-07-30.csv text/csv 266 bytes 07/30/2020 10:13:AM
CensusAPI_PopulationSize_2020-07-30.ipynb text/plain 42.7 KB 07/30/2020 08:21:AM
CensusAPI_PopulationSize_2020-07-30.pdf application/pdf 335.5 KB 07/30/2020 10:19:AM

Project Citation: 

Gu, Donghwan, and Rosenheim, Nathanael. Demographic Analysis Workflow using Census API  in Jupyter Notebook: 1990-2000 Population Size and Change. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2020-07-30. https://doi.org/10.3886/E120381V1

Project Description

Summary:  View help for Summary This archive reproduces a table titled "Table 3.1 Boone county population size, 1990 and 2000" from Wang and vom Hofe (2007, p.58). The archive provides a Jupyter Notebook that uses Python and can be run in Google Colaboratory. The workflow uses Census API to retrieve data, reproduce the table, 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 1990 and 2000 Decennial Census (Summary File 1, 100% data). All downloaded data are maintained in the notebook's temporary working directory while in use. The data are also stored separately with this archive.

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 to perform the following functions:
  • install/import necessary Python packages
  • introduce a Census API Query
  • download Census data via CensusAPI 
  • manipulate Census tabular data 
  • calculate absolute change and percent change
  • formatting numbers
  • 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 Census API downloads. The notebook could 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 demographic characteristics; population size; population change; python; US Census API
Geographic Coverage:  View help for Geographic Coverage US Counties, Boone County, Kentucky
Time Period(s):  View help for Time Period(s) 1990 – 2000 (1990 and 2000)
Data Type(s):  View help for Data Type(s) administrative records data; aggregate data; census/enumeration data; images: photographs, drawings, graphical representations; program source code

Methodology

Data Source:  View help for Data Source United States Bureau of the Census, Data Set: 1990 and 2000 Summary File 1 (SF) Retrieved from api.census.gov
Geographic Unit:  View help for Geographic Unit US County

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.