Halosphaera sp.

Bloom Dynamics 🧪


Markdown Author: Jessie Bell

The Algae

Photos

Proposal

Background


Still in progress of writing and formatting


Marine phytoplankton are a vital component of oceanic ecosystems. These small microorganisms form the foundation of marine food webs and provide the carbon necessary for heterotrophs through the production of photosynthesis. Prior to satellite data, marine primary productivity was only estimated at 25% of Earth’s carbon synthesis (Woodwell et al., 1978). In 1998, satellite imagery collected over the previous 25 years was used to model both terrestrial and marine net primary productivity (NPP), and showed that marine phytoplankton produce over 48% of Earth’s atmospheric oxygen (Field et al., 1998). This demonstrates that phytoplankton directly influence one of the largest carbon reservoirs on our planet and play a major indirect role in influencing Earth’s biogeochemical cycles.

One major contribution of phytoplankton in the transformation of energy into matter is their role in driving trophic networks. [insert sentence hard photosynthesis data for phytoplankton]. The base of marine trophic levels begins with phytoplankton, upon which all higher trophic levels depend. Zooplankton, such as copepods and zoea larvae, directly consume phytoplankton, while larger marine species like fish, whales, and certain seabirds depend heavily on zooplankton as their primary food source. A reduction in plankton abundance can trigger cascading effects, impacting fish populations and, consequently, the overall marine ecosystem. As phytoplankton communities and animal communities evolve over time, they continue to shape the intricate dynamics of marine ecosystems, influencing the delicate balance of life in our oceans.

Shifts in phytoplankton abundance throughout the fossil record are thought to be strongly correlated with our changing climate (Kahru & Elmgren, 2014; Winder & Schindler, 2004). This correlation is illustrated by the transition from green algal dominance to the proliferation of diatoms. Diatoms began to outcompete green algae as silica concentrations increased within our oceans, which occurred in unison with the terrestrial coevolution of grasses and ungulates (Falkowski et al., 2004). Since silica is primarily transferred to the oceans by the weathering of rocks, the ocean was silica-limited until the success of silica-rich grasses. However, as our climate changes, silica is predicted to decline rapidly, and 30% of diatoms are projected to disappear (Henson et al., 2021). Green algae (Chlorophytes) are anticipated to outperform other algal groups as Carbon Dioxide (CO2) levels increase, illuminating the importance of studying extant marine chlorophytes, to help provide information on what phytoplankton communities might look like in the future (Henson et al., 2021; Li et al., 2016).

Modern studies show that the majority of marine phytoplankton biomass is still made up of larger planktonic diatoms (> 20 µm), with the remaining biomass composed of dinoflagellates, green algae, and cryptomonads (Falkowski et al., 2004; Nemcek et al., 2023; Vishnu et al., 2022). Diatoms have not always been the most abundant phytoplankton in the ocean; they began to dominate about 66 Ma at the beginning of the Cenozoic (Falkowski et al., 2004). Before the Cenozoic, geologic evidence suggests that it was actually unicellular green algae that dominated our oceans (O’Kelly, 2007; Tappan, 1980). Green algae are likely the first eukaryotic cells to ever appear within our oceans, originating about 1.5 Ga ago (Leliaert et al., 2011). During the Paleozoic (540-250 Ma) prasinophytes, a class of chlorophyta, were the most abundant group of phytoplankton in the ocean, and they remain the only ecologically significant group of single-celled chlorophytes within our oceans today (Fang et al., 2017; Knoll, 1992; Lopes dos Santos et al., 2017; O’Kelly, 2007). These cells can be found both extant (Pachysphaera, Halosphaera, and Pterosperma), and throughout deep-time stratigraphy (leiosphaerid and tasmanite microfossils), though their evolutionary history remains poorly resolved (Guy-Ohlson, 1988; Leliaert et al., 2012; Not et al., 2004; Tappan, 1980).

Unfortunately, historic records documenting phytoplankton do not provide an accurate portrayal of their biomass (Bolaños et al., 2020). Phytoplankton range in size from about 2 µm - 2000 µm and include organisms that can alternate morphologies during a part of their life-cycle (Sieburth et al., 1978). Methodologies used to document them have historically been performed using planktonic tow nets that are generally 20 µm at their smallest mesh size. This implies that an entire size range of phytoplankton have been left out of prior plankton studies. Recent progress in genetic analyses through amplicon sequencing indicates that both pico- and nano-plankton play a dominant role in biomass radiance throughout both the winter and spring seasons (Bolaños et al., 2020; Not et al., 2004). This suggests that we have not accurately characterized the key organisms at the base of our marine biological blooms. Furthermore, documentation can be insufficient due to populations rapidly changing throughout a single day, season, or year (Behrenfeld et al., 2001; Cloern et al., 2023; Laws et al., 2000), and major discrepancies in the characterization of phytoplankton abundance and community composition can occur. These changes could be heavily affected by the processes of oceanic circulation, and incorporating specific circulation data for the region of interest into plankton studies can help resolve other factors that might be influencing these dynamics.

The Salish Sea, a region in the North Pacific, is nourished by several significant rivers and smaller waterways. It supports diverse plankton communities and provides vital nutrients for all marine life residing in its waters. Additionally, it has one of the most substantial water exchange flows globally, which promotes the circulation of large quantities of nutrients in the area (Pinardi et al., 2019). Circulation dynamics within this region are primarily influenced by the convergence of the cold, saline waters of the Pacific and many warmer terrestrial freshwater inputs. This intricate water exchange mechanism, along with tidal power, could govern the residence times of sessile plankton communities. The LiveOcean Model, developed to predict circulation patterns in the North Pacific, determined that exchange rates and residence times diminish during the winter months due to decreased freshwater inputs, whereas greater fluctuations in this exchange occur in the summer months, and over longer timescales, influenced by climatic phenomena such as the Pacific Decadal Oscillation and the El Niño Southern Oscillation (ENSO) (MacCready et al., 2021; Yamada & Kosro, 2010). These circulation variations directly influence the plankton communities residing in the region.

One of the organisms supported by the Salish Sea bioregion includes the prasinophyte, Halosphaera. The life cycle of Halosphaera encompasses two distinct stages: the flagellated stage and the phycomate stage. During the flagellated stage, individual cells are small, typically measuring around 15 µm in size. These flagellates are motile, allowing them to actively move within the water column. As conditions change, particularly during the winter months, Halosphaera undergoes a significant transformation. The flagellates aggregate and form physiologically active structures known as phycomates. These phycomates can reach sizes of up to 400 µm and are spherical lipid-filled cells. Unlike the flagellates, phycomates are non-motile and float passively to the water’s surface, and the morphological transition from flagellates to phycomates is believed to occur in synchrony with lunar periodicity (Parke & Hartog-Adams, 1965), potentially influenced by tidal variations. This synchronized reproduction strategy may contribute to the observed fluctuations in Halosphaera phycomate abundance throughout the winter months in the Salish Sea. The phycomate stage of Halosphaera holds particular significance for paleontologists studying ancient eukaryotic microfossils. Unlike many other phytoplankton species, the exterior of wall of these phycomates is composed of a sporopollenin-like durable biopolymer. This unique composition increases the likelihood of preservation in marine sediments over geological time scales (Cohen et al., 2009; Tappan, 1980). As a result, Halosphaera serves as a potential model organism for reconstructing ancient marine ecosystems and understanding the early evolution of eukaryotic life on Earth. By studying the morphology and distribution of Halosphaera fossils in sedimentary records, researchers can gain insights into past environmental conditions and the evolutionary dynamics of marine phytoplankton communities. Additionally, the fossilization potential of the phycomate stage offers opportunities to refine paleoenvironmental reconstructions and refine our understanding of the Earth’s history.

Previous work on Halosphaera shows that the particular species within the Salish Sea has not yet been described, and is morphologically different from those previously described (Kodner, 2007). They are poorly studied, and most literature on this genera was published before the 1980s. In 1965, three species in the English Channel were described using only morphological observations, these included: H. viridis, H. minor, and H. russellii (Manton et al., 1963; Parke & Hartog-Adams, 1965). Halosphaera sp. are exclusively found during the winter months in the Pacific Northwest, whereas in warmer open waters they have only been reported during the summer months (Jenkinson, 1986; Wiebe et al., 1974) between a motile flagellated stage and a non-motile phycomate stage (Fig. 1).

Figure 1: (1) Showing flagellated stage for H. minor (Parke and Hartog-Adams 1965), and (2) Immature phycomate (3) Formation of rosettes that will become motile flagellates, (4) Intermediate stage of Halosphaera sp. in Bellingham Bay, Bellingham, Washington. Collections for b-d were taken in January & February 2023 using dissection scope in the Kodner lab, cysts are about 120-310 µm.




Objectives



A preliminary investigation that I conducted from January - March of 2023 throughout the Salish Sea (Fig. 2) does not support the idea that phycomate abundance is directly related to the lunar cycle (Fig. 3).

