Data Analysis 2025
Shared tutorials
1. Video: Downloading Data from WQX (3:36)
- Overview: This video walks through downloading data from the Water Quality Portal
- Input: Project ID
- Output: physchem.csv
2. Video: Making WQX Data Excel-Friendly (4:10)
Click here to download the zipped R code bundle for making WQX data Excel-friendly.
- Overview: This video uses an R script to transform long format data downloaded from WQP to an Excel-friendly crosstab format. Note: this code removes quality control samples (i.e. blanks and duplicates), uses 0 for non-detects, and converts all ug/L values to mg/L. If a site has multiple measurements of the same parameter on the same date, this code outputs the median of these measurements.
- Input: physchem.csv
- Output: ExcelReadyData.csv
3. Video: Cleaning & Checking Data in Excel (6:50)
- Overview: This video walks through manual data corrections in Excel and does not use any R scripts.
- Input: ExcelReadyData.csv
- Output: ExcelReadyData_clean.csv
R-based analysis tutorials
Making boxplots with R
Click here to download the zipped R code bundle for making boxplots.
Video: Making Boxplots with R (Part 1) (7:50)
- Overview: This video walks through creating a boxplot of one parameter for one site using R and R studio. Note: this video only covers the first section of code in the script, and although the video shows using ExcelReadyData.csv as input, the user should actually use their ExcelReadyData_clean.csv as input.
- Input: ExcelReadyData_clean.csv
- Output: figures of boxplots
Video: Making Boxplots with R (Part 2) (3:30)
- Overview: This video walks through creating boxplots of a specified parameter for all sites using R and R studio. Note: this video covers the second section of code in the script.
- Input: ExcelReadyData_clean.csv
- Output: figures of boxplots
Making time series plots with R
Click here to download the zipped R code bundle for making time series plots.
Video: Making Time Series Plots with R (Part 1) (8:46)
- Overview: This video walks through creating a time series plot of a specified parameter for a single site using R and R studio. Note: this video only covers the first section of code in the script, and although the video shows using ExcelReadyData.csv as input, the user should actually use their ExcelReadyData_clean.csv as input.
- Input: ExcelReadyData_clean.csv
- Output: time series plots
Video: Making Time Series Plots with R (Part 2) (6:22)
- Overview: This video walks through using a “for loop” to create a time series plot of a specified parameter for multiple sites using R and R studio. Note: this video covers the second section of code in the script.
- Input: ExcelReadyData_clean.csv
- Output: time series plots
Performing regressions with R
Click here to download the zipped R code bundle for performing regressions.
Video: Performing Regressions with R (Part 1) (6:37)
- Overview: This video walks through creating a scatter plot with line of best fit and r squared value to evaluate the relationship between two specified parameters using R and R studio. Note: this video only covers the first section of code in the script, and although the video shows using ExcelReadyData.csv as input, the user should actually use their ExcelReadyData_clean.csv as input.
- Input: ExcelReadyData_clean.csv
- Output: scatter plots with line of best fit and r squared
Video: Performing Regressions with R (Part 2) (6:38)
- Overview: This video walks through writing and using a function to make a scatter plot with line of best fit and r squared value to evaluate the relationship between two specified parameters using R and R studio. Note: this video covers the second section of code in the script.
- Input: ExcelReadyData_clean.csv
- Output: scatter plots with line of best fit and r squared
Completed R workflows for each tutorial:
- Example making boxplots R workflow
- Example making time series plots R workflow
- Example performing regressions R workflow
Excel-based analysis tutorials
Making boxplots with Excel
Click here to download the Excel workbook for creating boxplots.
Video: Making Boxplots with Excel (Part 1) (6:29)
- Overview: This video walks through creating a boxplot for a specified parameter at a specified site using Excel.
- Input: ExcelReadyData_clean.csv
- Output: figures of boxplots
Video: Making Boxplots with Excel (Part 2) (4:24)
- Overview: This video walks through creating boxplots of a specified parameter for all sites using Excel.
- Input: ExcelReadyData_clean.csv
- Output: figures of boxplots
Making time series plots with Excel
Click here to download the Excel workbook for creating time series plots.
Video: Making Time Series Plots with Excel (Part 1) (5:22)
- Overview: This video walks through creating a time series plot for a specified parameter at a specified site using Excel.
- Input: ExcelReadyData_clean.csv
- Output: time series plots
Video: Making Time Series Plots with Excel (Part 2) (7:19)
- Overview: This video walks through creating a time series plot for multiple parameters at a specified site using Excel.
- Input: ExcelReadyData_clean.csv
- Output: time series plots
Performing regressions with Excel
Click here to download the Excel workbook for performing regressions.
Video: Performing Regressions with Excel (6:15)
- Overview: This video walks through creating a scatter plot between two parameters in Excel and adding a regression line of best fit with equation and r squared.
- Input: ExcelReadyData_clean.csv
- Output: scatter plot with line of best fit and r squared
Supplemental Tutorials
Video:'Filter' and 'Select' Functions (7:18)