1786 total view(s), 1001 download(s)
- climate.csv(CSV | 169 KB)
- Global_Change_Biology.swc(SWC | 7 KB)
- Lesson Plan.docx(DOCX | 17 KB)
- Working_with_Data_Homework.docx(DOCX | 17 KB)
- Working_with_Data_Homework_Key.docx(DOCX | 18 KB)
- License terms
Description
This lesson is part of a Global Change Biology course where one of the main learning objectives is to have the students develop and answer scientific questions by using R to access, organize, and graph actual long-term data sets. In order to explore global change data and learn how various anthropomorphic activities are affecting ecosystems and species, we need to import datasets into R and make sure all the variables are in the correct format that will allow us to perform data visualization (aka, create graphs). In this lesson, we will learn how to import data into R, perform basic QA/QC (quality assurance/quality control) of the data, and create some basic exploratory graphs of the data from which we can begin to answer scientific questions. We will be working with a dataset from the PRISM Climate Group (http://www.prism.oregonstate.edu/) that includes air temperature and precipitation over the past one hundred years in two towns in the United States (Boulder, CO and Hanover, NH). This resource also includes a graphing homework assignment and key that can be used as an assessment and extension of learning after students complete the swirl lesson.
Learning objectives:
- You will learn how to import data into R and perform basic QA/QC.
- You will learn about different data and variable formats you will encounter in this course (and throughout your data ‘career’).
- You will learn how to manipulate date variables in R in order to get them into the format you need for data visualization.
- You will learn how to use piping in R (from tidyverse package) to subset the data and perform basic calculations with the data.
- You will be able to create simple graphs to visualize data in order to answer scientific questions.
While the majority of this lesson was built from scratch, The graphing part of this lesson was modified from the existing swirl lesson GGPlot2_Part1 in the Exploratory_Data_Analysis course (https://github.com/swirldev/swirl_courses/blob/master/Exploratory_Data_Analysis/GGPlot2_Part1/lesson).
Climate data used in this lesson was downloaded from the PRISM Climate Group (http://www.prism.oregonstate.edu/).
Cite this work
Researchers should cite this work as follows:
- Pries, C. H. (2019). Working with Datasets in R swirl. Make Teaching with R in Undergraduate Biology Less Excruciating, QUBES Educational Resources. doi:10.25334/Q4KF2V