These scripts are designed to perform daily spatiotemporal cluster detection on confirmed COVID-19 cases. The script 'Running satscan covid.R' imports a line list of confirmed cases (see Line List for SatScan_template.csv for the expected data structure), filters the line list to cases with specimens collected in the previous 6 days (with a 2 day lag), and calls SatScan to perform a spacetime permutation scan analysis, using the latitude and longitude of each case. Specific analysis parameters are detailed in the script - we thank the Data Analysis Unit, Bureau of Communicable Disease at the New York City Department of Health and Mental Hygiene (NYC DOHMH) for their guidance on adjusting these parameters. This project is modeled after NYC DOHMH's daily spatiotemporal cluster detection program for reportable diseases using SAS and SatScan (methods documented here and code available here). Our version of this project, which uses R, for daily cluster detection of selected non-COVID reportable diseases is posted here and was adapted to produce this repository.
After the SatScan analysis is performed, the most likely cluster detected each day (i.e. the cluster with the highest recurrence interval) is stored for historical purposes ('Cluster History File_template.csv'). If the most likely cluster has a recurrence interval greater than or equal to 300 days, a report describing the cluster is generated ('New Cluster Report.Rmd'). The recurrence interval threshold can be adjusted higher or lower as needed. The New Cluster Report, which includes a cluster line list and map, can be automatically emailed to an epidemiologist for investigation if desired (see commented out code in 'Running satscan covid.R'). Cases that are part of these statistically significant clusters are saved in a separate history file ('Case History File_template.csv'). If a new cluster is later detected that contains a case listed the Case History File (meaning it was part of a previously detected significant cluster), the original cluster is considered "ongoing" and all cases in the new cluster area are added to the original cluster. An updated cluster report is generated ('Ongoing Cluster Report.Rmd') with an updated line list and map.
Questions on these scripts should be directed to kbemis@cookcountyhhs.org.