Figure 2: Previous sample sites from our pilot study January - March, 2023 taken at multiple locations within the Salish Sea. Dr. Kodner and I took two trips on the R.V. Magister; on February 2nd and March 8th. The February 2nd trip traveled to sites 2-4, the March 8th trip only traveled to site 3, a surface tow was also collected at Taylor Dock and aboard the Magister. The Taylor Dock sample had only 3 cells and the R.V. Magister sample had 15 cells. (1) Bellingham Bay, (2) Burrow’s Bay, (3) Smith Island, (4) Strait of Juan de Fuca 001.Created in ArcGIS Pro 2.8.



Figure 3: (A) Number of cells counted per tow shown as dependent on time. Day 1 began on January 13th, 2023, samples were not collected every day during this study. The plum-colored vertical lines show when the new moon occurred, and the blue vertical line shows when the full moon occurred. The sample with 55 cells was collected 4 days before the full moon. There was only one full moon event during this last sampling season. (B) Shows that on average there were more cells collected during high tide. (C) shows that it is quite difficult to depict patterns that might be happening with the lunar cycle. Proportion of total cells collected were used to not give weight to which times were sampled more often.


I believe that it is more likely that abiotic factors have direct influence on the Halosphaera bloom dynamics – which was not considered in my preliminary work nor previous research. The abiotic factors I intend to measure include water temperature, pH, conductivity, nitrate and chlorophyll concentrations, tidal variation, wind speed, precipitation events, windspeed, and wind direction. My study will help us resolve the story of this marine prasinophyte given modern climatic conditions here in the Pacific Northwest. I propose to collect both spatial and temporal data on Halosphaera, which will allow me to address questions about their ecology in a way that has not been done before within the Salish Sea. Based on my observations from last winter, Dr. Kodner’s observations over the last decade, and Maurice Dube’s observations in the 1980s, the following objectives will drive my graduate thesis:

  1. Determine possible abiotic factors influencing the abundance and morphological characteristics of Halosphaera observed throughout the winter growing season.

  2. Determine the ecological context for a Halosphaera bloom and the dynamics between Halosphaera/chlorophytes and the other phytoplankton in the winter.

  3. Characterize the genetic diversity of phycomates throughout space and time in the region.




Methods



Overview

Project objectives will be met [insert quick phrase here to summarize below]. To characterize both phycomate abundance and morphological characteristics throughout an entire bloom season in the Bellingham Bay estuary, a plankton net will be towed over a set distance (quantity of phycomata per volume). The Bellingham Bay estuary winter phytoplankton community composition (determined through amplicon sequencing) will be sampled using a vacuum filter flask, and portions of plankton tows will be stored for further taxonomic resolution. Temporal samples will be collected daily at high slack tide from December 1, 2023 to April 1, 2024. Alongside temporal samples, abiotic water characteristics will also be measured to determine other factors potentially driving phytoplankton dynamics. These characteristics will include in-situ measurements of temperature, pH, nitrates, salinity, chlorophyll a, tidal variation, windspeed, wind direction, and precipitation. Spatiotemporal diversity of phycomates will be collected from Bellingham Bay, Bamfield Inlet, Friday Harbor, and Coos Bay (Fig. 5), to characterize the genetic diversity of Halosphaera in the Pacific Northwest region (characterized through single celled PCR). In-vitro processing will occur at Western Washington University using stereomicroscopy, confocal microscopy, amplicon sequencing, and single cell PCR.

Sample Sites

  Temporal sampling. Data will be collected daily at Taylor Dock in the Bellingham Bay estuary (Fig. 4). Samples will be collected at high slack tide to decrease the variability between samples that might occur due to tidal power (citation). Amplicon sequencing data will be collected using discrete water samples collected from the floating dock (Fig. 4A). A 0.2 µm filter will be used to pull 500 ml of water through a vacuum flask. Abiotic in situ parameters will also be sampled from the floating dock. Surface tows will be conducted over ~244 m (Fig. 4B) using a 20 µm size mesh net. The daily time-series samples will help address project questions about bloom dynamics for Halosphaera as well as characterize the winter phytoplankton community in Bellingham Bay.

      Spatial sampling. Fewer samples will be collected for the spatial component of this analysis, including 4 locations throughout the region. These sites will include Coos Bay, OR, Friday Harbor, WA, Bellingham Bay, WA, and Bamfield, BC (Fig. 5). These samples will be used to determine the genetic diversity within the region. Single cell genetic analyses will also be completed for phycomates of different sizes within the time-series Bellingham Bay samples to determine if more than one species of Halosphaera exists throughout the bloom within the Bellingham Bay estuary.

Phycomate Characteristics

      Preservation & Processing. All time-series plankton tow samples collected from Taylor Dock will be stored in 8 oz Nalgene bottles, stored in the dark at 9°C, processed using a stereoscope, and counted while pipetting phycomates into 0.5 ml centrifuge tube with the addition of glutaraldehyde until overall concentration is 3% (Wetzel & Likens, 1990). Microscopy of preserved phycomates will be done using EVOS Digital Inverted XL Core AMEX1200 within 2 days of the live tow. These data will be stored as .png files and used to get initial size distribution (via ImageJ) for phycomates throughout their bloom. Data will also be used to characterize proportional life stages for phycomates (using 5 life-cycle stage categories). Samples will then be placed back into their 0.5 ml centrifuge tubes, stored in the dart at 9°C, and examined under Leica Stellaris 8 Laser Confocal Fluorescent Microscope with 20x dry objective to get detailed z-stack .lic files, which will be used to confirm initial image data. These high resolution images will be used to confirm initial measurements of phycomate characteristics throughout their bloom for the 23-24 sampling season.

      Statistics. All phycomate characteristics alongside abiotic parameters throughout the bloom will be statistically analyzed to help describe the phycomate variability and determine the parameters that influence their bloom. Exploratory data analysis, Spearman’s rank correlations, and generalized linear modeling (GzLM) will be conducted using R to help reveal relationships between cell counts and abiotic factors. Phycomate size variability will be graphed using box and whisker plots, where the x-axes will be blocked using daily, weekly, and monthly resolution and analyzed using ANOVA to determine variability throughout time. Phycomates will be placed into one of five morphological categories and explored daily and weekly to identify if patterns exist during the bloom.

Community DNA

      Preservation & Processing. All time-series community DNA filters will be placed into tubes and stored at -18°C. After sampling concludes, specific samples (chosen using statistical phycomate analyses above) will be processed using ZymoBIOMICS DNA Miniprep Kits following the manufacturer’s protocol. From these selected samples, the V4 region of the 18s rRNA gene will be targeted using TAQ primers and amplified to determine the eukaryotic phytoplankton composition. The 16s rRNA gene will also be investigated to determine prokaryotic composition for each sample.

      Statistics. Edge principal component analysis (ePCA) will be used to determine daily community composition in surface waters. Alpha diversity (species richness) will be calculated using balance-weighted phylogenetic diversity analyses. Beta diversity (changes in community composition through time) will be calculated using a weighted Unifrac distance analysis. A heatmap will also be created in R to show variability over time in these data.

Halosphaera Systematics

      Preservation & Processing. Cells will be placed individually into 0.2 ml tubes directly after Leica Stellaris 8 Laser Confocal Fluorescence Microscopy. These cells will be frozen at -18°C until they are ready to be processed using single cell PCR analysis. Single cells from 2018, 2023, and 2024 Bellingham Bay samples will be processed. Samples from Coos Bay, OR, Friday Harbor, WA, and Bamfield Bay, WA collected in 2024. These cells will be processed using REPLI-g Single Cell Kit following manufacturer’s protocol before they are sent to a laboratory for sequence data analysis. These analyses will provide evidence on how many species exist throughout the bloom in Bellingham Bay, as well as spatially, throughout the Pacific Northwest.

      Statistics. Principal component analysis (PCA) will be used to create clusters of similar species. Neighbor Joining (NJ) analyses will be used to determine the best phylogenetic tree placement for different phycomate locations and sizes. We will also compare Halosphaera to their closest known relatives (i.e. other members in the family Pyramimonadaceae) to help build this tree.

Anticipated Results [still in progress of refining]

Research Importance [still in progress of refining]




Citations



