Markdown Author: Jessie Bell, 2023
decemberhalo <- read.csv("Halo_sofar.csv")
#use this space to make data table
53: 10 cells
68: 24 cells
70: 41 cells
samples <- subset(decemberhalo, sample >= 45)
ggplot(samples, aes(sample, nitrate_mg, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: Nitrates")+
geom_vline(xintercept=57)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, spc_cond_um_cm, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: spc_cond_um_cm")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, salinity_pu, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: salinity_pu")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, ph, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: pH (data not calibrated and 2/2-2/8 incorrect values")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70) #note this needs to be calibrated!
ggplot(samples, aes(sample, chl_a_flu_rfu, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: chl_a_flu_rfu")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, water_temp_c, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: Water Temp (C)")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, tide_range_calc_3, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: High Tide - Low Tide (RANGE)")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, winds, color=as.factor(sample)))+
geom_point()+
labs(title="Tow A: Wind speed (mph)")+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(decemberhalo, aes(sample, nitrate_mg, color=factor(cell_count), size=cell_count))+
geom_point(show.legend = T)+
theme(axis.text = element_text(size = 10), axis.title = element_text(size = 12))#so far, halo seems to enjoy nitrates from 3 mg/L to about 13 mg/L
ggplot(decemberhalo, aes(sample, lunar_distance_mi, color=factor(cell_count), size=cell_count))+
geom_point() #halo likes it when the moon is closer to the earth
ggplot(decemberhalo, aes(sample, lunar_illumination_percent, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_range_calc_3, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_ft, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_range_calc_1, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, spc_cond_um_cm, color=factor(cell_count), size=cell_count))+
geom_point() #enjoying the 45000 to 50000 spc conductivity range
ggplot(decemberhalo, aes(sample, salinity_pu, color=factor(cell_count), size=cell_count))+
geom_point() #enjoying about 28-31 range here
ggplot(decemberhalo, aes(sample, chl_a_flu_rfu, color=factor(cell_count), size=cell_count))+
geom_point() #enjoy lower chl a? Is this a competition thing? I know halo are chl b sorts of algae.
ggplot(decemberhalo, aes(sample, water_temp_c, color=factor(cell_count), size=cell_count))+
geom_point() #enjoy between 8 and 8.6 C, 46-47 F
ggplot(decemberhalo, aes(sample, ph, color=factor(cell_count), size=cell_count))+
geom_point() #between 8 and 8.4 ph
ggplot(decemberhalo, aes(sample, orp_mv, color=factor(cell_count), size=cell_count))+
geom_point() #not a pattern really here
ggplot(decemberhalo, aes(sample, ph_mv, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, total_diss_solids_ppt, color=factor(cell_count), size=cell_count))+
geom_point() #enjoying between 29 and 32
ggplot(decemberhalo, aes(sample, density, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, resistivity_ohm_cm, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, act_cond_us_cm, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, nitrate_volts, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, next_full_days, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, cell_count, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, winds, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(sample, ambientweather.F, color=factor(cell_count), size=cell_count))+
geom_point() #don't seem to matter as much as water temp.
ggplot(decemberhalo, aes(sample, lowest.just.prior, color=factor(cell_count), size=cell_count))+
geom_point()
ggplot(decemberhalo, aes(dayofweek, cell_count, color=dayofweek))+
geom_boxplot()
53: 12 cells
57: 23 cells
68: 22 cells
70: 44 cells
samples <- subset(decemberhalo, sample >= 45)
ggplot(samples, aes(sample, nitrate_mg, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: Nitrates")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, spc_cond_um_cm, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: spc_cond_um_cm")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, salinity_pu, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: salinity_pu")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, ph, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: pH")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, chl_a_flu_rfu, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: chl_a_flu_rfu")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, water_temp_c, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: Water Temp (C)")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, tide_range_calc_3, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: High Tide - Low Tide (RANGE)")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(samples, aes(sample, winds, color=as.factor(sample)))+
geom_point()+
labs(title="Tow B: Wind speed (mph)")+
geom_vline(xintercept=57)+
geom_vline(xintercept=53)+
geom_vline(xintercept = 68)+
geom_vline(xintercept=70)
ggplot(decemberhalo, aes(sample, nitrate_mg, color=factor(Cell_count_b), size=cell_count))+
geom_point(show.legend = T)+
theme(axis.text = element_text(size = 10), axis.title = element_text(size = 12))#so far, halo seems to enjoy nitrates from 3 mg/L to about 13 mg/L
ggplot(decemberhalo, aes(sample, lunar_distance_mi, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #halo likes it when the moon is closer to the earth
ggplot(decemberhalo, aes(sample, lunar_illumination_percent, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_range_calc_3, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_ft, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
ggplot(decemberhalo, aes(sample, tide_range_calc_1, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
ggplot(decemberhalo, aes(sample, spc_cond_um_cm, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #enjoying the 45000 to 50000 spc conductivity range
ggplot(decemberhalo, aes(sample, salinity_pu, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #enjoying about 28-31 range here
ggplot(decemberhalo, aes(sample, chl_a_flu_rfu, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #enjoy lower chl a? Is this a competition thing? I know halo are chl b sorts of algae.
ggplot(decemberhalo, aes(sample, water_temp_c, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #enjoy between 8 and 8.6 C, 46-47 F
ggplot(decemberhalo, aes(sample, ph, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #between 8 and 8.4 ph
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, orp_mv, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #not a pattern really here
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, ph_mv, color=factor(cell_count), size=cell_count))+
geom_point()
## Warning: Removed 1 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, total_diss_solids_ppt, color=factor(cell_count), size=cell_count))+
geom_point() #enjoying between 29 and 32
## Warning: Removed 1 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, density, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, resistivity_ohm_cm, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, act_cond_us_cm, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, nitrate_volts, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, next_full_days, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, cell_count, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, winds, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, ambientweather.F, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point() #don't seem to matter as much as water temp.
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(sample, lowest.just.prior, color=factor(Cell_count_b), size=Cell_count_b))+
geom_point()
## Warning: Removed 23 rows containing missing values (`geom_point()`).
ggplot(decemberhalo, aes(dayofweek, Cell_count_b, color=dayofweek))+
geom_boxplot()
## Warning: Removed 23 rows containing non-finite values (`stat_boxplot()`).
#for emojis
sample <- decemberhalo$sample
lowest.just.prior <- decemberhalo$lowest.just.prior
cell_count <- as.factor(decemberhalo$Cell_count_b)
#d <- data.frame(x=sample, y=lowest.just.prior,
# label = sample(emoji('moon'), 59, replace=TRUE),
# type = sample(LETTERS[1:3], 59, replace=TRUE))
#ggplot(d, aes(sample, lowest.just.prior, color=Cell_count_b, size=Cell_count_b, label=label)) +
# geom_text(family="EmojiOne")
This schedule was created to help plan for TA office hours while sampling high slack tide each day during the winter quarter.
schedule <- read.csv("schedule.csv")
#MONDAY AVAILABILITY
mondays <- subset(schedule, dayofweek == "Monday")
mon <- ggplot(mondays, aes(Time, Date, color=Date))+
geom_point(show.legend = F)+
labs(title="MONDAYS")+
scale_x_continuous(breaks = seq(min(400), max(schedule$Time), by = 100))
ggplotly(mon)%>%
style(showlegend = FALSE)
#TUESDAYS
mondays <- subset(schedule, dayofweek == "Tuesday")
tues <- ggplot(mondays, aes(Time, Date, color=Date))+
geom_point()+
labs(title="TUESDAYS")+
scale_x_continuous(breaks = seq(min(400), max(schedule$Time), by = 100))
ggplotly(tues)%>%
style(showlegend = FALSE)
#WEDNESDAYS
mondays <- subset(schedule, dayofweek == "Wednesday")
wed <- ggplot(mondays, aes(Time, Date, color=Date))+
geom_point()+
labs(title="WEDNESDAYS")+
scale_x_continuous(breaks = seq(min(400), max(schedule$Time), by = 100))
ggplotly(wed)%>%
style(showlegend = FALSE)
#THURSDAYS
mondays <- subset(schedule, dayofweek == "Thursday")
thr<- ggplot(mondays, aes(Time, Date, color=Date))+
geom_point()+
labs(title="THURSDAYS")+
scale_x_continuous(breaks = seq(min(400), max(schedule$Time), by = 100))
ggplotly(thr)%>%
style(showlegend = FALSE)
#FRIDAYS
mondays <- subset(schedule, dayofweek == "Friday")
fri <- ggplot(mondays, aes(Time, Date, color=Date))+
geom_point(show.legend = F)+
labs(title="FRIDAYS")+
scale_x_continuous(breaks = seq(min(400), max(schedule$Time), by = 100))
ggplotly(fri)%>%
style(showlegend = FALSE)
p <- ggplot(schedule, aes(Sample, Time))+
geom_point(aes(color=Month, text=Date))+
labs(title="Sampling Schedule", y="TIME", x="SAMPLE")+
theme_minimal(base_size = 9)+
scale_y_continuous(breaks = seq(min(400), max(schedule$Time), by = 30))+
scale_x_continuous(breaks = seq(min(schedule$Sample), max(schedule$Sample), by = 2))
ggplotly(p)
beforethebloom <- read.csv("beforethebloom.csv")
ggplot(beforethebloom, aes(nitrate_mg, cell_count, color=dayofweek))+
geom_line(show.legend = F) #weird!
ggplot(beforethebloom, aes(nitrate_mg, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(lunar_illumination_percent, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(lunar_distance_mi, cell_count, color=dayofweek))+
geom_point(show.legend = F)+
xlim(225000, 250000)
ggplot(beforethebloom, aes(tide_range_calc_1, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(tide_range_calc_3, cell_count, color=dayofweek))+
geom_point(show.legend = F) #makes more sense with cell_count
ggplot(beforethebloom, aes(ph, cell_count, color=as.factor(sample)))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(chl_a_flu_rfu, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(water_temp_c, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(total_diss_solids_ppt, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(salinity_pu, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom, aes(spc_cond_um_cm, cell_count, color=dayofweek))+
geom_point(show.legend = F)
ggplot(beforethebloom)+
geom_line(aes(spc_cond_um_cm, cell_count, color="blue"))+
geom_line(aes(nitrate_mg, cell_count, color="cyan")) #maybe cv would allow these to be on same scale?
ggplot(beforethebloom)+
geom_point(aes(salinity_pu, cell_count, color="salinity"))+
geom_point(aes(nitrate_mg, cell_count, color="nitrate"))+
geom_point(aes(resistivity_ohm_cm, cell_count, color="specific conductivity"))+
geom_point(aes(total_diss_solids_ppt, cell_count, color="total dissolved solids"))+
xlim(0,33)
#convert 10 mg/L nitrate into micromol/liter
(10*1000)/(1000*62.0049) #10 mg/L of nitrate is equiv to 0.1613 micromoles/Liter
## [1] 0.1612776
hist(beforethebloom$ambientweather.F)
hist(beforethebloom$tide_range_calc_3)
hist(beforethebloom$cell_count) #cell count POISSON
hist(beforethebloom$lunar_illumination_percent) #proportion POISSON
hist(beforethebloom$lunar_distance_mi) #hmm...
hist(beforethebloom$nitrate_mg) #right skew
hist(beforethebloom$salinity_pu) #left skew
hist(beforethebloom$water_temp_c)
dec <- read.csv("decembertides.csv")
ggplot(dec, aes(Date, Pred, color=Day))+
geom_point() #looking at this, it seems I want to keep all Pred above 8.5 ft
highest <- subset(dec, Pred >= 8.5)
ggplot(highest, aes(Date, Pred, color=Day))+
geom_point() #6 still have duplicates
#editing the legend
l<- list(
font=list(
family="corbel",
size=10,
color="black"),
bgcolor="white",
orientation="m",
borderwidth=0)
#p|>
# layout(legend=l)
#look how fun
plot_ly(schedule,
labels = ~Month,
values = ~Time,
type = "pie",
sort = FALSE,
textfont = list(color = "white")) %>%
layout(legend = list(x = 1, y = 0.5))