Mapusaurus is an open-source application that displays Home Mortgage Disclosure Act data in a geo-spatial interface.
This currently uses: Django 1.11 Python 3.7
You will also need: PostgreSQL > 9.3, including 10 PostGIS
See the Pipfile (and Pipfile.lock) for more details; we recommend using pipenv for managing your dependencies.
We'll assume you're running the Dockerized version of the app; if not, these commands will be slightly differently, notably missing the "bin/" prefix. We assume you've already install Docker.
Start by installing the latest Python dependencies:
bin/pipenv install --ignore-pipfile --dev
To create all of the relevant database tables, run:
bin/python manage.py migrate
Start by loading a fixture with regulator agency data:
bin/python manage.py loaddata agency
Then, fetch and load the transmittal sheets and reporter data files:
bin/python manage.py fetch_load_transmittals
bin/python manage.py fetch_load_reporter_panels
We next load state, county, CBSA, and census tract shape files by running:
bin/python manage.py fetch_load_geos
We'll also need demographic data from the FFIEC for each tract. Fetch and load that by running:
bin/python manage.py fetch_load_demographics --year 2013
Finally, we load the HMDA Loan Application Record data for each of our census tracts:
bin/python manage.py fetch_load_hmda
To run the development version of the app, we need only run:
docker-compose up
Then navigate to http://localhost:8000 in a web browser.
To rebuild the frontend, run:
cd frontend
bin/npm install
bin/npm run build-dev # or build-dist if building for production
We currently check the built frontend into version control, though that will likely change in the future.