Behrenfeld, M. J., Randerson, J. T., McClain, C. R., Feldman, G. C., Los, S. O., Tucker, C. J., Falkowski, P. G., Field, C. B., Frouin, R., Esaias, W. E., Kolber, D. D., & Pollack, N. H. (2001). Biospheric Primary Production During an ENSO Transition. Science, 291(5513), 2594–2597. https://doi.org/10.1126/science.1055071
Bolaños, L. M., Karp-Boss, L., Choi, C. J., Worden, A. Z., Graff, J. R., Haëntjens, N., Chase, A. P., Della Penna, A., Gaube, P., Morison, F., Menden-Deuer, S., Westberry, T. K., O’Malley, R. T., Boss, E., Behrenfeld, M. J., & Giovannoni, S. J. (2020). Small phytoplankton dominate western North Atlantic biomass. The ISME Journal, 14(7), 1663–1674. https://doi.org/10.1038/s41396-020-0636-0
Cloern, J. E., Schraga, T. S., Nejad, E., & Eddy, T. (2023). Phytoplankton as indicators of global warming? Limnology and Oceanography Letters, lol2.10354. https://doi.org/10.1002/lol2.10354
Cohen, P. A., Knoll, A. H., & Kodner, R. B. (2009). Large spinose microfossils in Ediacaran rocks as resting stages of early animals. Proceedings of the National Academy of Sciences, 106(16), 6519–6524. https://doi.org/10.1073/pnas.0902322106
Falkowski, P. G., Katz, M. E., Knoll, A. H., Quigg, A., Raven, J. A., Schofield, O., & Taylor, F. J. R. (2004). The Evolution of Modern Eukaryotic Phytoplankton. Science, 305(5682), 354–360. https://doi.org/10.1126/science.1095964
Fang, L., Leliaert, F., Zhang, Z.-H., Penny, D., & Zhong, B.-J. (2017). Evolution of the Chlorophyta: Insights from chloroplast phylogenomic analyses. Journal of Systematics and Evolution, 55(4), 322–332. https://doi.org/10.1111/jse.12248
Field, C. B., Behrenfeld, M. J., Randerson, J. T., & Falkowski, P. (1998). Primary production of the biosphere: Integrating terrestrial and oceanic components. Science, 281(5374), 237–240. https://doi.org/10.1126/science.281.5374.237
Guy-Ohlson, D. (1988). Developmental Stages in the Life Cycle of Mesozoic Tasmanites. Botm, 31(5), 447–456. https://doi.org/10.1515/botm.1988.31.5.447
Henson, S. A., Cael, B. B., Allen, S. R., & Dutkiewicz, S. (2021). Future phytoplankton diversity in a changing climate. Nature Communications, 12(1), 5372. https://doi.org/10.1038/s41467-021-25699-w
Jenkinson, I. R. (1986). Halosphaera Viridis, Ditylum Brightwellii and other phytoplankton in the north-eastern North Atlantic in spring: Sinking, rising and relative abundance. Ophelia, 26(1), 233–253. https://doi.org/10.1080/00785326.1986.10421991
Kahru, M., & Elmgren, R. (2014). Multidecadal time series of satellite-detected accumulations of cyanobacteria in the baltic sea. Biogeosciences, 11(13), 3619–3633. https://doi.org/10.5194/bg-11-3619-2014
Knoll, A. H. (1992). The Early Evolution of Eukaryotes: A Geological Perspective. Science, 256(5057), 622–627. https://doi.org/10.1126/science.1585174
Kodner, R. (2007). Using Modern Organisms to Investigate Molecular Fossils and Microfossils of Eukaryotes: Examples from Animals and Algae [PhD thesis]. Harvard.
Laws, E. A., Falkowski, P. G., Smith Jr., W. O., Ducklow, H., & McCarthy, J. J. (2000). Temperature effects on export production in the open ocean. Global Biogeochemical Cycles, 14(4), 1231–1246. https://doi.org/10.1029/1999GB001229
Leliaert, F., Smith, D. R., Moreau, H., Herron, M. D., Verbruggen, H., Delwiche, C. F., & De Clerck, O. (2012). Phylogeny and Molecular Evolution of the Green Algae. Critical Reviews in Plant Sciences, 31(1), 1–46. https://doi.org/10.1080/07352689.2011.615705
Leliaert, F., Verbruggen, H., & Zechman, F. W. (2011). Into the deep: New discoveries at the base of the green plant phylogeny. BioEssays, 33(9), 683–692. https://doi.org/10.1002/bies.201100035
Li, W., Xu, X., Fujibayashi, M., Niu, Q., Tanaka, N., & Nishimura, O. (2016). Response of microalgae to elevated CO2 and temperature: impact of climate change on freshwater ecosystems. Environmental Science and Pollution Research, 23(19), 19847–19860. https://doi.org/10.1007/s11356-016-7180-5
Lopes dos Santos, A., Gourvil, P., Tragin, M., Noël, M.-H., Decelle, J., Romac, S., & Vaulot, D. (2017). Diversity and oceanic distribution of prasinophytes clade VII, the dominant group of green algae in oceanic waters. The ISME Journal, 11(2), 512–528. https://doi.org/10.1038/ismej.2016.120
MacCready, P., McCabe, R. M., Siedlecki, S. A., Lorenz, M., Giddings, S. N., Bos, J., Albertson, S., Banas, N. S., & Garnier, S. (2021). Estuarine Circulation, Mixing, and Residence Times in the Salish Sea. Journal of Geophysical Research: Oceans, 126(2), e2020JC016738. https://doi.org/10.1029/2020JC016738
Manton, I., Oates, K., & Parke, M. (1963). Observations on the fine structure of the pyramimonas stage of halosphaera and preliminary observations on three species of pyramimonas. Journal of Marine Biological Association, 43, 225238.
Nemcek, N., Hennekes, M., Sastri, A., & Perry, R. I. (2023). Seasonal and spatial dynamics of the phytoplankton community in the Salish Sea, 20152019. Progress in Oceanography, 217, 103108. https://doi.org/10.1016/j.pocean.2023.103108
Not, F., Latasa, M., Marie, D., Cariou, T., Vaulot, D., & Simon, N. (2004). A Single Species, Micromonas pusilla (Prasinophyceae), Dominates the Eukaryotic Picoplankton in the Western English Channel. Applied and Environmental Microbiology, 70(7), 4064–4072. https://doi.org/10.1128/AEM.70.7.4064-4072.2004
O’Kelly, C. J. (2007). The Origin and Early Evolution of Green Plants (pp. 287–309). Elsevier. https://doi.org/10.1016/B978-012370518-1/50014-X
Parke, M., & Hartog-Adams, I. D. (1965). Three species of Halosphaera. Journal of the Marine Biological Association of the United Kingdom, 45(2), 537–557. https://doi.org/10.1017/S0025315400054990
Pinardi, N., Cessi, P., Borile, F., & Wolfe, C. L. P. (2019). The Mediterranean Sea Overturning Circulation. Journal of Physical Oceanography, 49(7), 1699–1721. https://doi.org/10.1175/JPO-D-18-0254.1
Sieburth, J. McN., Smetacek, V., & Lenz, J. (1978). Pelagic ecosystem structure: Heterotrophic compartments of the plankton and their relationship to plankton size fractions 1. Limnology and Oceanography, 23(6), 1256–1263. https://doi.org/10.4319/lo.1978.23.6.1256
Tappan, H. N. (1980). The paleobiology of plant protists. W. H. Freeman.
Vishnu, P. S., Xi, H., Belluz, J. D. B., Hussain, M. S., Bracher, A., & Costa, M. (2022). Seasonal dynamics of major phytoplankton functional types in the coastal waters of the west coast of Canada derived from OLCI Sentinel 3A. Frontiers in Marine Science, 9, 1018510. https://doi.org/10.3389/fmars.2022.1018510
Wiebe, P. H., Remsen, C. C., & Vaccaro, R. F. (1974). Halosphaera viridis in the Mediterranean sea: Size range, vertical distribution, and potential energy source for deep-sea benthos. Deep Sea Research and Oceanographic Abstracts, 21(8), 657–667. https://doi.org/10.1016/0011-7471(74)90050-3
Winder, M., & Schindler, D. E. (2004). Climate Change Uncouples Trophic Interactions in an Aquatic Ecosystem. Ecology, 85(8), 2100–2106. https://doi.org/10.1890/04-0151
Woodwell, G. M., Whittaker, R. H., Reiners, W. A., Likens, G. E., Delwiche, C. C., & Botkin, D. B. (1978). The Biota and the World Carbon Budget: The terrestrial biomass appears to be a net source of carbon dioxide for the atmosphere. Science, 199(4325), 141–146. https://doi.org/10.1126/science.199.4325.141
Yamada, S. B., & Kosro, P. M. (2010). Linking ocean conditions to year class strength of the invasive European green crab, Carcinus maenas. Biological Invasions, 12(6), 1791–1804. https://doi.org/10.1007/s10530-009-9589-y





Objective 1:

The next two sections are to help answer objective 1 in my research proposal.

1. Determine possible abiotic factors influencing the abundance and morphological characteristics of Halosphaera observed throughout the winter growing season.

The Site

Map

Taylor Dock (TD)

df <- data.frame(lat=48.72547085 , long=-122.5076196)


df %>%
  leaflet(height=200, width = 300) %>%
  addTiles() %>%
  addMarkers(clusterOptions = markerClusterOptions(), popup = "Floating Dock")

Photos

still in progress - working on timeseries collage of TD

The Data

Drivers

sample <- read.csv("Halo_sofar.csv")

p4 <- ggplot(sample) +
  geom_line(aes(sample, cell_count, color="Cell Count"))+
  geom_line(aes(sample, nitrate_mg, linetype="Dekati Sum", color="Nitrates (mg/L)")) +
  geom_line(aes(sample, salinity_pu, linetype="PM10", color="Salinity (PSU)")) +
  geom_line(aes(sample, ph, color="pH")) +
  geom_line(aes(sample, water_temp_c, color="Temp (°C)")) +
  labs(title = "", y="", x="") +
  guides(linetype = "none", color=guide_legend(title="")) +
  theme_gray(base_size = 10)

ggplotly(p4)

Counts

