Demographic Analysis Workflow using Census API in Jupyter Notebook: 1990-2000 Population Size and Change

Resource Type
Dataset : administrative records data, aggregate data, census/enumeration data, images: photographs, drawings, graphical representations, program source code
  • Gu, Donghwan (Texas A&M University)
  • Rosenheim, Nathanael (Texas A&M University)
Publication Date
Funding Reference
  • National Institute for Standards and Technology
    • Award Number: 70NANB15H044
  • National Institute for Standards and Technology
    • Award Number: 70NANB20H008
  • Texas A&M University Department of Landscape Architecture and Urban Planning
  • Hazard Reduction and Recovery Center at Texas A&M University
Free Keywords
demographic characteristics; population size; population change; python; US Census API
  • Abstract

    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).
Temporal Coverage
  • 1990-01-01 / 2000-12-31
    Time Period: Mon Jan 01 00:00:00 EST 1990--Sun Dec 31 00:00:00 EST 2000 (1990 and 2000)
Geographic Coverage
  • US Counties
  • Boone County, Kentucky
Sampled Universe
Smallest Geographic Unit: US County
This study is freely available to the general public via web download.
  • Is version of
    DOI: 10.3886/E120381
  • Gu, Donghwan, and Nathanael Rosenheim. “CensusAPI_PopulationSize_2020_07_30.Ipynb,” July 30, 2020.
    • ID: (URL)
  • Wang, Xinhao, and Rainer vom Hofe. Research Methods in Urban and Regional Planning. Berlin, Heidelberg: Springer Berlin Heidelberg, 2007.
    • ID: 10.1007/978-3-540-49658-8 (DOI)

Update Metadata: 2020-07-30 | Issue Number: 1 | Registration Date: 2020-07-30