Author

Christina Ebrahim

Published

May 3, 2025

setting up the packages

Reading in the data

Show the code
# Load in CSV  
ocean_acd <- read.csv("C:\\Users\\Admin\\OneDrive\\Documents\\Data & Vis in R\\Final_R_proj\\ocean-acidity_cln.csv")

Plots for pCO2

`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 85 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 85 rows containing missing values or values outside the scale range
(`geom_point()`).
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 272 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 272 rows containing missing values or values outside the scale range
(`geom_point()`).
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 220 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 220 rows containing missing values or values outside the scale range
(`geom_point()`).

Plots for pH

Show the code
#pH plots 
h_plot <-
ggplot(ocean_acd,aes(Hawaii.Year, Hawaii.pH))+ 
  
geom_point(shape = 21, color = 'darkgreen', fill = 'darkseagreen',
           size= 3)  +
  
# Labels
labs(title = "Hawaii pH from 1989 - 2022",
       x = "Years",
       y = "pH")+
  geom_smooth(method = "lm") 



cI_plot <-
ggplot(ocean_acd,aes(Canary.Islands.Year, Canary.Islands.pH))+ 
  
  geom_point(shape = 21, color = 'darkgreen', fill = 'darkseagreen', size = 3)  +
  
  # Labels
  labs(title = "Canary Islands pH from 1995 - 2009",
       x = "Years",
       y = "pH")+
  geom_smooth(method = "lm") 





b_plot<-
ggplot(ocean_acd,aes(Bermuda.Year, Bermuda.pH))+ 
  
  geom_point(shape = 21, color = 'darkgreen', fill = 'darkseagreen', size = 3)  +
  
  # Labels
  labs(title = "Bermuda pH from 1983 - 2015",
       x = "Years",
       y = "pH")+
  geom_smooth(method = "lm") 


c_plot <- 
ggplot(ocean_acd,aes(Cariaco.Year..pH.,Cariaco.pH))+
  
  geom_point(shape = 21, color = 'darkgreen', fill = 'darkseagreen', size = 3)  +
  
  # Labels
  labs(title = "Cariaco pH from 1995 - 2017",
       x = "Years",
       y = "pH")+
  geom_smooth(method = "lm")


plot_grid(h_plot,cI_plot,b_plot,c_plot)
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 85 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 85 rows containing missing values or values outside the scale range
(`geom_point()`).
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 272 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 272 rows containing missing values or values outside the scale range
(`geom_point()`).
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
Warning: Removed 205 rows containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 205 rows containing missing values or values outside the scale range
(`geom_point()`).