Contributors: Anaïs Aubert (Flanders Marine Insitute) & Nanou Goedefroo (Flanders Marine Institute)
Source data: LifeWatch Zooplankton data explorer (
Institute: LifeWatch (

This code makes use of the zooplankton data sampled by LifeWatch. Time series are calculated and visualized of the larval stages of important biofouling species in the Belgian Part of the North Sea (BPNS). Bivalve, cirriped and gastropod larvae can be visualized in time for the different stations in the BPNS.

1. Load the dataset

Load packages


Read in the datafile that can be downloaded from the LifeWatch data explorer:

ZooIn=read.table("Zooplankton.csv",sep=";", header=TRUE) 

Or the zooplankton can be read in via the LW R package (Link). A connection to the VLIZ server is needed to install the LW data package on your local computer.

#ZooIn<- getZooscanData(startdate = "2014-01-20", stopdate = Sys.Date())

2. Data preparation

The ‘Time’ variable now is a character. In order to change this to a date (POSIXct format), we use the dmy_hm function (similar to the time format in the LifeWatch data files)

ZooIn$Time <- dmy_hm(ZooIn$Time)

To visualize the stations seperately, these are subsetted

stations <- ZooIn %>%

Stations 120, 130 and 700 are closely located to the coast and are therefore considered as coastal stations.

coastal <- rbind(stations$"120", stations$"130", stations$"700")
coastal <- aggregate(coastal$Density,
names <- c("Station", "Taxon", "Time","Density")
colnames(coastal) <- names

The other stations: 710, 780, W07BIS, 435 are located more offshore.

offshore <- rbind(stations$"710", stations$"780", stations$"435", stations$W07BIS)
offshore <- aggregate(offshore$Density,

colnames(offshore) <- names

Further subsetting can be done for the different groups. Here we will subset the nauplius larvae and the cypris larvae of the cirripedes for the coastal and offshore subsets. Currently bivalve and gastropod larvae have no seperate group but are grouped as molusks (‘Mollusca’) in the dataset.

coastal <- data.table(coastal)
coastal.taxa <- coastal %>% 

offshore <- data.table(offshore)
offshore.taxa <- offshore %>% 

station.taxa <- ZooIn %>% 
  split(list(.$Station, .$Taxon))

3. Plot the zooplankton data: Time series

Some example plots are presented and can be adapted by entering different data - and subsets.

Plot the density of nauplius larvae for the different coastal stations in time

plot.coastal.nauplius <- ggplot(data = coastal.taxa$Cirripeda_naup, 
                                aes(x = Time, y = Density)) + 
  geom_line(aes(color = Station), 
            linetype = "dashed") + 
  geom_point(aes(color = Station)) +
  labs(title = 'Density of the nauplius larvae for the coastal stations') + 
  theme_classic() + 
  theme(plot.title = element_text(hjust = 0.5)) +
  scale_x_datetime(breaks = date_breaks("6 months")) +
  scale_color_manual(values = c("#fbb4ae","#b3cde3","#ccebc5"))