Skip to content

3. The montagu package

KaiyueZou edited this page Apr 21, 2023 · 3 revisions

Overview

The montagu package is developed by the VIMC Technical Team to help us get data, output templates, and other information from the Vaccine Impact Modelling Consortium (VIMC) Montagu API. This package and the input data are needed for both models, and it's important to install this package and build connection with the Montagu API before running any simulations.

The functions in this package work together as the major way for us to communicate with the Montagu API. For most circumstances, all the demographic data we need for the model should be from the Montagu API, which makes using the montagu package a necessity.

All of the information in this session is originally from VIMC's montagu package instruction site:

ALL FUNCTIONS

USER GUIDE

Install the montagu package on a local machine or on the IDModeling server

The scripts we developed can automatically install the package for simulation purposes. If you want to manually install it, you could consider trying the following code:

   drat:::add("vimc")
   install.packages("montagu")

Install the montagu package on ARCH/Rockfish

Running on Rockfish is only available to the surveillance model right now, so this step is only relevant for the surveillance project. After submitting the marcc_setup_initialize.sh script and making sure there's no error in the log, submit the marcc_montagu.sh and check if there are any errors in the log.

How to access the API interactively

Before you officially use the package to get any information from the Montagu API, you may need to specify the server you want to use and provide your credentials first. To specify the server:

   montagu::montagu_server_global_default_set(
     montagu::montagu_server("production", "montagu.vaccineimpact.org"))

After you specify the server, you will get a prompt to input your username and password to the Montagu API when you try any functions within the montagu package. We have another method to provide the API with the credentials without the need for interactions, which will be covered in the model setup secion. To simplify, the other method is just about putting your credentials inside scripts/montagu_handle.R.

How to use the package

Our ocvImpact package can automatically utilize the montagu package and download files. If you want to use the package manually, you could refer to this site. It might be worth noting that the group_id we are using is "JHU-Lee".