Main body of the lab
Here you will weave together your code, comments/text, and outputs (figures,tables,…) into a coherent and logically organized document.
- Your lab report content needs to have:
- Code that is well documented with comments.
- Content that is clearly divided into sections with section titles.
- Readable code (e.g. logically named variables, line breaks and spacing to make code easier to read, use of headers to break up sections,…).
- No unnecessary or extraneous code (e.g. you should not keep “scratch work” or any code that is ultimately not used).
- Clearly labeled output (e.g. use comments and/or headers that clearly identify the output).
- Figures must be properly formatted. This includes (but is not limited to) the use of axis labels, legends (where applicable), reasonable axis scales, reasonably sized data points/lines.
- Answers/responses to all of the questions/parts of the lab.
- If you rely on outside sources when writing your discussion/responses they need to be cited
Example “main body” content presented below
Part 1: Visualizing daily average air temperature data from Albany, NY
Load in the required libraries
library(tidyverse)
library(lubridate)
Load in the daily average air temperature data
## Load in data
airtemps <- read_csv('https://github.com/stahlm/stahlm.github.io/raw/master/ENS_215/Data/Albany_Temperature_Data.csv') # read in data from class github site
airtemps$MDY <- mdy(airtemps$DATE) # convert dates into appropriate date format
Below are the summary statistics for Albany air temperature
summary(airtemps$TAVG)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 3.00 36.00 53.00 50.49 67.00 80.00
You might add some discussion here if required or merited.
Plot the temperature data for Albany, NY
ggplot(airtemps,aes(MDY,TAVG)) + geom_point(shape = 21, color ="black", fill = "blue", size = 2, stroke = 1) + xlab("") + ylab("Avg. air temperature (deg F)") + theme_classic()
If a response/discussion regarding the above analysis is required or appropriate then you would put it here. When responding to questions your writing your discussion you should treat it as you would any other lab write-up (i.e. the writing and content should be clear, accurate, and sufficiently detailed).