DataKind New America Housing Loss Analysis Tool
A Command Line Interface (CLI) that allows users to ingest eviction,
foreclosure, and tax lien data and outputs statistical summaries and
geolocation data.
Python CLI Usage Instructions
- Ensure your data format is configured based on the required specification
- This Google Sheet presents the data requirements
- This Example Directory shows a populated version of the format with random addresses
- Download Python 3.8.10 here: https://www.python.org/downloads/release/python-3810/ and follow the instructions to install Python
- Navigate to the New America Housing Loss Tool here: https://github.com/datakind/new-america-housing-loss-public.git
- Click
Code
and Download Zip
to download the code
- Unzip the zip file in the directory of your choice
- Open a terminal or a command prompt and navigate to where the code was downloaded (note: this directory will end with
new-america-housing-loss-public-main
)
- Change directory to the
cli
using the command cd cli
- If you are running Windows, you will need to run the following commands to install dependencies:
py -m pip install whl/GDAL-3.3.3-cp38-cp38-win_amd64.whl
py -m pip install whl/Fiona-1.8.20-cp38-cp38-win_amd64.whl
- Run the following commands to install dependencies:
- For Mac/Linux, run
python -m pip install -r requirements.txt
- For Windows, run
py -m pip install -r requirements.txt
- Run the tool against your data:
- For Mac/Linux, run
python load_data.py /path/to/input_data/
- For Windows, run
py load_data.py C:\path\to\input_data\
- The output will be available one level up from your data directory in a folder called
output_data
- The
analysis_plots
directory contains time series and correlation analysis of your content
- The
data_summaries
directory contains a summary of evictions/foreclosures by geocode (enriched with American Community Survey (ACS) data)
- The
full_datasets
directory contains all eviction/foreclosure geocoded records
- The
mapping_data
directory contains a geopackage (.gpkg) file that can be examined using QGIS
Structure
cli/
- code to run the DataKind New America Housing Loss Analysis Tool