LobsterWatch Santa Barbara
Bringing you this not-very-scientifically-sound report on the state of everyone’s favorite crustacean
Background
Lobsters are ecologically important marine predators and also very tasty treats. Because people love them for lots of different reasons, we’re reporting on the status of these large ocean bugs at both MPA and non-MPA sites in the Santa Barbara Channel.
Methods
The following data collection methods were copied verbatim from associated metadata records (citation below).
The number and sizes of spiny lobster are recorded by divers in four 60 x 5 m (300 m2 total) lobster transects that are associated with each permanent SBC LTER kelp forest community survey transect.
Data on the abundance and size of the California spiny lobster, Panulirus interruptus, are collected annually in late summer at five sites (Arroyo Quemado, Carpinteria, Isla Vista, Mohawk and Naples) along the mainland coast of the Santa Barbara Channel. Two of these sites (Naples and Isla Vista) were designated as Marine Protected Areas (MPA) in January 2012. The abundances of algae, invertebrates and fish have been monitored at these sites since 2001 in replicate 40 m x 2 m permanent SBC LTER transects. Although lobsters are counted in these transects, their density is not high enough to obtain reliable estimates of abundance. Therefore, the additional surveys were initiated in 2012, which encompass a much larger sampling area and focus exclusively on lobster.
Sites of Interest
We explore lobster abundances at two MPA (Marine Protected Area) sites – Naples Reef (NAPL) and Isla Vista (IVEE) – and three non-MPA sites – Arroyo Quemado (AQUE), Mohawk Reef (MOHK), and Carpinteria Reef (CARP):
Code
#..................get unique site/location data.................
<- lobs |>
sites select(site, protection_status, lat, lon) |>
distinct()
#......................split MPA vs non-MPA......................
<- sites |>
mpa filter(protection_status == "MPA")
<- sites |>
non_mpa filter(protection_status == "non-MPA")
#.......................create custom icon.......................
<- makeIcon(
lobster_icon iconUrl = here::here("media", "lobster.png"),
iconWidth = 30, iconHeight = 30
)
#...........................create map...........................
# initialize map ----
<- leaflet() |>
site_map
# add base map tiles (use `addTiles()` for Google maps tiles, OR `addProviderTiles()` for 3rd party base maps: https://leaflet-extras.github.io/leaflet-providers/preview/) ----
addProviderTiles(providers$Esri.WorldImagery, group = "ESRI World Imagery") |> # modify base map appearance with options: `providerTileOptions(opacity = 0.5, noWrap = FALSE)`
addProviderTiles(providers$Esri.OceanBasemap, group = "ESRI Oceans") |>
# add mini map ----
addMiniMap(toggleDisplay = TRUE, minimized = TRUE) |>
# set view over Santa Barbara Channel ----
setView(lng = -119.83, lat = 34.44, zoom = 9) |>
# add MPA markers ----
addMarkers(data = mpa, group = "MPA Sites",
icon = lobster_icon,
lng = ~lon, lat = ~lat,
popup = paste("Site Name:", mpa$site, "<br>",
"Coorinates (lat/long):", mpa$lat, ",", mpa$lon)) |>
# add non-MPA markers ----
addMarkers(data = non_mpa, group = "Non-MPA Sites",
icon = lobster_icon,
lng = ~lon, lat = ~lat,
popup = paste("Site Name:", non_mpa$site, "<br>",
"Coorinates (lat/long):", non_mpa$lat, ",", non_mpa$lon)) |>
# add layers control (toggle base map tiles & markers based on group IDs) ----
addLayersControl(
baseGroups = c("ESRI World Imagery", "ESRI Oceans"),
overlayGroups = c("MPA Sites", "Non-MPA Sites")) |>
# add reset map button ----
::addResetMapButton()
leaflet.extras
# print map ----
site_map
Results
There are more lobsters in MPAs than non-MPAs!
Code
# adding a column to lobs_summary
<- lobs_summary %>%
lobs_summary_marker
# create a new column called "marker" ----
mutate(marker = paste("Site:", site, "<br>",
"Year:", year, "<br>",
"Status:", protection_status, "<br>",
"Lobster count:", n))
# creating a new static plot
<- lobs_summary_marker %>%
static_with_marker
# create boxplot of mpa vs non-mpa lobster counts ----
ggplot(aes(x = protection_status, y = n, text = marker, group = protection_status)) +
# geoms: boxplot and jitter
geom_boxplot(width = 0.5, outlier.shape = NA) +
geom_point(aes(color = site, shape = site), size = 4, alpha = 0.8,
position = position_jitter(width = 0.25, height = 0, seed = 1)) +
# update colors ----
scale_color_manual(values = c("#91B38A", "#9565CC", "#CCC065", "#658ACC", "#CC6565")) +
scale_shape_manual(values = c(15, 25, 17, 18, 19)) +
# update labels ----
labs(x = "Protection Status",
y = "Lobster Counts",
color = "Site",
shape = "Site") +
# theme ----
theme_linedraw() +
theme(axis.text = element_text(size = 10),
axis.title = element_text(size = 13),
legend.text = element_text(size = 10),
legend.title = element_text(size = 11))
# tooltip = "text" corresponds to the aes() text call from above!
<- ggplotly(static_with_marker, tooltip = "text") %>%
lobs_interactive
# layout: most formatting goes here! ----
layout(
font = list(family = "Times"),
# editing the marker/tooltip/hoverlabel
hoverlabel = list(
# editing the font: all goes in a list()
font = list(
family = "Times",
size = 13,
color = "#FFFFFF",
align = "left"
)
)
)
# print plot ----
lobs_interactive
Appendix
Explore and download the raw data used throughout this report:
Code
#................customize your interactive table................
datatable(data = lobs,
# make the column names nice ----
colnames = c("Year", "Date", "Site", "Protection status", "Transect", "Replicate",
"Size (mm)", "Count", "Latitude", "Longitude"),
# column filters: sliders and drop down menus ----
filter = "top",
# extensions: lots of these! ----
extensions = c("Buttons", "ColReorder"),
# options ----
options = list(
# list 10 entries at once
pageLength = 10,
# automatically size columns
autoWidth = TRUE,
# highlight entries that match search term
searchHighlight = TRUE,
# allow regular expressions and case insensitive searches
search = list(regex = TRUE, caseInsensitive = TRUE),
dom = "Bfrtip",
# buttons options
buttons = c("copy", "csv", "excel", "pdf", "print", "colvis"),
# links to extension call
colReorder = TRUE)
%>%
)
# styling cells: coloring site background
formatStyle(
"site",
# styleEqual allows matches to column contents
backgroundColor = styleEqual(
levels = list("NAPL", "IVEE", "AQUE", "MOHK", "CARP"),
values = c("NAPL" = "#91B38A",
"IVEE" = "#9565CC",
"AQUE" = "#CCC065",
"MOHK" = "#658ACC",
"CARP" = "#CC6565")
) )