This dataset is from WastewaterSCAN, an organization part of the WastewaterSCAN / SCAN project, a partnership between Stanford University, Emory University, and Verily funded philanthropically through a gift to Stanford University.
They publicly monitor infectious diseases across the USA through local wastewater systems. As an epidemiologist, this information is important to our work monitoring the spread of diseases. Since the new respiratory season has officially started August 1st and there has been an increase in COVID in California according to the CDC.
Tackling the problem: Plan is to load data into Rstudio, creating a subset, data cleaning
Anticipated data challenges: Matching the correct data file format to read in correctly into R as well as cleaning date variables
Citations:
A. B. Boehm, M. K. Wolfe, A. L. Bidwell, A. Zulli, B. J. White, B. Shelden, D. Duong. Pathogen nucleic acids data in wastewater solids from 147 treatment plants in the United States: 2024-2025. Data in Brief, 2026. Link to paper.
Claude for formatting and problem solving uploading to github in this chat
Analysis
#Not shown: Location on computer where I am grabbing the data and creating a saved location
#Install packages needed pacman::p_load(# Package Install and Management pacman, # package install/load janitor, #clean up data names # Project and File Management readr, # import data# General Data Management dplyr, # data management tidyr, # data management lubridate, # work with dates zoo, # work with dates tidyverse # work with dates)#create date that changes when you download it current_date <-format(Sys.Date()-1, "%Y%m%d")#Load data ww_data <-read.csv(paste0(csv_location, "WWSCAN_categories_", current_date, ".csv"), header=TRUE, stringsAsFactors =FALSE)#looking at dataframe ls(ww_data)
state us_census_region plant
1 Alabama South Bessemer, AL
2 Alabama South Cahaba River, Birmingham, AL
3 Alabama South Fultondale, AL
4 Alabama South Pinson, AL
5 Alabama South Village Creek, Birmingham, AL
6 Alaska West Anchorage, AK
site_name last_sample_date
1 Valley Creek Water Reclamation Facility 2026-08-31
2 Cahaba River Water Reclamation Facility 2026-08-31
3 Five Mile Creek Water Reclamation Facility 2026-08-31
4 Turkey Creek Water Reclamation Facility 2026-08-31
5 Village Creek Water Reclamation Facility 2026-08-31
6 John M. Asplund Water Pollution Control Facility 2026-08-27
ba_2_lppa24s_category ba_2_lppa24s_method ba_4_orf1a_del_141_143_category
1 not calculated none not calculated
2 not calculated none not calculated
3 not calculated none not calculated
4 not calculated none not calculated
5 not calculated none not calculated
6 not calculated none not calculated
ba_4_orf1a_del_141_143_method c_auris_category c_auris_method
1 none not detected not commonly detected
2 none not detected not commonly detected
3 none not detected not commonly detected
4 none not detected not commonly detected
5 none not detected not commonly detected
6 none not detected not commonly detected
delta_156_157_category delta_156_157_method evd68_category evd68_level
1 not calculated none low
2 not calculated none low
3 not calculated none low
4 not calculated none low
5 not calculated none low
6 not calculated none low
evd68_method evd68_trend hav_category hav_method h_ad_v_f_category
1 seasonal not detected not commonly detected not calculated
2 seasonal not detected not commonly detected not calculated
3 seasonal not detected not commonly detected not calculated
4 seasonal not detected not commonly detected not calculated
5 seasonal not detected not commonly detected not calculated
6 seasonal not detected not commonly detected not calculated
h_ad_v_f_method hmpv_4_category hmpv_4_level hmpv_4_method hmpv_4_trend
1 none low seasonal
2 none low seasonal
3 none low seasonal
4 none low seasonal
5 none low seasonal
6 none low seasonal
hpiv_category hpiv_method hv_69_70_del_category hv_69_70_del_method
1 not calculated none not calculated none
2 not calculated none not calculated none
3 not calculated none not calculated none
4 not calculated none not calculated none
5 not calculated none not calculated none
6 not calculated none not calculated none
inf_a_h1_category inf_a_h1_method inf_a_h3_v2_category inf_a_h3_v2_method
1 low seasonal low seasonal
2 low seasonal low seasonal
3 low seasonal low seasonal
4 low seasonal low seasonal
5 low seasonal low seasonal
6 low seasonal low seasonal
inf_a_h5_category inf_a_h5_method influenza_a_category
1 not detected not commonly detected low
2 not detected not commonly detected low
3 not detected not commonly detected low
4 not detected not commonly detected low
5 not detected not commonly detected low
6 not detected not commonly detected high
influenza_a_level influenza_a_method influenza_a_trend
1 seasonal
2 seasonal
3 seasonal
4 seasonal
5 seasonal
6 high seasonal: commonly detected no significant trend
influenza_b_category influenza_b_method mpxv_g2r_g_category
1 low seasonal not detected
2 low seasonal not detected
3 low seasonal not detected
4 low seasonal not detected
5 low seasonal not detected
6 low seasonal not detected
mpxv_g2r_g_method mpxv_g2r_wa_category mpxv_g2r_wa_method
1 not commonly detected not calculated none
2 not commonly detected not calculated none
3 not commonly detected not calculated none
4 not commonly detected not calculated none
5 not commonly detected not calculated none
6 not commonly detected not calculated none
mpxv_d_d14_16_category mpxv_d_d14_16_method me_v_roy_category
1 not detected not commonly detected not detected
2 not detected not commonly detected not detected
3 not detected not commonly detected not detected
4 not detected not commonly detected not detected
5 not detected not commonly detected not detected
6 not detected not commonly detected not detected
me_v_roy_method n_gene_category n_gene_level n_gene_method
1 not commonly detected high high commonly detected
2 not commonly detected high high commonly detected
3 not commonly detected high high commonly detected
4 not commonly detected high high commonly detected
5 not commonly detected high medium commonly detected
6 not commonly detected high high commonly detected
n_gene_trend ndm_category ndm_method noro_g2_category noro_g2_level
1 no significant trend not calculated none medium medium
2 no significant trend not calculated none low low
3 no significant trend not calculated none low low
4 up not calculated none low low
5 up not calculated none low low
6 no significant trend not calculated none low low
noro_g2_method noro_g2_trend omicron_del_143_145_category
1 commonly detected no significant trend not calculated
2 commonly detected no significant trend not calculated
3 commonly detected no significant trend not calculated
4 commonly detected no significant trend not calculated
5 commonly detected no significant trend not calculated
6 commonly detected no significant trend not calculated
omicron_del_143_145_method parvo_b19_category parvo_b19_method
1 none not detected not commonly detected
2 none not detected not commonly detected
3 none not detected not commonly detected
4 none not detected not commonly detected
5 none not detected not commonly detected
6 none not detected not commonly detected
rsv_category rsv_level rsv_method rsv_trend rota_category rota_level
1 low seasonal low low
2 low seasonal medium medium
3 low seasonal low low
4 low seasonal low low
5 low seasonal medium medium
6 low seasonal medium medium
rota_method rota_trend s_gene_category s_gene_method
1 commonly detected no significant trend not calculated none
2 commonly detected no significant trend not calculated none
3 commonly detected no significant trend not calculated none
4 commonly detected no significant trend not calculated none
5 commonly detected no significant trend not calculated none
6 commonly detected no significant trend not calculated none
tb_rd9_category tb_rd9_method wnv_category wnv_method
1 not calculated none not detected not commonly detected
2 not calculated none not detected not commonly detected
3 not calculated none not detected not commonly detected
4 not calculated none not detected not commonly detected
5 not calculated none not detected not commonly detected
6 not calculated none not detected not commonly detected
xbb_bkpt_category xbb_bkpt_method
1 not calculated none
2 not calculated none
3 not calculated none
4 not calculated none
5 not calculated none
6 not calculated none
#subset to West in California for respiratory disease (Influenza, RSV, SARS-CoV-2, Human Metapneumovirus, EVD68, Parainfluenza,Parvovirus) in the last year. Also renaming variables for dif diseases ww_data_subset <- ww_data_clean %>%select(state, plant, site_name, last_sample_date, inf_a_h1_category, inf_a_h3_v2_category, inf_a_h5_category, influenza_a_category, influenza_b_category, rsv_category, n_gene_category, hmpv_4_category, evd68_category, hpiv_category, parvo_b19_category)%>%filter(state =="California", last_sample_date >2025)%>%rename(flu_a_h1 = inf_a_h1_category, flu_a_h3 = inf_a_h3_v2_category, flu_a_h5 = inf_a_h5_category, flu_a = influenza_a_category, flu_b = influenza_b_category, rsv = rsv_category, sars_cov_2 = n_gene_category, human_metapneumovirus = hmpv_4_category, evd68 = evd68_category, parainfluenz = hpiv_category, parovirus = parvo_b19_category )head(ww_data_subset)
state plant
1 California Davis, CA
2 California Fremont, CA
3 California Gilroy, CA
4 California Indio, CA
5 California Lompoc, CA
6 California Los Angeles County, CA
site_name last_sample_date flu_a_h1
1 City of Davis Wastewater Treatment Plant 2026-08-31 low
2 [Fremont Basin] - Raymond A. Boege Alvarado WWTP 2026-08-27 low
3 South County Regional Wastewater Authority 2026-09-01 low
4 Valley Sanitary District 2026-08-31 low
5 Lompoc Regional Wastewater Reclamation Plant 2026-08-31 low
6 A.K. Warren Water Resource Facility 2026-08-30 low
flu_a_h3 flu_a_h5 flu_a flu_b rsv sars_cov_2 human_metapneumovirus evd68
1 low not detected low low low high low low
2 low not detected low low low high low low
3 low not detected low low low high low low
4 low not detected low low low low low high
5 low not detected low low low high low low
6 low not detected low low low high low low
parainfluenz parovirus
1 not calculated not detected
2 not calculated medium
3 not calculated low
4 not calculated not detected
5 not calculated not detected
6 not calculated low
Conclusion
Now that the data is ingested and cleaned, it would be interesting to compare this data source with the CDC’s wastewater data. Also it would be interesting to visualize the information through data table summaries and graphs over time.