Date <- sample[1]
Season <- sample[48]
Sample <- sample[6]
Cells <- sample[17]
cell_count_B <- sample[18]
cell_count_C <- sample[19]
site_notes <- sample[20]
picking_notes <- sample[21]


samplenotes <- cbind(Sample, site_notes, picking_notes)


cellcount_table <- cbind(Sample, Date, Season, Cells, cell_count_B, cell_count_C)

cellcount_table|>
  gt()|>
  cols_label(
    sample ~ "Sample", 
    date ~ "Date",
    Season ~ "Season",
    cell_count ~ "A", 
    Cell_count_b ~ "B", 
    Depth_cell_count ~ "C")|>
  data_color(
    columns = vars(cell_count),
    colors = scales::col_numeric(
      palette = c(
        "white", "#e76bf3", "#e76bf3"),
      domain = NULL)
  )|>
  data_color(
    columns = vars(Cell_count_b),
    colors = scales::col_numeric(
      palette = c(
        "white", "#00bfc4", "#00bfc4"),
      domain = NULL)
  )|>
  tab_header(
    title = md("**Table 1:** *Halosphaera* Cell Counts 2022-2024."),
    subtitle = "Data from both season 1 & season 2. Season 1 began on 01/13/23. Season 2 began on 12/01/23. A: initial surface tow, B: second surface tow. C: depth tow. Each surface tow sampled ~12.4 m³ of surface water at Taylor Dock in Bellingham, WA."
  )|>
  tab_options(table.font.color="#505050", 
              table_body.hlines.style =, 
              heading.background.color = NULL, 
              table.font.size = 10)|>
  opt_align_table_header(align = "left") |>
  tab_options(heading.padding = px(1))|>
  opt_interactive()
Table 1: Halosphaera Cell Counts 2022-2024.
Data from both season 1 & season 2. Season 1 began on 01/13/23. Season 2 began on 12/01/23. A: initial surface tow, B: second surface tow. C: depth tow. Each surface tow sampled ~12.4 m³ of surface water at Taylor Dock in Bellingham, WA.

Data


All Data


vs_dt <- organizeddf
vs_dt[1:7] <- lapply(vs_dt[1:7], function(x) {
    cell_spec(x, bold = T, 
              color = spec_color(x, end = 0.9),
              font_size = spec_font_size(x))
})
vs_dt[9:17] <- lapply(vs_dt[9:17], function(x) {
    cell_spec(x, bold = T, 
              color = spec_color(x, end = 0.9),
              font_size = spec_font_size(x))
})
vs_dt[8] <- cell_spec(vs_dt[[8]], color = "white", bold = T,
    background = spec_color(1:10, end = 0.9, option = "A", direction = -1))
kbl(vs_dt, escape = F, align = "c") %>%
  kable_classic("striped", full_width = F) %>%
  scroll_box(width = "500px", height = "200px")
