Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sid-kap/housing-data
https://github.com/sid-kap/housing-data
apartments census construction housing yimby
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sid-kap/housing-data
- Owner: sid-kap
- Created: 2020-11-25T04:51:25.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T03:09:29.000Z (9 months ago)
- Last Synced: 2024-04-10T04:56:00.219Z (9 months ago)
- Topics: apartments, census, construction, housing, yimby
- Language: Python
- Homepage: http://housingdata.app
- Size: 2.27 MB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# housing-data
[housingdata](https://housingdata.app) 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](https://www.census.gov/construction/bps/index.html) (data publicly available) and Statistics Canada's [Building Permits](https://www23.statcan.gc.ca/imdb/p2SV.pl?Function=getSurvey&SDDS=2802) survey (not publicly available at the city level, I had to purchase it).
## Code structure
The raw data is stored as a combination of fixed-width, CSV, and Excel files at [https://github.com/sid-kap/housing-data-data](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.
## Getting Started
You should have `yarn` and `poetry` installed on your machine.
```sh
# 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
```