Skip to main content

homestock scrapes US Census Bureau data to calculate attainable housing stock for each census tract within a selected county.

Project description

🏡 homestock

image

image

homestock is a Python package designed to simplify access to American Community Survey (ACS) data from the U.S. Census Bureau. It enables users to fetch detailed demographic, housing, and economic data, and seamlessly convert the results into pandas DataFrames or CSV files for further analysis.

Whether you're exploring patterns at the state level or diving deep into neighborhoods using census tracts and block groups, homestock provides a flexible, scriptable workflow for researchers, students, journalists, and developers.


📊 What is the ACS?

The American Community Survey (ACS) is an ongoing survey conducted by the U.S. Census Bureau that collects vital information on income, education, housing, employment, and more.

There are two primary types of ACS data products:

🔹 1-Year Estimates

  • Based on data collected over 12 months
  • Available for areas with populations of 65,000+
  • Best for analyzing current trends in large cities or regions
  • Less stable for small populations due to smaller sample size

🔸 5-Year Estimates

  • Based on data collected over 60 months (5 years)
  • Available for all geographic areas, down to block groups
  • Best for granular spatial analysis or long-term planning
  • More reliable for small population areas

🗺️ Supported Geographic Levels

Geographic Level Description Available In
Nation Entire United States 1-Year, 5-Year
State Individual U.S. states 1-Year, 5-Year
County Counties within states 1-Year, 5-Year
County Subdivision Minor civil divisions (e.g., townships) 5-Year only
Place Incorporated places (cities, towns) 1-Year, 5-Year
ZIP Code Tabulation Area (ZCTA) Approximated ZIP Code boundaries 5-Year only
Metropolitan/Micropolitan Area Census-defined metro or micro areas 1-Year, 5-Year
Census Tract Small subdivisions of counties (~4,000 residents) 5-Year only
Block Group Subdivisions of tracts (~600–3,000 residents) 5-Year only
Block The smallest geography (~40–100 people) 5-Year only

⚙️ What Can You Do with homestock?

  • 🧩 Pull specific ACS tables by table ID (e.g., B19013 for median household income)
  • 📁 Convert results to pandas DataFrames or export them as .csv
  • 🌐 Query different geographic levels, from national down to individual blocks
  • 🔍 Explore metadata dynamically using Census variable labels
  • 🗺️ Use results in mapping tools like folium, geopandas, or leafmap

📦 Install

pip install homestock

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homestock-1.6.7.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homestock-1.6.7-py2.py3-none-any.whl (31.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file homestock-1.6.7.tar.gz.

File metadata

  • Download URL: homestock-1.6.7.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for homestock-1.6.7.tar.gz
Algorithm Hash digest
SHA256 78b305d9d38d58423995926c56f121c7301daf4b76b37e7b1ae364ebe97ee1b8
MD5 4074123077e7da2f56cd88312f3aa0f8
BLAKE2b-256 b4e5a2e034dd19ed12978b7a107ba0c9c1673e27a8b4da83a41ebc14b70cbc14

See more details on using hashes here.

File details

Details for the file homestock-1.6.7-py2.py3-none-any.whl.

File metadata

  • Download URL: homestock-1.6.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for homestock-1.6.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4d56e9f3d91d0359a88c716b93124de5c8c3b83a9c1664b1fb7234a6633077a5
MD5 9440ed0ed08c2aa70f7eb1687789332c
BLAKE2b-256 512f007618091c2cf4f526f50d456f09712d9faa0c068693615f5c92db638eed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page