ambientweather.F tide_ft highest.high lowest.just.prior lowest.low tide_range_calc_1 tide_range_calc_3 cell_count Cell_count_b lunar_distance_mi nitrate_mg salinity_pu total_diss_solids_ppt ph orp_mv chl_a_flu_rfu water_temp_c
41 6.67 9.4 6.78 -1.38 -0.11 10.78 0 NA 247101 28.262569 NA NA NA NA NA NA
45 9.18 9.18 -0.73 -0.73 9.91 9.91 0 NA 249605 0.91175 27.21819 28.01624 7.6796 275.2353 0.00662 8.4969
44 8.97 8.97 0.01 0.01 8.96 8.96 0 NA 250758 42.84298 30.53366 31.07706 8.16124 219.65986 0.00373 8.70334
44 8.43 8.79 0.83 0.83 7.6 7.96 0 NA 251148 21.45113 28.13971 28.94269 8.22413 190.61506 0.00327 7.95347
51 8.65 8.65 1.74 1.74 6.91 6.91 0 NA 250730 30.08332 31.07493 31.51527 8.25449 206.55585 0.00144 9.16134
48 8.14 8.56 2.71 2.71 5.43 5.85 0 NA 249520 16.1092 17.34768 18.58175 8.31576 216.59472 0.00346 8.48911
42 8.52 8.52 3.71 3.71 4.81 4.81 0 NA 247601 0.77432 10.24423 11.46326 8.14896 204.16494 0.00524 7.7883
42 8.52 8.52 4.68 2.05 3.84 6.47 0 NA 245113 1.53244 7.12233 8.19599 8.18772 188.39212 0.00343 7.28873
37 8.55 8.55 5.55 1.03 3 7.52 0 NA 241993 18.12098 29.8876 30.54439 7.74203 251.90447 0.00114 8.07926
43 8.6 8.6 6.28 0.02 2.32 8.58 0 NA 238965 3.37163 30.57029 31.04424 8.33544 223.70728 0.00038 9.28107
47 8.66 8.66 6.84 -0.93 1.82 9.59 0 NA 236034 11.92593 29.59702 30.20882 8.35567 210.60689 0.00047 8.65736
45 8.26 8.95 7.23 -1.74 1.03 10.69 0 NA 233623 14.21927 30.42514 30.90077 8.34947 200.72277 0 9.37628
41 8.71 9.32 7.44 -2.34 1.27 11.66 0 NA 231147 12.29165 30.7497 31.26385 8.3672 189.23432 0.00086 8.76634
43 8.6 9.51 7.49 -2.69 1.11 12.2 0 NA 229688 9.21862 29.29746 29.98957 8.37886 193.17085 0.00125 8.19236
44 8.29 9.56 7.35 -2.76 0.18 12.32 5 NA 228828 11.72687 28.82727 29.48215 8.35159 195.77373 0.0015 8.83294
36 9.53 9.53 -2.5 -2.5 12.03 12.03 1 NA 228670 11.57442 30.78305 31.34193 8.35621 191.96836 0.00141 8.37332
39 9.41 9.47 -1.9 -1.9 11.31 11.37 1 NA 228874 12.82579 30.16181 30.78614 8.36727 201.89099 0.00145 8.2677
42 9.41 9.41 -0.97 -0.97 10.38 10.38 4 NA 229579 3.00837 28.83484 29.54172 8.07056 61.93954 0.00059 8.20661
48 9.37 9.37 0.28 0.28 9.09 9.09 0 NA 230628 18.34323 31.72831 32.09588 8.31411 188.66809 0.00202 9.2901
48 9.33 9.33 1.75 1.75 7.58 7.58 5 NA 231987 4.86718 20.18266 21.32461 8.18507 208.8915 0.00369 8.87895
48 9.29 9.29 3.3 3.3 5.99 5.99 3 NA 233369 8.61865 16.50039 17.73133 8.37898 194.78409 0.00396 8.73145
45 9.23 9.23 4.76 1.12 4.47 8.11 2 NA 234787 10.35693 25.40514 26.29453 8.40386 206.03505 0.00802 8.83336
44 9.12 9.12 5.95 -0.09 3.17 9.21 1 NA 236939 8.8109 17.80078 19.1504 8.19794 210.21223 0.00197 6.84801
44 8.97 8.97 6.77 -1.03 2.2 10 0 0 238884 11.22984 31.23722 31.71462 8.35045 201.6884 0.00421 8.68704
44 8.77 9.16 7.21 -1.64 1.56 10.8 0 0 241133 11.81177 27.70757 28.52509 8.3786 215.91129 0.00558 8.00364
49 8.53 9.59 7.36 -1.95 1.17 11.54 0 1 243790 9.90111 23.1936 24.22541 8.41446 216.45978 0.00581 8.53067
49 8.26 9.74 7.3 -2 0.96 11.74 0 0 245435 10.90852 30.14927 30.70437 8.34202 212.7812 0.00359 8.79806
51 7.93 9.69 7.1 -1.85 0.83 11.54 0 0 247619 2.83223 31.26287 31.69932 8.3905 199.74965 0.00237 9.02441
51 9.53 9.53 -1.54 -1.54 11.07 11.07 0 0 248667 9.3716 30.11109 30.67992 8.38701 165.56257 0.00238 8.71282
53 9.34 9.34 -1.09 -1.09 10.43 10.43 0 2 250266 8.66201 30.96427 31.4301 8.4008 271.09675 0.00157 9.01171
45 9.17 9.17 -0.51 -0.51 9.68 9.68 3 2 251210 1.88223 19.31224 20.47344 8.30957 238.20225 0.00328 9.03188
34 8.96 8.96 0.41 0.41 8.55 8.55 4 0 251505 9.17252 15.23237 16.27202 8.56835 244.33227 0.00428 6.72886
41 8.86 8.86 1.38 1.38 7.48 7.48 0 0 251039 11.65068 28.34567 29.06413 8.33923 204.89765 0.00315 8.58107
42 8.78 8.78 2.51 2.51 6.27 6.27 0 0 249795 11.86809 29.1459 29.76341 8.35085 186.54544 0.00519 8.99314
45 8.71 8.71 3.74 3.74 4.97 4.97 1 0 247791 12.95757 28.56749 29.18236 8.37137 198.04515 0.00366 9.48634
44 8.63 8.63 4.98 2.29 3.65 6.34 0 3 245109 3.83192 28.87304 29.50193 8.39513 193.11191 0.00511 9.12461
44 8.59 8.59 6.12 1.3 2.47 7.29 0 0 241614 10.29073 15.58224 16.91334 8.52624 176.765 0.00438 7.28738
37 8.6 8.6 6.97 0.32 1.63 8.28 2 2 238078 10.87828 25.55755 26.50911 8.40787 184.76826 0.00391 7.95474
37 8.66 8.66 7.48 -0.61 1.18 9.27 0 0 234516 12.76361 29.61839 30.19649 8.38561 151.83506 0.00487 9.03416
46 8.76 8.94 7.7 -1.45 1.06 10.39 4 1 230958 11.23315 27.21488 28.04942 8.44955 235.81721 0.00407 8.22661
39 8.84 9.3 7.7 -2.15 1.14 11.45 1 0 229467 10.97075 25.3106 26.32733 8.46916 173.44643 0.00454 7.62211
22 8.82 9.49 7.49 -2.65 1.33 12.14 0 1 226343 3.16474 22.81534 24.08988 8.50326 161.87004 0.00577 6.21026
9 8.64 9.57 7.09 -2.87 1.55 12.44 0 0 225304 4.41527 30.0786 30.87241 8.47131 191.54912 0.00356 6.89002
17 8.22 9.59 6.48 -2.73 1.74 12.32 5 3 225345 12.07369 29.95758 30.80232 8.46264 187.51889 0.00291 6.60087
13 9.59 9.59 -2.18 -2.18 11.77 11.77 0 0 225859 11.59008 29.78639 30.64509 8.45381 187.49691 0.00465 6.64837
20 9.59 9.59 -1.21 -1.21 10.8 10.8 1 0 227260 12.10643 29.8443 30.80205 8.49538 182.58112 0.00359 5.9174
26 9.58 9.58 0.14 0.14 9.44 9.44 3 7 229424 12.60982 29.57508 30.46242 8.47164 188.83295 0.0036 6.57985
32 9.53 9.53 1.75 1.75 7.78 7.78 0 3 231810 9.65712 1.0995 1.14145 9.37752 192.25118 0.00221 3.06607
30 9.41 9.41 3.46 2.22 5.95 7.19 2 1 234309 10.42099 29.96868 30.74781 8.41914 184.14405 0.0018 7.14402
34 9.22 9.22 5.08 1.09 4.14 8.13 1 3 236850 12.17441 29.60077 30.49553 8.47272 192.97695 0.00497 6.47873
37 8.96 8.96 6.37 0.15 2.59 8.81 2 3 239309 11.92969 29.60774 30.47335 8.41776 190.64596 0.00508 6.68815
41 8.67 8.67 7.14 -0.52 1.53 9.19 2 3 241816 13.08753 29.72298 30.43991 8.42885 229.24344 0.00529 7.80062
44 8.39 8.93 7.38 -0.94 1.01 9.87 10 12 243960 11.75653 22.03692 23.18197 8.41185 199.29945 0.01342 7.9717
39 9.31 9.31 -1.15 -1.15 10.46 10.46 1 1 245458 10.49729 20.10976 21.43533 8.44815 195.72107 0.00992 6.65226
48 7.96 9.41 7 -1.21 0.96 10.62 0 0 247842 11.67678 28.6198 29.46621 8.43128 191.22398 0.00537 7.35649
49 7.79 9.34 6.67 -1.15 1.12 10.49 1 2 249564 11.21696 23.11013 24.26859 8.48927 214.30234 0.01015 7.26688
50 7.58 9.19 6.26 -0.98 1.32 10.17 4 23 250809 9.00913 15.1722 16.43709 8.44883 204.92145 0.01362 7.8185
57 7.28 9.03 5.78 -0.7 1.5 9.73 1 1 251612 13.97296 28.07632 28.7733 8.42886 205.41281 0.01683 9.35818
56 6.9 8.92 5.22 -0.25 1.68 9.17 0 2 252070 7.72472 8.09815 9.15193 8.39938 238.81449 0.0228 10.07409
68 6.45 8.86 4.58 0.41 1.87 8.45 8 7 251919 10.45958 25.28916 26.21433 8.4439 202.96516 0.01024 8.49248
56 6 8.82 3.86 1.27 2.14 7.55 1 0 251061 9.2185 0 0.00067 8.57068 194.23425 0.01411 12.63253
54 8.76 8.76 2.32 2.32 6.44 6.44 0 1 250358 11.61158 29.01136 29.66763 8.3859 222.44997 0.01208 8.80488
50 8.66 8.66 3.49 3.1 5.17 5.56 1 4 248487 8.89704 11.60791 12.8282 8.42726 193.02787 0.01816 8.67412
50 8.53 8.53 4.69 2.33 3.84 6.2 4 0 245685 8.61899 14.36469 15.62234 8.4514 211.24479 0.01665 8.52017
43 8.41 8.41 1.57 1.57 6.84 6.84 1 3 242484 8.62757 15.3648 16.63496 8.45166 214.05297 0.01381 8.1801
43 8.35 8.35 0.82 0.82 7.53 7.53 1 2 238841 11.90027 28.63006 29.31527 8.41488 201.5066 0.01293 8.66889
45 8.35 8.35 7.43 0.07 0.92 8.28 1 0 234979 3.78751 27.7475 28.57513 8.22158 184.1279 0.01523 7.97764
43 8.39 8.51 7.61 -0.68 0.78 9.19 24 22 230876 3.19125 18.18172 19.46324 8.52446 183.20828 0.01572 7.59894
48 8.47 8.86 7.46 -1.38 1.01 10.24 2 1 227507 10.43971 28.03477 28.805 8.23101 182.79736 0.02403 8.33426
44 8.16 9.05 7.07 -1.94 1.09 10.99 41 44 224676 10.83745 20.98474 22.1758 8.51952 192.66857 0.01916 7.77361
44 8.57 9.15 6.45 -2.27 2.12 11.42 33 29 223003 9.914793304 28.46640165 29.22 7.647068374 237.8122483 0 8.197812957
45 8.06 9.22 5.61 -2.23 2.45 11.45 206 200 222662 13.18368 26.74054 27.62654 7.81712 207.6959 0 8.02364
48 8.04 9.29 -1.77 -1.77 9.81 11.06 0 0 223567 14.03533523 29.61965325 30.26909815 7.752070715 231.676528 0 8.35496165
42 9.36 9.36 -0.86 -0.86 10.22 10.22 0 2 224400 10.51075 18.49719 19.76382 7.83289 211.42843 0 7.68878
37 9.4 9.4 0.43 0.43 8.97 8.97 10 1 226961 11.37019273 29.54230388 30.21247608 7.719908558 221.3596515 0 8.22289875
39 9.37 9.37 1.96 1.96 7.41 7.41 1 0 229956 13.23287133 30.24080015 30.86427735 7.741216845 177.353012 0 8.1686293
36 9.23 9.23 3.56 3.56 5.67 5.67 0 NA 233278 12.3309302 30.28627805 30.9274476 7.750697295 182.9649565 0 8.00063558
39 8.96 8.96 5.06 0.71 3.9 8.25 4 NA 236946 13.57051033 30.09515058 30.7394555 7.762877117 206.6943842 0 8.116915542
41 8.42 8.59 6.27 0.23 2.15 8.36 2 NA 240172 12.66859805 30.17834845 30.83293 7.76935168 195.5636295 0 7.95979545
44 8.11 8.15 6.98 -0.04 1.13 8.19 7 NA 243100 14.14147668 29.48459026 30.24032311 7.789518416 212.3632932 0 7.575512663
50 7.19 8.54 7.04 -0.17 0.15 8.71 0 NA 245840 13.40754617 30.08541714 30.74851395 7.784783019 241.6442505 0 7.948584795
47 7.16 8.87 6.72 -0.22 0.44 9.09 5 NA 247309 12.9780962 29.09334252 29.89571404 7.774423552 224.3272704 0 7.423611141
43 8.22 8.96 -0.24 -0.24 8.46 9.2 0 NA 249126 14.76720062 29.44142067 30.17131462 7.77643179 226.3788514 0 7.7786663
54 7.27 8.89 5.91 -0.21 1.36 9.1 0 0 250985 13.40848804 27.46186516 28.17872764 7.85472926 237.3632032 0 9.16265994
49 7.29 8.24 5.42 -0.1 1.87 8.34 2 5 251903 13.86438095 29.430312 29.9843686 7.88365466 230.440612 0.04441442 9.3106547
45 7.21 8.59 4.86 0.12 2.35 8.47 0 0 252347 13.53735735 29.71712597 30.34787035 7.9005912 184.4166881 0.2528721 8.44063636
46 8.5 8.5 0.5 0.5 8 8 0 0 252430 14.0121686 29.13243175 29.81842228 7.84276758 191.7705436 0.31456164 8.3463249
32 8.47 8.47 1.07 1.07 7.4 7.4 0 0 252231 13.5670877 22.2228825 23.41112255 7.92438487 201.9870455 0 7.31929309
32 8.47 8.47 1.83 1.83 6.64 6.64 0 0 251575 10.68358285 19.56849675 20.9083633 7.889529175 209.555847 0 6.56712627
45 8.5 8.44 2.74 2.74 5.76 5.7 0 0 250286 12.98647835 28.8818215 29.6524771 7.816673305 207.861921 0.226699204 7.79352846
37 8.35 8.35 3.75 3.75 4.6 4.6 0 0 248488 12.90858 27.90932 28.69052 7.80153 NA 0.04193 8.02003
39 5.5 8.2 1.05 1.05 4.45 7.15 0 0 244659 10.94843405 18.15567 19.5409136 7.848154095 NA 0 6.277893795
40 7.53 8.05 5.73 5.73 1.8 2.32 0 2 243372 12.28229177 28.91595523 29.70183405 7.838671073 NA 0 7.651444
38 7.73 7.94 6.55 0.63 1.18 7.31 1 0 240053 12.344171 28.60569455 29.43065835 7.849676035 NA 0 7.509972605
32 7.06 7.88 7.16 0.26 -0.1 7.62 1 0 236092 12.94163413 28.2843889 29.14290755 7.86705276 NA 0 7.413958235
32 7.79 8.07 7.3 -0.14 0.49 8.21 0 0 232330 12.5264663 29.21113242 29.977719 7.764187148 197.8251364 0 7.639352173
38 7.7 8.37 7.03 -0.58 0.67 8.95 1 1 228463 13.83297978 27.9482048 28.90503875 7.870091 215.786942 0 6.812447275
44 7.7 8.54 6.47 -1 1.23 9.54 1 9 225423 13.49017359 27.2606007 28.12503348 7.874744726 222.465057 0 7.923005256
43 7.92 8.65 5.63 -1.25 2.29 9.9 0 0 223204 14.14481191 30.02188509 30.67771261 7.896941748 219.7107961 0.61988037 8.044682978
49 8.04 8.74 4.55 -1.19 3.49 9.93 2 0 221955 13.90378469 29.83176607 30.52079006 7.885540287 212.3545043 0.669329098 7.894712746
47 8.05 8.86 3.05 -0.72 5 9.58 0 0 221871 13.98559121 29.36874259 30.11253997 7.905112331 209.8675548 0.213712405 7.732659441
48 7.75 8.98 2.08 0.14 5.67 8.84 0 0 222825 15.35316395 29.3547758 30.09896475 7.90653638 221.8313675 0.323626937 7.735324605
44 8.26 9.06 1.31 1.31 6.95 7.75 0 2 226457 14.95471295 29.2809184 30.03548875 7.89246666 217.02633 0.206590665 7.70293824
45 7.14 9.05 2.66 2.66 4.48 6.39 1 0 228061 11.84451223 23.63810509 24.76104541 7.94254865 220.7254493 0.017992285 7.376593039
32 8.91 8.91 4.02 0.14 4.89 8.77 0 0 231614 13.64040384 27.82853995 28.68122095 7.932940005 223.7344605 0.167348099 7.707961284
43 8.61 8.61 5.24 -0.34 3.37 8.95 0 0 235422 12.55660845 25.82085525 26.7608113 7.889530905 230.0286995 0.470966205 7.97677184
50 8.17 8.17 6.18 -0.44 1.99 8.61 0 0 239492 14.97194868 27.99800682 28.77271582 7.860697727 208.02975 0.549878243 8.279841068
53 7.64 7.94 6.7 -0.25 0.94 8.19 0 0 242947 15.52151831 28.16283539 28.73756365 7.939198881 204.3151839 0.758077438 10.07598277
60 4.96 8.27 6.58 0.08 -1.62 8.19 1 0 246390 14.11280685 26.39878944 26.97832837 8.042002805 201.5243268 0.490269258 11.54573244
46 6.25 8.48 6.09 0.39 0.16 8.09 0 0 248382 15.33927333 29.16670561 29.74493417 8.155957304 210.9895465 1.007460021 9.278767261
50 6.46 8.53 5.57 0.59 0.89 7.94 0 0 250476 16.19012491 29.64122935 30.14417611 8.201094419 209.4675062 1.96596507 9.6292575
54 6.52 8.46 5.03 0.74 1.49 7.72 0 0 251639 15.06756383 25.67413781 26.40446648 8.310659762 198.3005971 1.086892495 10.32793912
56 6.64 8.32 4.44 0.92 2.2 7.4 0 0 252295 16.70086873 29.61134331 30.08386304 8.315487904 209.7721304 3.178184408 9.943545519
49 6.81 8.17 3.78 1.21 3.03 6.96 0 0 252392 15.71208124 28.80927861 29.41773574 8.048957274 238.6120616 1.835599023 9.270921726
52 6.95 8.08 3.04 1.63 3.91 6.45 0 0 252019 16.7732825 29.28009242 29.75243012 8.252073538 215.7230762 2.126205792 10.21536035
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA




