epidemics / covid

epidemicforcasting.org visualization repository
http://epidemicforecasting.org
GNU Affero General Public License v3.0
20 stars 12 forks source link

Add NPI activation triggers to Gleam simulations #531

Open gavento opened 3 years ago

gavento commented 3 years ago

Description

We want to be able to plot simulations with NPIs triggered by the current situation.

NPI triggers are:

The NPIs do not have to be concrete, only the R reduction (resp. beta reduction) matters.

Design

(User interface has some details fleshed out)

User interface and process

Template for NPI triggers doc (to be downloaded as csv)

The steps are marked [old] if they are exactly the same as without triggers, [new] if new or modified.

Repeat few times (suggestion: 3) for N=1,2,3,...

Then:

Problems and caveats

gavento commented 3 years ago

Notes: Commands to execute the loop:


# Add one iteration of triggers
poetry run ./run_luigi UpdateNPITriggers --input-batch data-dir/outputs/gleam-models.hdf5 --output-batch data-dir/outputs/gleam-models-1.hdf5 --NPITriggers-triggers ~/download/Example\ NPI\ triggers\ -\ Sheet1.csv

# Force Luigi to re-export the (new) batch defs
rm ~/GLEAMviz-data/sims/ExportSimulationDefinitions.success
poetry run ./run_luigi ExportSimulationDefinitions --GenerateGleamBatch-generated-batch-filename data-dir/outputs/gleam-models-1.hdf5

### <run gleam>

# Import gleam results
./run_luigi ExtractSimulationsResults --models-file data-dir/outputs/gleam-models-1-ran.hdf5 --GenerateGleamBatch-generated-batch-filename data-dir/outputs/gleam-models-1.hdf5

# Repeat from the start for a while ...

poetry run ./run_luigi WebExport --overwrite --WebExport-export-name test-t1 --ExtractSimulationsResults-models-file data-dir/outputs/gleam-models-2.hdf5
poetry run ./run_luigi WebUpload --WebUpload-channel test-t1 --WebUpload-exported-data data-dir/outputs/web-exports/test-t1