anastasia / mass-evictions-dashboard

Ongoing MIT DUSP research into housing precarity in Massachusetts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mass-evictions

Ongoing MIT DUSP research into housing precarity in Massachusetts.

DB Schema

mass_evictions schema

Setup

Written in Python 3.10.2

Install pyenv-virtualenv

Create the virtual Python environment:

pyenv virtualenv 3.10.2 mass-evictions

Trigger it automatically upon cd-ing into current dir

echo "mass-evictions" >> .python-version

Install Python dependencies:

pip install requirements.txt

Create a local settings file

cp config/settings/settings_local.example.py config/settings/settings_local.py

Update Database

Run sql file update_db.sql either by running file or copy pasting each line and making sure the tables have been updated with an id column

psql \c eviction_db
\dt
\x on;
select * from plaintiffs limit 5;

Migrate DB

./manage.py migrate     

to run Django shell (and make it nice)

./manage.py shell_plus

About

Ongoing MIT DUSP research into housing precarity in Massachusetts.

License:MIT License


Languages

Language:Python 100.0%