/LocationRisk

Primary LanguageJupyter Notebook

LocationRisk: Spatiotemporal COVID-19 Risk Scores using High Resolution Real-World Mobility Data

Part 1 : Generate mobility-based check-in and infection data for clusters

Process_mobility-Gowalla.ipynb is the notebook which processes the infect_stat_res.txt (generated by SpreadSim) to generate cluster_checkin_events and cluster_inf_events for the Hawkes process-based model.

This is currently set to work with pandas, but can be modified to work with larger dataset using parquet. Depending upon the dataset at hand, one may need to change the column names appropriately. This also creates cluster-specific files OD_matrix_<>.npy and cluster_centers_<>.npy

Once the files are generated, our model can be run using the matlab script run_hawkes_gowalla.m by setting the appropriate paths.

Part 2: Run the Location Risk model.

This part is adapted from git repo https://github.com/chiangwe/HawkPR

Main files to run: run_hawkes_gowalla.m This generates the risk.csv file which can be used for visualization by subsequent steps.

Part 3: Visualizing the Results

Create_maps_Gowalla.ipynb can be used for prototyping and generating the plots. Create_risk_inf_plots.ipynb is used to create infection plots.