This is the replication codes and data for "Implications of COVID-19 vaccination heterogeneity in mobility networks"
Contact: Yuan Yuan, Purdue University, yuanyuan at purdue dot edu
We store all Figure 1 related files in the gephi folder.
For all codes for other analyes (including processing safegraph data, generate dict_param files for the input of simulation, deep learning, and targeting algorithms), we store in the code folder.
For all data and intermediate results, we temporally store in the google drive. Before publication we will release them on Zenodo; the reason for the wait is because Zenodo does not allow further additions or modifications of files.
Python 3.8.3 (including packages - numpy, pandas, seaborn, matplotlib, scipy, sklearn, torch)
code/process_safegraph.ipynb is the file that processes the initial safegraph data. Please refer to https://www.safegraph.com/covid-19-data-consortium for the COVID-19 related data. It mainly outputs data/pairs_full_12.npy.
code/preprocess.ipynb is the file that further generates input files for the downstream simulation tasks.
code/generate_US.ipynb is the file that generates the input for simulations on synthetic networks. It also outputs the files shown in the main text.
code/disease_model.py is based on the code derived from https://covid-mobility.stanford.edu// We further incorporate the consideration of vaccination rates.
code/US_simulation-track-12.py is the simulation code for US networks.
You can run the code in the following way:
python US_simulation-track-12.py --vc=-1 --num_hours=720 --p_sick_at_t0=0.001 --poi_psi=120000000.0 --home_beta=0.005 --state=all --enable=0 --distribution=original --intervene=4
- vc: a float that fixes the global vaccination rate. -1 means use the average from the input file
- num_hours: number of hours to simulate
- p_sick_at_t0: % of exposed people at time 0
- poi_psi: cross CBG transmission parameter (see https://covid-mobility.stanford.edu//); we need a much larger value here because our poi_psi / 12 / 12 / 720 equals the parameter in https://covid-mobility.stanford.edu//
- home_beta: within CBG transmission parameter (see https://covid-mobility.stanford.edu//)
- state: input file name (files available on google drive)
- enable: used to run all hypothetic distribution (where enable=0) or a single one (1=original, 2=reverse, 3=exchange, 4=shuffle, 6=order)
- distribution: original, exchange, shuffle, order, reverse_within
- intervene: use when we hope to the targeting result (1=optimal, 2=centrality, 3=low_vax, 4=random, 5=non-targeting)
code/small_area.ipynb is the file where the deep learning models are trained and validated
code/small_area_visualize.ipynb is the file where we visualize the results
code/campaign.ipynb is the file that implements the campaign algorithms
code/viz_campaign.ipynb is the file where produces the figure
We use https://simplemaps.com/ to visualize the targeted CBGs
As GitHub has an upper limit for repository size. Currently we uploaded large files to Google Drive (https://drive.google.com/drive/folders/1xO-DYfnMF9cYDJLareTQDKJNokYqukM1?usp=sharing)
Please download the files from the google drive for replication purposes.
For replication of US mobility network, we expect a server with >400 memory and >10h CPU time for a 30-day simulation. Please try synthetic data or a state-level simuation for the quick demo.