housingdata is a webapp that displays trends in housing contruction in US and Canada cities, counties, metro areas and states/provinces from 1980 to present.
The data comes from the US Census's monthly Building Permits Survey (data publicly available) and Statistics Canada's Building Permits survey (not publicly available at the city level, I had to purchase it).
The raw data is stored as a combination of fixed-width, CSV, and Excel files at https://github.com/sid-kap/housing-data-data. I try to update the raw data files in that repo when BPS releases new data every month.
The raw data is converted to JSON files usable by the web front-end by python/pandas code that lives in python/
. That code runs in every Vercel deploy, which runs after new commits in main
. The JSON files are hosted as static assets by Vercel.
The front-end is written in React/Next.js and hosted by Vercel.
You should have yarn
and poetry
installed on your machine.
# Clone the raw data repo to ../housing-data-data
pushd ..
git clone https://github.com/sid-kap/housing-data-data
popd
# Set up the python venv
pushd python
poetry install
popd
# Run python code to build the static JSON files in ./public
./build_data_local.sh
# Run the local Next.js development server at http://localhost:3000
yarn dev