--- title: "Urban Heat Island Qubes Lesson" author: "Evan Blais" date: "5/12/2021" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` #if this is your first time using Rstudio you may need use the command "install.Packages("")" to install packages like tidyverse, readr, stats, tidyr, ggplot2, or dplyr #load the data and neccessary libraries #This summary shows us the data we will be working with and basic measures of the data ```{r} treedata <- read.csv("UHI Data.csv") summary(treedata) library(tidyverse) ``` #Run the regression model for Photosynthesis #Then display a summary and plots of the regression #These plots and summary Describe the regression model for photosythensis as a function of average growing season temps ```{r} RegPhoto <- lm(Mean_Photosynthesis ~ AvgGrowingSeasonTemps, data=treedata) summary(RegPhoto) plot(RegPhoto) ``` #plot the regression model for Photosynthesis #The ggplot() comman allows us to visualize these rergressions in a more aesthetic way ```{r} ggplot(treedata, aes(x=AvgGrowingSeasonTemps, y=Mean_Photosynthesis))+ xlab("Apr–Oct average temperature (°C)") + ylab("light-saturated photosynthesis (µmol CO2 m–2 s–1)") + labs(title = "Photosynthesis as a function of Temperature") + geom_point(shape=15) + geom_smooth(method=lm, colour="blue") + scale_fill_grey() + theme_classic() ``` #Run the regression model for basal area growth #Then display a summary and plots of the regression #These plots and summary Describe the regression model for basal area growth as a function of average growing season temps ```{r} Reggrowth <- lm(Basal_areagrowth ~ AvgGrowingSeasonTemps, data=treedata) summary(Reggrowth) plot(Reggrowth) ``` #plot the regression model for basal area growth #The ggplot() comman allows us to visualize these rergressions in a more aesthetic way ```{r} ggplot(treedata, aes(x=AvgGrowingSeasonTemps, y=Basal_areagrowth))+ xlab("Apr–Oct average temperature (°C)") + ylab("basal area growth (cm2; sqft)") + labs(title = "Basal Area Growth as a function of Temperature") + geom_point(shape=15) + geom_smooth(method=lm, colour="red") + scale_fill_grey() + theme_classic() ```