# FILE NAMES ------------------------------------------------------------------- # # Path and file name of your standardized VMS data file.name <- "data-tidy/VMS_standardized.csv" # # Path and file name of vessel track data to be exported (can then be imported # into QGIS) shapefile.name = "data-products/Vessel_tracks" # FILTER VALUES ---------------------------------------------------------------- # The standardized VMS file will be filtered according to these specifications # # Range of dates to analyze (have to be of the format YYYY-MM-DD HH:MM:SS) date.lim = c("1901-01-01 00:00:00", "2100-12-31 23:59:59") # CATEGORIZATION --------------------------------------------------------------- # Range of speeds considered as fishing fishing.lim <- c(2, 4.5)
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(mapdata) library(tidyverse) library(ghsllr)
vms <- readr::read_csv(file.name) tracks <- vms %>% mutate(speed = ifelse(speed > 15, 15, speed)) %>% vms_categorise_fishing(fishing.lim) vms_plot_tracks(tracks)
tracks %>% # NOTE: Here saving derived speed vms_calculate_speed() %>% vms_export_tracks(shapefile.name)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.