Allison Horst - Course & Workshop Materials

Bren School of Environmental Science and Management (UC Santa Barbara)


ESM 206: Introduction to environmental data analysis & stats in R

esm_206

ESM 206 MATERIALS (FALL 2019)


Course description: Develop critical thinking, technical and communication skills to successfully approach and answer environmental questions using quantitative and qualitative data. Topics include: data wrangling using the tidyverse and tidy data principles, exploratory data analysis and visualization, descriptive statistics, uncertainty, hypothesis testing, data visualization and communication. Best practices for reproducibility, version control and collaboration are emphasized throughout. Skills will be developed through wrangling, analysis and communication of datasets using R, RStudio and GitHub.

Course goals:


ESM 206 course syllabus (Fall 2019)

ESM 206 Code of Conduct


Note: All ESM 206 lab materials for Fall 2019 are now compiled in this repo


WEEK LECTURES LAB MATERIALS READING
0 During orientation: get started with R, RStudio and GitHub Get R/RStudio and the tidyverse
Get started with Git/GitHub
None
1 Lecture 1: Course intro; computational reproducibility; R & RStudio

Lecture 2: Naming things; tidy data; basic troubleshooting and getting help with R
Lab 1: Meet RStudio, projects, scripts, basic reading & wrangling, intro to ggplot2Broman & Woo "Data organization in spreadsheets

Lowndes et al. "Our path to better science in less time using open data science tools"
2 Lecture 3: Code style tips; intro to R Markdown

Lecture 4: Version control with Git & GitHub overview; exploratory data visualization
Lab 2: Intro to R Markdown, data wrangling continued, tidyr::pivot_*, joins, and customizing a ggplot graphWilson et al. "Good enough practices in scientific computing"

Chapters 4 - 7 in "Fundamentals of Data Visualization" by Claus O. Wilke

"Declutter your R workflow with tidy tools" by Zev Ross, Hadley Wickham and David Robinson
3 Lecture 5: Data visualization Part 1
Lecture 6: Data visualization Part 2
Lab 3: Data visualization, dplyr::case_when(), purrr::modify_if(), writing files & saving figures, {here} for file pathsChapters 9 - 11 in "Fundamentals of Data Visualization" by Claus O. Wilke

Ch. 5 (Data Transformation) in R for Data Science by Grolemund & Wickham
4 Lecture 7: Axis labels & figure captions; types of data; central tendency & data spread

Lecture 8: Guest lecture (Jessica Couture) - Open Science and Metadata
Lab 4: Meet GitHub; work between RStudio & GitHub; tabs in markdown; interactive graphs & tables with plotly & DT; annotate ggplotsNo new reading - catch up on previous weeks & study for midterm
5 Lecture 9: Exploring distributions, probability density, uncertainty intro, and hypothesis test overview

Midterm Wednesday
Lab 5: Counting things, exploring normality, parsing dates, t-tests introNo Week 5 reading
6 Lecture 10: What are p-values; what aren't p-values; one- and two-sample t-tests

Lecture 11: Means comparisons continued (t-tests)
Lab 6: two-sample t-tests, intro to basic functions and for loopsUsing effect size - or why the p-value is not enough by Gail M. Sullivan and Richard Feinn
7 (Monday holiday)
Lecture 12: Type II and Type II errors, effect size, one-way ANOVA intro
Lab 7: T-tests, in-line reporting of hypothesis test outcomes, effect size, a table with kableExtraScientific method: Statistical errors by Regina Nuzzo
8 Lecture 13: One-way ANOVA continued, post-hoc tests, overview of rank-based tests
Lecture 14: Chi-square test for independence
Lab 8: One-way ANOVA, chi-square, tables, plotting means and standard errors
9 Lecture 15: Simple linear regression by OLS, coefficient of determination, Pearson's r
Lecture 16 handout: Multiple linear regression introduction (read through before taking quiz)
Lab 9: Simple linear regression (see docs on GauchoSpace)
10 Lecture 17: Multiple linear regression continued
Lecture 18: Moving forward with regression, recap, and more important things
Lab 10: Multiple linear regression & other fun stuff

