Visualization of Red Tide in the Gulf of Mexico

[This article was first published on R – NYC Data Science Academy Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

The Red Tide Visualization App offers a quick, interactive snapshot of harmful algae bloomsor ‘Red Tide,’ observed in the Gulf of Mexico from 2000 to 2018.  This app allows the user to examine 6,000 algal blooms recorded by the National Oceanic and Atmosphereic Association’s harmful algae bloom observation system and their corresponding water temperatures, water salinities, and cell counts by year.


Red Tide Visualization App


Kerenia brevis is a species of microscopic algae that lives almost exclusively along the coasts of the Gulf of Mexico. In recent years, however, larger then normal blooms of the algae have been observed along the gulf coasts of Florida, Texas, and has been detected along the atlantic coast as far north as North Carolina. While algal blooms may seem trivial, blooms of Kerenia brevis, commonly referred to as ‘Red Tide,’ have detrimental effects on local marine life and human life. Red Tide not only depletes the ocean of oxygen, suffocating nearby fish and plant life, it also releases a type of neurotoxin called a brevetoxin. These toxins interfere with nerve transmission and also cause immune depression, bronchial constriction, and haemolysis (1). Brevetoxins represent one of the most common environmental stressors impacting the areas in which they are released. The consequenses of brevetoxins include massive fish and marine mammal kills, increased sea turtle and sea bird mortality, as well as decreased plant and coral life in areas where toxins are present. It is not recommended to swim in areas that are being threatened by Red Tide because of the dangers associated with brevetoxins, however, even out of the water humans are vulnerable to their harmful effects. Brevetoxins can contaminate seafood and can also be broken up by the natural movement of the ocean and aerosolized, which can cause respiratory irrtation for those living near a bloom. Finding a way to control harmful blooms of Kerenia brevis is important for maintaining a healthy ocean and coastal environment in areas that are most effected. The purpose of this shiny app is to offer a simple visualization of common locations of Red Tide blooms from 2000 to 2018 and some associated characteristics. In the future, more in depth analyses will be conducted to explore the statistical relationships between large Kerenia brevis blooms and environmental conditions like water temperature and salinity. 

Data Collection 

Data were collected from the National Oceanic and Atmosphereic Administration’s (NOAA)  harmful algal blooms observing system which is a distribution system for harmful algal bloom (HAB) information. The dataset includes algal cell counts, water temperature, water salinity, loction, and date time associated with HABs observed in the Gulf of Mexico beginning in August 1953 (N > 100,000). Below is a map generated by the NOAA of the data points associated with this set.

The data were imported into R and cleaned using dplyr and tidyverse. This app focuses of visualizing high cell count blooms (cells/L) of Kerenia brevis and their associated

  • Water Temperature (Degrees F)
  • Salinity (ppt)
  • Location ( latitude and longitude)
  • Year of measurement

Due to a high number of missing values in earlier years, only observations made after the year 2000 were included in this application. The data set was reduced further because of missing water temperature values for many HAB observations. The resulting data set had 6,000 HABs with complete information on the above factors of interest. 

App Features

With the cleaned data, the shiny app was built using multiple data visualization packages offered in R.  To explore common Red Tide locations, latitude and longitude points from the data were used to plot exact locations of each bloom on an interactive leaflet map pictured below.  The map allows the user to see all of the algae blooms recorded in a given year and learn more about the environmental conditions associated with a given bloom by hovering over a specific point.

Interactive map

The ‘Explorer’ panel (pictured below) allows the user to select a year of interest or to animate across the years to quickly see changes in HAB characteristics by year. The panel also includes a plot, generated using ggplot2 in R, that easily summarizes the salinity levels associated with high cell counts. Interactive plotly plots will be added once the app is updated. 


Explorer panel

Future Additions

While the app does offer an easy visualization of the charactaristics of HABs oberved in the Gulf of Mexico from 2000 to 2018, it does not give any visualization of statistical relationships between large cell counts, water temperature, and salinity. In the future, more tabs and analyses will be added to the app to give a better representation of the factors that contribute to the increase in size and frequency of Red Tide blooms in the gulf. 



Interested in the code? Visit my Github by clicking HERE!




(1) Pierce RH, Henry MS. (2009). Harmful algal toxins of the Florida red tide (Karenia brevis): natural chemical stressors in South Florida coastal ecosystems

To leave a comment for the author, please follow the link and comment on their blog: R – NYC Data Science Academy Blog. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)