R for Environmental Data Analysis
Fond du Lac Tribal and Community College
2101 14th Street
Cloquet, MN 55720
Day 1
Planets visited: Endor and Jakku
Morning | 8:30-11:45am
Begin Jedi training
- Power on your droid
- Install and update R
- Project launch
- Start a new R project
- Create an R script
- Tour and customize RStudio
- Invent new/fake data
- Variables, names, and lists
- Make a data table / dataframe
- Upgrade your droid
- Add new R packages
- Add new R packages
- Read real data into R
readr
for text filesreadxl
for Excel files
- Get visual with
ggplot2
- Plot the data, plot the data, plot the data!
- Look for errors and outliers
Packages: readr
, ggplot2
Afternoon | 1:15-5:00pm
Get scrappy and solve a junk-data mystery
- Explore data
- Column names, rows, observations, value types
- Missing values
- Mean, max, min, quantile
- Data transformations with
dplyr
- Arrange, sort, and filter data
- Summarize data
- Find the most profitable scrap
- Summarize each group, site, or category within the data
- Summarize by location
- Check for the number of data points in a group (you can use this to check for completeness!)
- Summarize by location
Travel to Endor to investigate magnetic storms
- Introduction to data with dates
- Plot time series
Packages: dplyr
, lubridate
Day 2
Planets visited: Endor and Jakku
Morning | 8:30-11:45am
Questions and Review
- Calendar Plots 📅
- Plot data by day of the week
- Intermediate data manipulation
- Join tables together
- Adding and calculating new columns
- Unit conversions
- Add new columns based on a condition
- Learn summary functions: mean, median, max, min, nth
- Use the with pipe
%>%
to string your functions together for less typing - Save files
- Working with difficult data
- Replacing NULL values, -999
- Missing values
NA
Packages: openair
Afternoon | 1:15-5:00pm
Star Wars - Guess Who
- Plot like a Jedi!
- Scatter plots and boxplots
- Add titles, colors, and labels
- Histograms
- Reference lines
- Add trend lines 📈
- Save charts to different formats
- Plot
pollution
vs.meteorology
- Scatter plots
- Conc vs. Temp
- Conc vs. Hour of day
- Temp vs. Hour of day
- Scatter plots
- More plots
- Log transform
- Reference lines
- Time series plots with regression line and detection limits
Day 3
Planets visited: Ahch-To
, Earth
Your turn!
Morning | 8:30-11:45am
- Join GitHub
- Share your data, code, and plots
Questions / Review
- Choose your own adventure!
- Select your own or Star Wars data
- PATHS
- Wind and Pollution roses
- Messy data
- Gather a wide table with hundreds of columns into 1 column
- Read an entire folder of files and combine into 1 table
- More maps and shapefiles
- Read and save shapefiles
- Convert coordinate projections (ex.
Lat/Long
toUTM
) - Load reference maps (Tribal boundaries, States, Counties)
- Build interactive maps
Packages: tidycensus
, tigris
, sf
, leaflet
Afternoon | 1:15-5:00pm
- Select your own or Star Wars data
- Build a report
- Clean the data
- Create a summary table
- Compare years or sites
- Chart & map the data
- Multiple paths to choose from
- Put script and results in Rmarkdown
- Share with the world
- Generate Web, Word and PDF documents
🐈🐈 Concatulations!! 🐱🐱
Receive your well deserved accolades and certificates