Course resources:

ESM 206 ARCHIVES


ESM 244: Advanced methods for environmental data analysis in R

esm_206


ESM 244 course description: A survey course in advanced topics in statistics and data analysis for environmental scientists (ordinal and multinomial logistic regression, bootstrapping, non-linear models, intro to time-series analysis, spatial data analysis and interpolation, ordination methods, cluster analysis, text mining, etc.) while continuing to build skills and habits in data science (data wrangling, analysis & computational reproducibility in R/RStudio, version control and collaboration with R and GitHub). Term project: build a Shiny app.


ESM 244 course syllabus (Winter 2020)

ESM 244 Code of Conduct


WEEK LECTURES LAB MATERIALS
1 Lecture 1: Course welcome, 206 review, PCA intro Lab 1: data wrangling + visualization review, get going with blogdown
2 Lecture 2: PCA continued, RDA intro
Getting started with Shiny teaching key
Lab 2: Getting started in Shiny, data wrangling continued, exploring missings, and a PCA example
3 Lecture 3: Binary logistic regression intro
Lecture 4: Logistic regression continued
Lab 3: Binary logistic regression, some maps
4 Take-home labs (`sf` + `Shiny`) Take-home (no in-class labs)
5 Lecture 5: Intro to time-series data exploration and analysis
Lecture 6: Decomposition and forecasting overview
Lab 5: Time series + gh-pages!
6 Lecture 7: Intro to spatial data, variograms and kriging
Lecture 8: Kriging continued, intro to point pattern analysis
Lab 6: Check out a GeoTIFF, variograms, kriging
7 Lecture 9: Point pattern analysis, kernel density, intro to cluster analysis
Lecture 10: Hierarchical clustering methods
Lab 7: Point pattern analysis, k-means, hierarchical clustering
8 Lecture 11: Bayesian case studies, intro to text mining and analysis
Lecture 12: Sentiment analysis
Lab 8: Text mining and sentiment analysis with `tidytext`!
9 Lecture 13: Bootstrapping
Lecture 14: Nonlinear least squares
Lab 9: Bootstrapping & nonlinear least squares
10 Lecture 15: Becoming a nimble modern data scientist - interfacing with other languages & tools
Lecture 16: Course review and where you should go from here
Lab 10: R and SQL and Python, oh my!


ESM 244 ARCHIVES


Workshops


About Allison

Allison is a lecturer at the Bren School of Environmental Science and Management (UC Santa Barbara), where she has been teaching data analysis, statistics, and presentation skills courses in an applied environmental graduate program since 2012. In addition, she teaches introductory and refresher workshops in R for incoming graduate students and alumni. She is a co-founder of R-Ladies Santa Barbara, and recently co-founded a #tidytuesday coding club at UCSB. Allison completed her studies in engineering (BS Chemical Engineering, MS Mechanical Engineering) before earning her PhD in Environmental Nanotoxicology from UCSB.

Teaching

  • ESM 206: Introductory data analysis and statistics in environmental science and management (2012 - present)
  • ESM 244: Advanced methods in environmental data science (2012 - present)
  • ESM 438: Presentation skills for environmental professionals (2013 - present)
  • Calculus intensive workshop: a 2-week calculus refresher course for incoming graduate students at the Bren School (2008 - present)
  • Data analysis workshop: a 2-week quantitative methods and introduction to R workshop for incoming PhD students at UCSB (2016 - present)

Distinctions

  • Bren School Distinguished Teaching Award (2018)
  • UC Santa Barbara Distinguished Teaching Award (2019)

Allison is also a fine artist, graphic designer, fly-fisher, hiker, backpacker, wanderer, and proud aunt to three nieces and two nephews. She splits time between Santa Barbara, CA, and Aspendell, CA, where she lives with her partner Greg and their silly rescue dog, Teddy.


We're proud Openscapes Champions

Openscapes
--> -->