--- title: "Mountiantop Removal Mining" author: "Brian Tyler Dagliano" date: "5/1/2021" output: word_document: default html_document: default pdf_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ###Lets investigate the Salamander data to try and make some observations regard the effects MTRM has on streams. Throughout this analysis I would like you to imagaine that you are a biologist, working for a state agency, trying to understand what activities most impact wildlife. As a biologist, it is important that your analysis of data can be used to inform management decisions for the management of the forest. ##In order to run this analysis we will need to load the ggpubr and readr packages. If you do not have these packages already installed, you will need to install them using "install.packages("PACKAGE_NAME") tool. ```{r} library("ggpubr") #This package is used to create plots library("readr") #This package is used to read the .csv file ``` ##Bringing in the data #It is important that you have put the data into your working directory, and that the title for the data matches what you have written in the R code. Once you have brought the data in, it is good practice to view the data to ensure the data as been loaded correctly. ```{r} Data <- read_csv("Price_et_al_2015_salamander_data.csv") View(Data) ``` ##Visualize the data #Next, we will create a box-and-whisker plot of the Dusky Salamander data. This will allow us to compare the Dusky Salamander reference sites with the sites effected by MTRM. ```{r pressure, echo=FALSE} ggboxplot(Data, x = "Mined", y = "Dusky_salamander", #This line of code identify what variables in the dataset will be used for the x and y axis color = "Mined", palette = c("#00AFBB", "#E7B800"), #This line of code creates the label on top of the plot and assign a color to each of the groups order = c("Mined", "Reference"), #This line of code assigns the order the groups will be listed ylab = "Dusky Salamander Count", xlab = "Mined vs Reference") #This line of code assigns the x and y axis labels ``` #By looking at this plot, we can see that the sites near the MTRM sites had far fewer Dusky Mountian Salamanders. Although, we should run a test that will allow us to test our null hypothesis. #Reminder: #Our null hypothesis: There is no difference in Dusky Salamander abundance in streams near MTRM sites and those separate from MTRM sites. #Alternate hypothesis: There is a difference in the Dusky Salamander abundance in streams near MTRM sites and those separate from MTRM sites. ##One-Way ANOVA Test #To test our null hypothesis we will run a one-way ANOVA test. This test compares the means of two or more groups to determine if there is statistical evidence that the population means are significantly different. ```{r} Dusky.aov <- aov(Dusky_salamander ~ Mined, data = Data) # Summary of the analysis summary(Dusky.aov) ``` #Looking at the p-value for this ANOVA test, we can reject the null hypothesis that there is no difference in Dusky Salamander abundance in streams near MTRM sites and those separate from MTRM sites. We can now accept the alternate hypothesis that there is a difference in the Dusky Salamander abundance in streams near MTRM sites and those separate from MTRM sites. #As mentioned in the lesson, it is possible that the Dusky Salamanders can be used to indicate potential negetive impacts to other species of salamanders. However, it is also important to look at other groups of species whenever possible because many of them have specific environmental needs. These species differences can make them more or less resiliant than other species to specific stressors. Our dataset also includes data for the Seal Salamander, another salamander commonly found in Appalachian Mountain streams. #We will now run the same analysis for the Seal Salamander, to see if there was a similar effect of MTRM. Your assignment is to answer the questions throughout the Seal Salamander analysis. ##Visualize the data ```{r} ggboxplot(Data, x = "Mined", y = "Seal_salamander", color = "Mined", palette = c("#00AFBB", "#E7B800"), order = c("Mined", "Reference"), ylab = "Seal Salamander Count", xlab = "Mined vs Reference") ``` #What observations can be made when viualizing the box-and-whisker plot? ##One-Way ANOVA Test ```{r} Seal.aov <- aov(Seal_salamander ~ Mined, data = Data) # Summary of the analysis summary(Seal.aov) ``` #What hypothesis is being tested? #What is the alternate hypothesis? #Is the p-value of this ANOVA test significant? #Comparing the p-values of the two ANOVA tests, which salamanders are more effected by MTR mining? #Using online sources collect the same background information we studied for the Dusky Salamanders, for the Seal Salamanders. (Appearance, Habitat, Life Style, Conservation status) #Lastly, what attributes of the Seal Salamanders make them likely to be effected by MTR mining?