Visualizations of Summary Stats

df1 <- sample[8:14]
df2 <- sample[17:18]
df3 <- sample[27:28]
df4 <- sample[32]
df5 <- sample[35:36]
df6 <- sample[38:40]
                
organizeddf <- cbind(df1, df2, df3, df4, df5, df6)


gt_plt_summary(organizeddf, title = "")
236 rows x 17 cols
Column Plot Overview Missing Mean Median SD
ambientweather.F 968 51.3% 43.0 44.0 8.8
tide_ft 5.09.6 51.3% 8.3 8.5 0.9
highest.high 7.99.7 51.3% 8.9 8.9 0.5
lowest.just.prior -28 51.3% 4.2 5.0 2.9
lowest.low -2.95.7 51.3% 0.1 0.0 1.7
tide_range_calc_1 -212 51.3% 4.1 3.0 3.4
tide_range_calc_3 212 51.3% 8.8 8.8 1.9
cell_count 0206 51.3% 3.8 0.0 19.8
Cell_count_b 0200 64.0% 4.8 0.0 22.4
lunar_distance_mi 222K252K 51.3% 239,650.2 241,133.0 9,839.9
nitrate_mg 143 51.3% 11.9 11.9 5.3
salinity_pu 032 51.7% 25.9 28.7 6.4
total_diss_solids_ppt 032 51.7% 26.7 29.4 6.3
ph 7.69.4 51.7% 8.2 8.3 0.3
orp_mv 62275 53.8% 205.1 204.9 24.7
chl_a_flu_rfu 0.03.2 51.7% 0.1 0.0 0.5
water_temp_c 3.112.6 51.7% 8.2 8.1 1.2


Other Important Quickstats

organizeddf %>%
  describeBy() %>%
  kbl(digits = 2) %>%
  kable_styling(
    font_size = 10)
vars n mean sd median trimmed mad min max range skew kurtosis se
ambientweather.F 1 115 43.03 8.80 44.00 43.69 7.41 9.00 68.00 59.00 -1.05 2.83 0.82
tide_ft 2 115 8.29 0.92 8.50 8.39 0.68 4.96 9.59 4.63 -1.04 1.04 0.09
highest.high 3 115 8.88 0.46 8.89 8.89 0.55 7.88 9.74 1.86 -0.10 -0.95 0.04
lowest.just.prior 4 115 4.18 2.93 5.03 4.45 3.02 -2.50 7.70 10.20 -0.62 -0.88 0.27
lowest.low 5 115 0.10 1.69 0.01 0.02 1.65 -2.87 5.73 8.60 0.52 0.09 0.16
tide_range_calc_1 6 115 4.11 3.39 3.00 3.79 2.95 -1.62 12.03 13.65 0.69 -0.75 0.32
tide_range_calc_3 7 115 8.78 1.95 8.77 8.82 2.02 2.32 12.44 10.12 -0.25 -0.04 0.18
cell_count 8 115 3.76 19.81 0.00 0.84 0.00 0.00 206.00 206.00 9.34 91.56 1.85
Cell_count_b 9 85 4.84 22.43 0.00 0.94 0.00 0.00 200.00 200.00 7.83 64.52 2.43
lunar_distance_mi 10 115 239650.24 9839.88 241133.00 240087.19 13570.24 221871.00 252430.00 30559.00 -0.25 -1.38 917.57
nitrate_mg 11 115 11.92 5.30 11.93 11.84 2.54 0.77 42.84 42.07 1.84 10.25 0.49
salinity_pu 12 114 25.88 6.39 28.72 27.14 2.02 0.00 31.73 31.73 -1.96 3.69 0.60
total_diss_solids_ppt 13 114 26.69 6.27 29.45 27.97 1.93 0.00 32.10 32.10 -2.11 4.55 0.59
ph 14 114 8.19 0.30 8.31 8.19 0.23 7.65 9.38 1.73 0.17 0.44 0.03
orp_mv 15 109 205.06 24.70 204.92 205.16 18.78 61.94 275.24 213.30 -1.37 9.33 2.37
chl_a_flu_rfu 16 114 0.15 0.46 0.00 0.03 0.01 0.00 3.18 3.18 4.28 20.10 0.04
water_temp_c 17 114 8.17 1.15 8.14 8.17 0.84 3.07 12.63 9.57 -0.09 4.13 0.11

Exploration

Season 1

season1 <- read.csv("Halo.YEAR1.csv")

