25-09-ews-assessment / readme.md
readme.md
Raw

This repository contains the code needed to run the analyses from Knecht et al., 2025 (SUBMITTED).

Setup

To run the code, set up a new environment and use the the environment.yml file (if using mamba or conda) or the requirements_pip.txt file (if using pip) to install all necessary packages. As some packages require GDAL which can sometimes be tricky to resolve, using conda or mamba will provide a more reliable setup.

Use either:

If you don’t have mamba yet, install it once into your base environment:

conda install -n base -c conda-forge mamba

Then create and activate the environment:

mamba env create -f ./code/00_setup/environment.yml
conda activate geodata

With conda (alternative, slower)

conda env create -f ./code/00_setup/environment.yml
conda activate geodata

With pip (potentially problems with GDAL)

python3 -m venv <environment_name>
source <environment_name>/bin/activate
pip install -r ./code/00_setup/requirements_pip.txt

Running the code

The scripts can be run in the order of their names, each contains a description on what it does and how to run it. All paths are relative to the main folder. There is a test mode to run the scripts in which only conducts the computations for 5 randomly chosen locations. This should allow you to run everything, but the resulting figures and summary statistics will of course differ from the results reported in the paper as they are based on only a small subset of the complete dataset.