App showing estimated flood exposure based on WorldPop and Floodscan.
Running the app locally:
pip install -r requirements.txt
pip install -e .
.env
file with the variables:PROD_BLOB_SAS=<provided-on-request>
DEV_BLOB_SAS=<provided-on-request>
AZURE_DB_PW_DEV=<provided-on-request>
AZURE_DB_UID=<provided-on-request>
token for the blob storage account.
python app.py
for debugging, or
gunicorn -w 4 -b 127.0.0.1:8000 app:server
for production.All code is formatted according to black and flake8 guidelines. The repo is set-up to use pre-commit. Before you start developing in this repository, you will need to run
pre-commit install
The markdownlint
hook will require
Ruby
to be installed on your computer.
You can run all hooks against all your files using
pre-commit run --all-files
It is also strongly recommended to use jupytext
to convert all Jupyter notebooks (.ipynb
) to Markdown files (.md
)
before committing them into version control. This will make for
cleaner diffs (and thus easier code reviews) and will ensure that cell outputs aren't
committed to the repo (which might be problematic if working with sensitive data).