a1 <- ggplot(season1, aes(lunar_illumination_percent, cell_count_A))+
  geom_point(color="plum")+
  labs(y="Cell Count", x="Lunar Illumination (%)")+
  theme_classic()

b1 <- ggplot(season1, aes(lunar_distance_mi, cell_count_A))+
  geom_point(color="#00bfc4")+
  labs(y="Cell Count", x="Lunar Distance (mi)")+
  theme_classic()

c1<-ggplot(season1, aes(windspeed_MAX_mph, cell_count_A))+
  geom_point(color="#ff61cc")+
  labs(y="Cell Count", x="Windspeed MAX (mph)")+
  theme_classic()

d1<-ggplot(season1, aes(tiderange_3_m, cell_count_A))+
  geom_point(color="#9590ff")+
  labs(y="Cell Count", x="Tidal Range 3 (m)")+
  theme_classic()

e1<-ggplot(season1, aes(tide_range_calc_1, cell_count_A))+
  geom_point(color="#39b600")+
  labs(y="Cell Count", x="Tidal Range 1 (ft)")+
  theme_classic()

f1<-ggplot(season1, aes(precip_mm, cell_count_A))+
  geom_point(color="#d39200")+
  labs(y="Cell Count", x="Precipitation (mm)")+
  theme_classic()

g1<-ggplot(season1, aes(ambient_low, cell_count_A))+
  geom_point(color="#f8766d")+
  labs(y="Cell Count", x="Ambient Low (F)")+
  theme_classic()

h1<-ggplot(season1, aes(as.numeric(ambient_high), cell_count_A))+
  geom_point(color="#00b0f6")+
  labs(y="Cell Count", x="Ambient High (F)")+
  xlim(30, 60)+
  theme_classic()

i1<-ggplot(season1, aes(airtemp_timeofcollection, cell_count_A))+
  geom_point(color="#b79f00")+
  labs(y="Cell Count", x="Ambient @ Coll. (F)")+
  theme_classic()

j1<-ggplot(season1, aes(windspeed_MIN_mph, cell_count_A))+
  geom_point(color="#e76bf3")+
  labs(y="Cell Count", x="Windspeed MIN (mph)")+
  theme_classic()

ggarrange(a1, b1, c1, d1, e1, f1, g1, h1, i1, j1)

Season 2

XYZ

