Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions 2026_Bicker_et_al_Memilio_paper/Fig4_d_and_e/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
cmake_minimum_required(VERSION 3.13)

project(memilio-simulations-2026_Bicker_et_al_Memilio_paper-Fig4_d_and_e VERSION 1.0.0)

# Executables should be stored in the build/bin/ folder.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")

# Download MEmilio with the git tag defined in git_tag.cmake.
include(${CMAKE_SOURCE_DIR}/git_tag.cmake)
# If git tag is not set, throw error.
if(NOT DEFINED GIT_TAG_MEMILIO)
message(FATAL_ERROR "GIT_TAG_MEMILIO is not defined. Please make sure the git_tag.cmake file is correct.")
endif()

# FetchContent to fetch the MEmilio library in the correct version.
include(FetchContent)

FetchContent_Declare(
memilio
GIT_REPOSITORY https://github.com/SciCompMod/memilio.git
GIT_TAG ${GIT_TAG_MEMILIO}
)

FetchContent_MakeAvailable(memilio)

add_custom_target(install_memilio_py ALL
COMMAND bash ../install.sh
)
43 changes: 43 additions & 0 deletions 2026_Bicker_et_al_Memilio_paper/Fig4_d_and_e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Figure 4: Fits of the ODE SECIR-type model for SARS-CoV-2 related ICU cases in Germany and Spain for national and district level

## Requirements

- **MEmilio**: See `git_tag.cmake` for the required version.
- **Python**: Required for all simulations and plots. See the requirements.txt for the required python packages.
- **Shapefiles**: The map plots of Germany and Spain require shapefiles. We use the geodata from the [Bundesamt für Kartographie und Geodäsie](https://gdz.bkg.bund.de/index.php/default/open-data/verwaltungsgebiete-1-2-500-000-stand-31-12-vg2500-12-31.html) (VG2500 31.12.) for Germany and [Instituto Geográfico Nacional](https://centrodedescargas.cnig.es/CentroDescargas/limites-municipales-provinciales-autonomicos#licencias) for Spain.

## Files

- **Data gathering**:
- `getSimulationDataSpain.py`: Get the data for the simulations of Spain.
- **Python Simulations**:
- `graph_germany_nuts0.py`: Simulation, fitting and plots of the Germany model without spatial resolution (Fig. 4d, top).
- `graph_germany_nuts3.py`: Simulation, fitting and plots of the Germany model with spatial resolution on county level (Fig. 4d, bottom).
- `graph_spain_nuts0.py`: Simulation, fitting and plots of the Spain model without spatial resolution (Fig. 4e, top).
- `graph_spain_nuts3.py`: Simulation, fitting and plots of the Spain model with spatial resolution on provinces level (Fig. 4e, bottom).

## How to Run

1. **Install the project**:
Configure the project using CMake. This already installs the necessary packages for the simulations.

2. **Download the required data**:
Download the data for Germany by running
```bash
source build/venv/bin/activate
python build/_deps/memilio-src/pycode/memilio-epidata/memilio/epidata/getSimulationData.py -o "build/_deps/memilio-src/data"
```
or
```bash
source build/venv/bin/activate
python getSimulationDataSpain.py
```
for the simulations of Spain.

Then you can run the simulations by executing the corresponding python scripts:
```bash
python graph_germany_nuts0.py
python graph_germany_nuts3.py
python graph_spain_nuts0.py
python graph_spain_nuts0.py
```
Loading