Plotting Environmental Data - nposdalj/SeaTech GitHub Wiki

To plot environmental data and animal presence, you'll need to work in R first to plot maps of environmental variables and save the time series, then you can move to MATLAB to plot the environmental data against animal presence.

In R

Plotting SST and Chl a

The script titled 'SatelliteData_ncSST.R' plots monthly averages of SST in our study site as a map and a time series. The script titled 'SatelliteData_ncChl.R' plots monthly averages of Chl a in our study site as a map and a time series. The user will need to define the following:

setwd('C:/Users/nposd/Documents/GitHub/SeaTech') - the working directory

saveDir = paste('C:/Users/nposd/Documents/GitHub/SeaTech/Environmental_TimeSeries') - the directory to save the timeseries

Year = 2019 - year of interest

Month = 1 - month of interest for plotting

The script plots one month at a time, to decide which month to plot, adjust the 'Month' variable on line 16 (noted above). The plots do not automatically save.

The script plots the entire time series as well (this also does not automatically save), and then it will save the time series in the directory you specified on line 14.

In MATLAB

The script titled 'Environmental_Animal_TimeSeries.m' plots the environmental time series with presence. This code is not finished. Since everyone will have a different input type for their data, I have created a skeleton that needs some user modification by the mentors depending on the type of presence data you're working with.