n <- ggplot(sample, aes(sample, nitrate_mg, color=factor(cell_count),size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="N (mg/L)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

o <- ggplot(sample, aes(sample, lunar_distance_mi, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Moon (mi)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

p <- ggplot(sample, aes(sample, lunar_illumination_percent, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Moon Ill.(%)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

q <- ggplot(sample, aes(sample, tide_range_calc_3, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Tide 3 (ft)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

r <- ggplot(sample, aes(sample, tide_ft, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Tide Ht. (ft)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

s <- ggplot(sample, aes(sample, tide_range_calc_1, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Tide 1 (ft)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

u<- ggplot(sample, aes(sample, salinity_pu, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Salt (PSU)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

v <- ggplot(sample, aes(sample, chl_a_flu_rfu, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Chl a (RFU)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic() 

w <- ggplot(sample, aes(sample, water_temp_c, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Temp (C)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()


x <- ggplot(sample, aes(sample, ph, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="pH", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

y <- ggplot(sample, aes(sample, orp_mv, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="ORP", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()


aaa <- ggplot(sample, aes(sample, total_diss_solids_ppt, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="TDS", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()


bbb <- ggplot(sample, aes(sample, density, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Density", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()




fff <- ggplot(sample, aes(sample, next_full_days, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Moon Cycle", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

ggg <- ggplot(sample, aes(sample, cell_count, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Cells", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

hhh <- ggplot(sample, aes(sample, winds, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Winds (mph)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

iii <- ggplot(sample, aes(sample, ambientweather.F, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Air Temp (C)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic() 



jjj<- ggplot(sample, aes(sample, lowest.just.prior, color=factor(cell_count), size=cell_count))+
  geom_point(show.legend = F)+
  labs(y="Low Tide (ft)", x="")+
  theme(axis.text = element_text(size = 8))+
  theme_classic()

ggarrange(n, o, p, q, ncol = 2, nrow = 2)

ggarrange(r, s, u, v, ncol = 2, nrow = 2)

ggarrange(w, x, y, aaa, ncol = 2, nrow = 2)

ggarrange(bbb, fff, hhh, iii, ncol = 2, nrow = 2)

ggarrange(jjj, ggg, ncol = 2, nrow = 2)

Plotlys

p1 <- ggplot(sample) + 
  geom_line(aes(sample, nitrate_mg, linetype="Dekati Sum", color="Nitrates (mg/L)")) +
  geom_line(aes(sample, salinity_pu, linetype="PM10", color="Salinity (PSU)")) +
  geom_line(aes(sample, ph, color="pH")) +
  geom_line(aes(sample, water_temp_c, color="Temp (°C)")) +
  labs(title = "Aquatroll Measurements at TD", y="", x="") +
  guides(linetype = "none", color=guide_legend(title="")) +
  theme_gray(base_size = 10) +
  geom_vline(xintercept = 72, color="gray") +
  xlim(32, max(sample$sample))

ggplotly(p1)
sample$date <- as.Date(sample$date, format = "%m/%d/%Y")

# Create a new column for Julian year days
sample$year_day <- as.numeric(format(sample$date, "%j"))

# Create a new column for Dec. first then Jan-Ap ordered Julian year days
sample$ordered_day <- ifelse(sample$year_day >= 335, sample$year_day - 334, sample$year_day + 31)

p2 <- ggplot(sample, aes(ordered_day, cell_count, color=Season)) +
  geom_jitter(data=filter(sample, Season == "One"), 
              width = 0.2, size = 2, height = 0, alpha = 1) +  # No alpha
  geom_jitter(data=filter(sample, Season == "Two"), 
              width = 0.2, size = 2, height = 0, alpha = 0.5) +  # alpha 
  labs(title="Cell count data (seasons 1 & 2)", y="Cell counts") +
  guides(linetype = "none", color=guide_legend(title="")) +
  theme_gray(base_size = 10) +
  scale_color_manual(values=c("#00bfc4", "#c77cff")) +
  theme(axis.text.x = element_blank(),
        axis.ticks.x = element_blank()) +
  scale_x_continuous(name = "Julian Days")

#ggplotly(p2)

pz <- ggplot(sample, aes(ordered_day, log(cell_count+1), color=Season)) +
  geom_jitter(data=filter(sample, Season == "One"), 
              width = 0.2, size = 2, height = 0, alpha = 1) +  # No alpha
  geom_jitter(data=filter(sample, Season == "Two"), 
              width = 0.2, size = 2, height = 0, alpha = 0.5) +  # alpha 
  labs(title="Log of cell count data (seasons 1 & 2)", y="Log cell counts") +
  guides(linetype = "none", color=guide_legend(title="")) +
  theme_gray(base_size = 10) +
  scale_color_manual(values=c("#00bfc4", "#c77cff")) +
  theme(axis.text.x = element_blank(),
        axis.ticks.x = element_blank()) +
  scale_x_continuous(name = "Julian Days")

#ggplotly(pz)

p3 <- ggplot(sample) +
  geom_point(aes(sample, nitrate_mg, shape="Nitrates (mg/L)"), color="#f8766d") +
  geom_point(aes(sample, salinity_pu, shape="Salinity (PPU)"), color="#00b0f6") +
  geom_point(aes(sample, ph, shape="pH"), color="#7cae00") +
  geom_point(aes(sample, water_temp_c, shape="Water Temp (C)"), color="#c77cff") +
  labs(title = "Cell count vs. water measurements", y="") +
  guides(linetype = "none", size = "none", color=guide_legend(title="")) +
  scale_shape_manual(values = c("Nitrates (mg/L)" = 0, "Salinity (PPU)" = 1, "pH" = 9, "Water Temp (C)" = 2)) +
  theme_gray(base_size = 10) +
  geom_vline(xintercept = 72, color="gray") +
  xlim(32, max(sample$sample))

ggplotly(p3)
ggplot(sample, aes(sample)) +
  geom_point(aes(y = nitrate_mg, color = "Nitrates (mg/L)")) +
  geom_point(aes(y = salinity_pu, color = "Salinity (PPU)")) +
  geom_point(aes(y = ph, color = "pH")) +
  geom_point(aes(y = water_temp_c, color = "Water Temp (C)")) +
  facet_wrap(~cell_count) +
  labs(title = "Cell count vs. water measurements", y = "") +
  theme_grey(base_size = 10)+
  guides(color = guide_legend(title = NULL))  # Set legend title to NULL to remove it

samples <- read.csv("Halo_sofar.csv")


aa <- ggplot(samples, aes(sample, nitrate_mg, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Nitrates")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()
  


cc <- ggplot(samples, aes(sample, salinity_pu, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Salinity", y="Salinity (PSU)")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()
dd <- ggplot(samples, aes(sample, ph, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="pH")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()


ee <- ggplot(samples, aes(sample, chl_a_flu_rfu, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Chlorophyll a Fluorescence", y="Chlorophyll a (RFU)")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()

ff <- ggplot(samples, aes(sample, water_temp_c, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Water Temp (C)")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()


gg <- ggplot(samples, aes(sample, tide_range_calc_3, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Tidal Range 3")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()


hh <- ggplot(samples, aes(sample, winds, color=as.factor(cell_count)))+
  geom_point(show.legend = F)+
  labs(title="Wind speed (mph)")+
  geom_vline(xintercept=53, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept = 68, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=70, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=71, color = "gray80", alpha = 0.8)+
  geom_vline(xintercept=72, color = "gray80", alpha = 0.8)+
  theme_classic()

ggplotly(aa)
ggplotly(cc)
ggplotly(dd)
ggplotly(ee)
ggplotly(ff)
ggplotly(gg)
ggplotly(hh)

Histograms

halo <- read.csv("halo_022824.csv")

a <- ggplot(halo, aes(nitrate_mg))+
  geom_histogram(binwidth = 5, color = "#00bf7d", fill="white", alpha = 0.7) +
  labs(title = "Nitrates", x = "nitrates (mg/L)", y = "Frequency")+
  theme_classic()

b <- ggplot(halo, aes(salinity_PSU))+
  geom_histogram(binwidth = 5, color = "#619cff", fill="white", alpha = 0.7) +
  labs(title = "Salinity", x = "salinity_PSU", y = "Frequency")+
  theme_classic()

c <- ggplot(halo, aes(water_temp_c))+
  geom_histogram(binwidth = 1, color = "red", fill="white", alpha = 0.7) +
  labs(title = "Water Temperature", x = "water_temp_c", y = "Frequency")+
  theme_classic()

d <- ggplot(halo, aes(tiderange_3))+
  geom_histogram(binwidth = 0.5, color = "#996543", fill="white", alpha = 0.7) +
  labs(title = "Tidal Range", x = "tiderange_3 (m)", y = "Frequency")+
  theme_classic()

e <- ggplot(halo, aes(cell_count_A)) +
  geom_histogram(binwidth = 12, color = "steelblue", fill="white", alpha = 0.7) +
  labs(title = "Cell Count A", x = "cell_count_A", y = "Frequency")+
  theme_classic()

f <- ggplot(halo, aes(chl_a_flu_rfu))+
  geom_histogram(binwidth = 0.05, color = "plum", fill="white", alpha = 0.7) +
  labs(title = "Chlorophyll A", x = "chl_A (rfu)", y = "Frequency")+
  theme_classic()

g <- ggplot(halo, aes(ph))+
  geom_histogram(binwidth = 5, color = "tomato", fill="white", alpha = 0.7) +
  labs(title = "pH", x = "pH", y = "Frequency")+
  theme_classic()


h <- g <- ggplot(halo, aes(wind))+
  geom_histogram(binwidth = 2, color = "gray", fill="white", alpha = 0.7) +
  labs(title = "Wind Speed", x = "windspeed (mph)", y = "Frequency")+
  theme_classic()

i <- ggplot(halo, aes(precip_mm))+
  geom_histogram(binwidth = 2, color = "darkblue", fill="white", alpha = 0.7) +
  labs(title = "Precipitation", x = "precip (mm)", y = "Frequency")+
  theme_classic()


ggarrange(a, b, c, d, e, f, g, h, i)

GGpairs

#pull out just the aquatroll data

nitrates <- halo[34]
salinity <- halo[38]
pH <- halo[42]
chl_a <- halo[45]
temp <- halo[46]
ambient <- halo[11]
tidal_range_calc_1 <- halo[18]
baro_pressure <- halo[47]

cell_count <- halo[8]
precipitation <- halo[13]
tide_range_m <- halo[20]
windspeed <- halo[21]
winddirection <- halo[22]
lunar_illumination <- halo[31]

#put it all together
aqua1 <- cbind(cell_count, nitrates, salinity, pH, chl_a, temp, ambient, tidal_range_calc_1, baro_pressure)

others <- cbind(cell_count, precipitation, tide_range_m, windspeed, winddirection, lunar_illumination)


ggpairs(aqua1)

ggpairs(others)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Analysis

M1: Wind Direction

I took just the wind direction and cell count columns, ran them through poisson, and found no statistical significance between the two data types.

quicksummary <- halo %>%
  summarise(across(everything(), list(min = ~min(., na.rm = TRUE), max = ~max(., na.rm = TRUE))))

#place into table
summary_table <- halo %>%
  summarise(across(everything(), list(min = ~min(., na.rm = TRUE), max = ~max(., na.rm = TRUE)))) %>%
  kable("html") %>%
  kable_styling(full_width = FALSE)


a <- halo[22]
b<- log(halo[8]+1)

just_wind <- data.frame(a,b)

#does wind direction have anything to do with this?

ggplot(just_wind, aes(wind_direction, cell_count_A, color=wind_direction))+
  geom_boxplot()

M1 <- glm(cell_count_A ~ wind+wind_direction, data = halo, family = "poisson")

anova_winddirection_model <- anova(M1, test = "Chi")


anova_winddirection_model
## Analysis of Deviance Table
## 
## Model: poisson, link: log
## 
## Response: cell_count_A
## 
## Terms added sequentially (first to last)
## 
## 
##                Df Deviance Resid. Df Resid. Dev  Pr(>Chi)    
## NULL                              88     1884.6              
## wind            1   154.89        87     1729.7 < 2.2e-16 ***
## wind_direction  8   515.25        79     1214.5 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Assuming 'model_poisson' is your Poisson regression model
residual_deviance <- residuals(M1, type = "deviance")
df_residual_deviance <- df.residual(M1)

# Calculate ratio of residual deviance to degrees of freedom
(M1$null.deviance - M1$deviance)/M1$null.deviance * 100
## [1] 35.55907
# Because the overdispersion ratio is greater than 1, consider negative binomial

GGpairs

#new data frame with specific parameters to determine correlations

Cells <- sample[17]
TidalRange <- sample[14]
TideatSample <- sample[9]
WindSpeed <- sample[15]
WindDirection <- sample[16]
LunarDistance <- sample[27]
LunarIllumination <- sample[25]
Nitrates <- sample[28]
Salinity <- sample[32]
pH <- sample[36]
ORP <- sample[38]
ChlA <- sample[39]
WaterTemp <- sample[40]
Week <- sample[50]

#new data frame
forggpairs1 <- cbind(Cells, WindSpeed, WaterTemp, Week)

forggpairs2 <- cbind(Cells, LunarDistance, LunarIllumination, Week)

forggpairs3 <- cbind(Cells, Nitrates, Salinity, Week)

forggpairs4 <- cbind(Cells, pH, ORP, ChlA, Week)

forggpairs5 <- cbind(Cells, TidalRange, TideatSample, Week)

# sample 43 to sample 91 contain the weeks with the most cell count changes

forggpairs1 <- forggpairs1[43:91,]

forggpairs2 <- forggpairs2[43:91,]

forggpairs3 <- forggpairs3[43:91,]

forggpairs4 <- forggpairs4[43:91,]

forggpairs5 <- forggpairs5[43:91,]

ggpairs(forggpairs1, 
        aes(color=Week, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs2, 
        aes(color=Week, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs3, 
        aes(color=Week, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs4, 
        aes(color=Week, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs5, 
        aes(color=Week, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

GGpairs: ZOOM TO BLOOM

ZoomtoBloom <- read.csv("ZoomtoBloom.csv")

Cells <- ZoomtoBloom[8]
TidalRange <- ZoomtoBloom[19]
TideatSample <- ZoomtoBloom[14]
WindSpeed <- ZoomtoBloom[21]
WindDirection <- ZoomtoBloom[22]
LunarDistance <- ZoomtoBloom[31]
LunarIllumination <- ZoomtoBloom[29]
Nitrates <- ZoomtoBloom[32]
Salinity <- ZoomtoBloom[36]
pH <- ZoomtoBloom[40]
ORP <- ZoomtoBloom[42]
ChlA <- ZoomtoBloom[43]
WaterTemp <- ZoomtoBloom[44]
Week <- ZoomtoBloom[53]


#new data frame
forggpairs1 <- cbind(Cells, WindSpeed, WaterTemp, Week)

forggpairs2 <- cbind(Cells, LunarDistance, LunarIllumination, Week)

forggpairs3 <- cbind(Cells, Nitrates, Salinity, Week)

forggpairs4 <- cbind(Cells, pH, ORP, ChlA, Week)

forggpairs5 <- cbind(Cells, TidalRange, TideatSample, Week)

ggpairs(forggpairs1, 
        aes(color=NewWeek, alpha = 0.5),
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs2, 
        aes(color=NewWeek, alpha = 0.5),
        cor="spearman",
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs3, 
        aes(color=NewWeek, alpha = 0.5),
        cor="spearman",
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs4, 
        aes(color=NewWeek, alpha = 0.5),
        cor="spearman",
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)

ggpairs(forggpairs5, 
        aes(color=NewWeek, alpha = 0.5),
        cor="spearman",
        upper = list(continuous = wrap("cor", size = 2.5)),
        lower = list(combo = wrap(ggally_facethist, binwidth = 0.5)), 
        progress = F)