- clone the repo
- create IPHeatmap/settings_local.py using the template provided
- create a virtual environment for python > 3.5
- instructions can be found here
- activate the environment and install required packages with
pip install -r requirements.txt
- Get your database in the right shape with
python manage.py migrate
- Add necessary data from "GeoLite2 City CSV 2019" (not included here)
- specifically, City Blocks IPv4
- Run
clean_data_and_load.sh
to do exactly what it says
- Activate your venv:
source venv/bin/activate
- Run the script
daemonize_gunicorn.sh
- If something goes wrong, be sure to kill all runaway processes (pgrep/pkill are your friends)
- Make changes as you like
- Restart the gunicorn process with
restart-supervisor.sh
I couldn't have made this without the wonderful folks at Django, and the great Django Rest Framework/Filters packages. Additionally, Dask is great and I'd highly recommend it for your data cleaning.