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.
Anthropic. (2025). Claude Opus 4.5 [Large language model]. (https://claude.ai/) Accessed January 8, 2026. Link to 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 httr, #github passkey # General Data Management dplyr, # data management tidyr, # data management lubridate, # work with dates zoo, # work with dates tidyverse # work with dates)#Load data#github csv_location <-GET("https://raw.githubusercontent.com/troy-tournat/607-assignments/refs/heads/main/WWSCAN_categories_20260902.csv?token=GHSAT0AAAAAAEHYW24NIASCUDUT2WJ6YTYK2U3LXCQ",add_headers(Authorization =paste("token", passkey_classic))) ww_data <-read_csv(content(csv_location, "text"),show_col_types =FALSE,progress =FALSE )#desktop#create date that changes when you download it #current_date <- format(Sys.Date()-1, "%Y%m%d")#ww_data <- read.csv(paste0(csv_location, "WWSCAN_categories_", # current_date, ".csv"), header=TRUE, stringsAsFactors = FALSE)##Review and clean data #looking at dataframe ls(ww_data)
#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)
# A tibble: 6 × 15
state plant site_name last_sample_date flu_a_h1 flu_a_h3 flu_a_h5 flu_a flu_b
<chr> <chr> <chr> <date> <chr> <chr> <chr> <chr> <chr>
1 Calif… CODI… CODIGA 2024-05-31 not cal… not cal… not cal… not … not …
2 Calif… Coas… Coastal … 2024-06-28 not cal… not cal… not cal… not … not …
3 Calif… Cont… Central … 2024-06-25 not cal… not cal… not cal… not … not …
4 Calif… Davi… City of … 2026-08-31 low low not det… low low
5 Calif… Espa… Esparto … 2024-06-28 not cal… not cal… not cal… not … not …
6 Calif… Fair… Fairfiel… 2024-06-28 not cal… not cal… not cal… not … not …
# ℹ 6 more variables: rsv <chr>, sars_cov_2 <chr>, human_metapneumovirus <chr>,
# evd68 <chr>, parainfluenz <chr>, parovirus <chr>
Conclusion
The challenges I faced were getting used to using .qmd as well as github. My biggest challenge was ingesting the data from github using a private repo.
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.