Pittore, Massimiliano; Haas, Michael; Gomez-Zapata, Juan Camilo; Brinckmann, Nils; Rüster, Matthias; Proß, Benjamin (2021): Quakeledger: a web service to serve earthquake scenarios. V. 1.0. GFZ Data Services. https://doi.org/10.5880/riesgos.2021.003
This is a rewrite from https://github.com/GFZ-Centre-for-Early-Warning/quakeledger
and
https://github.com/bpross-52n/quakeledger
The main difference is that this code is refactored and uses a sqlite database.
The data imported are the valparaiso_v1.3.csv file as events table, the sites.csv as sites table and the mean_disagg.csv as mean_disagg table.
Following python modules need to be installed:
- pandas
- scipy
- sqlalchemy
- lxml
- numpy
You can use a virtual environment and the requirements.txt:
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
You also must make sure that you extract the sqlite database (which is zipped here because of file size policies on Github).
unzip sqlite3.db.zip
You can make sure that the script works by running
python3 test_all.py