Coastal and offshore patterns of rorqual and porpoise densities in Canadian Pacific waters
Data files
Jul 06, 2026 version files 308.83 MB
-
DP-Data.Rdata
431.07 KB
-
DP-PredGrids.RData
2.97 MB
-
dp.df-model.RData
129.71 KB
-
FW-Data.Rdata
398.13 KB
-
FW-PredGrids.RData
2.89 MB
-
fw.df-model.RData
101.04 KB
-
HP-Data.Rdata
185.65 KB
-
HP-PredGrids.RData
607.23 KB
-
hp.df-model.RData
183.56 KB
-
HW-Data.Rdata
458.65 KB
-
HW-PredGrids.RData
2.97 MB
-
hw.df-model.RData
313.60 KB
-
PRISMM_DSM_code_21-Aug-2025.R
47.82 KB
-
PRISMM_Sightings_CorrectedPositions.txt
43.42 KB
-
README.md
20.05 KB
-
shapefiles.zip
297.09 MB
Abstract
Information on the density and distribution of wide-ranging cetaceans is difficult to obtain but essential for assessing population status, evaluating risk from anthropogenic threats, and informing spatial management. In Canadian Pacific waters, several cetacean populations are recovering from historical depletion, yet recent patterns of habitat use and range expansion remain poorly documented, particularly in offshore areas. In summer 2018, we conducted systematic ship-based surveys throughout the coastal and offshore waters of British Columbia. Density surface modelling was used to produce spatially-explicit density estimates for four commonly encountered species: humpback whale, fin whale, Dall's porpoise, and Pacific harbour porpoise. Our results provide the first coast-wide quantification of cetacean habitat use in Canadian Pacific waters and highlight areas of apparent reoccupation by recovering populations. Densities of fin whales and Dall's porpoises were highest in offshore waters west of the continental shelf break, whereas humpback whales and harbour porpoises primarily occurred in shelf and nearshore habitats. We discuss patterns of spatial separation and overlap among ecologically similar species in relation to habitat preferences and potential niche partitioning.
Dataset DOI: 10.5061/dryad.cvdncjtgr
Description of the data and file structure
Cetacean sightings and effort data were collected from ship platforms using established distance sampling techniques in the Canadian Pacific during the summer of 2018. Those data are contained in the file PRISMM_Sightings_CorrectedPositions.txt, and the associated R code PRISMM_DSM_code_21-Aug-2025.R can be used to fit models of whale abundance per survey segment, and perform predictions of density across spatial grids for each of three survey strata.
Detection functions were generated for four species (humpback whale, fin whale, Dall's porpoise and harbour porpoise) to describe the probability of detection by observers relative to the perpendicular distance of the animal(s) from the survey platform, and accounting for the impact of various detectability covariates. Those detection functions are available as R objects and are contained in RData files (one for each species). They are loaded in R and are used in conjunction with the whale sighting data and effort segment data contained as R objects in RData files (one for each species).
The code then generates and competes sets of density surface models (dsms) for each of the four species. The best-fit dsm for each species is used to predict densities of individuals across the three strata (North Coast, Salish Sea, and Offshore) making up our study area. The density predictions (whales per cell) are performed on prediction grids that are contained as R objects in RData files (one for each species).
Files and variables
Several files contain the same variables, and therefore a complete list of variable names and definition is given below in the Data dictionary section.
File: DP-Data.Rdata
Description: This RData file is loaded in R using the function load(). It includes right-truncated sightings data for Dall's porpoises separated by stratum (e.g., dp.tr.north - North Coast stratum Dall's porpoise sightings) and environmental covariates for running the dsms summarized by survey segment and separated by stratum (e.g., segs.north); the geographic coordinates of the ship and the animals for each sighting were rounded to the nearest 0.1 decimal degree, in accordance with Dryad guidelines. See Data dictionary for the definitions of the variables.
File: DP-PredGrids.RData
Description: This RData file is loaded in R using the function load(). It contains R objects representing Dall's porpoise prediction grids (5 x 5 km cells); objects are separated by stratum. Each object includes the area per grid cell (area.m2), its centroid coordinates (X.AEA, Y.AEA), the summarized values of the environmental covariates tested in the dsms (see Data dictionary), the predicted abundance (Nhat) of individuals per grid cell from the best-fit dsm, and the coefficient of variation (CV) for the grid cell.
File: dp.df-model.RData
Description: This RData file is loaded in R using the function load(). It contains an R object called fw.df of class dsmodel (dsm package), that describes the formula and parameters for the best-fit Dall's porpoise detection function. This object is meant to be called by the dsm function in the provided code.
File: FW-Data.Rdata
Description: This RData file is loaded in R using the function load(). It includes right-truncated sightings data for fin whales separated by stratum (e.g., fw.tr.north - North Coast stratum fin whale sightings) and environmental covariates for running the dsms summarized by survey segment and separated by stratum (e.g., segs.north); the geographic coordinates of the ship and the animals for each sighting were rounded to the nearest 0.1 decimal degree, in accordance with Dryad guidelines. See Data dictionary for the definitions of the variables.
File: FW-PredGrids.RData
Description: This RData file is loaded in R using the function load(). It contains R objects representing fin whale prediction grids (5 x 5 km cells); objects are separated by stratum. Each object includes the area per grid cell (area.m2), its centroid coordinates (X.AEA, Y.AEA), the summarized values of the environmental covariates tested in the dsms (see Data dictionary), the predicted abundance (Nhat) of individuals per grid cell from the best-fit dsm, and the coefficient of variation (CV) for the grid cell.
File: fw.df-model.RData
Description: This RData file is loaded in R using the function load(). It contains an R object called fw.df of class dsmodel (dsm package), that describes the formula and parameters for the best-fit fin whale detection function. This object is meant to be called by the dsm function in the provided code.
File: HP-Data.Rdata
Description: This RData file is loaded in R using the function load(). It includes right-truncated sightings data for harbour porpoises separated by stratum (e.g., hp.tr.north - North Coast stratum harbour porpoise sightings) and environmental covariates for running the dsms summarized by survey segment and separated by stratum (e.g., segs.north); the geographic coordinates of the ship and the animals for each sighting were rounded to the nearest 0.1 decimal degree, in accordance with Dryad guidelines. See Data dictionary for the definitions of the variables.
File: HP-PredGrids.RData
Description: This RData file is loaded in R using the function load(). It contains R objects representing harbour porpoise prediction grids (5 x 5 km cells); objects are separated by stratum. Each object includes the area per grid cell (area.m2), its centroid coordinates (X.AEA, Y.AEA), the summarized values of the environmental covariates tested in the dsms (see Data dictionary), the predicted abundance (Nhat) of individuals per grid cell from the best-fit dsm, and the coefficient of variation (CV) for the grid cell.
File: hp.df-model.RData
Description: This RData file is loaded in R using the function load(). It contains an R object called fw.df of class dsmodel (dsm package), that describes the formula and parameters for the best-fit harbour porpoise detection function. This object is meant to be called by the dsm function in the provided code.
File: HW-Data.Rdata
Description: This RData file is loaded in R using the function load(). It includes right-truncated sightings data for humpback whales separated by stratum (e.g., hw.tr.north - North Coast stratum humpback whale sightings) and environmental covariates for running the dsms summarized by survey segment and separated by stratum (e.g., segs.north); the geographic coordinates of the ship and the animals for each sighting were rounded to the nearest 0.1 decimal degree, in accordance with Dryad guidelines. See Data dictionary for the definitions of the variables.
File: HW-PredGrids.RData
Description: This RData file is loaded in R using the function load(). It contains R objects representing humpback whale prediction grids (5 x 5 km cells); objects are separated by stratum. Each object includes the area per grid cell (area.m2), its centroid coordinates (X.AEA, Y.AEA), the summarized values of the environmental covariates tested in the dsms (see Data dictionary), the predicted abundance (Nhat) of individuals per grid cell from the best-fit dsm, and the coefficient of variation (CV) for the grid cell.
File: hw.df-model.RData
Description: This RData file is loaded in R using the function load(). It contains an R object called fw.df of class dsmodel (dsm package), that describes the formula and parameters for the best-fit humpback whale detection function. This object is meant to be called by the dsm function in the provided code.
File: PRISMM_DSM_code_21-Aug-2025.R
Description: This is the R Code (annotated) required to run the best-fit density surface models for each species-stratum combination and to reproduce all the figures found in the Research Article. It can be run by pasting its contents in R directly, or ideally via an Integrated Development Environment such as RStudio. Annotations are provided throughout the script to guide the user through multiple steps. Several libraries are required that may have to be installed prior to running the code, using the R function install.packages(). The user should then define the working directory where the data files are located, using the setwd() or here() functions.
The first part of the code fits the dsm models, and requires the detection function objects, the sightings data and the prediction grid for each species. It should be run sequentially: first the species-specific data files are loaded, then the dsm function is used to fit the best dsm model for each stratum. The resulting dsm objects are then used to make abundance predictions across each grid, and to calculate total abundance, mean density, and model uncertainty.
The second part of the code can be used to reproduce the figures 1-7 in the Research Article, and requires the data contained in PRISMM_Sightings_CorrectedPositions.txt and in the shapefiles.zip archive.
File: PRISMM_Sightings_CorrectedPositions.txt
Description: This text file contains the sightings (not truncated) data for the four cetacean species (humpback whale, fin whale, Dall's porpoise and harbour porpoise) needed to reproduce the maps found in Figure 2 of the Research Article. The four fields are separated by spaces, and are described below. The geographic coordinates of the animals for each sighting were rounded to the nearest 0.1 decimal degree, in accordance with Dryad guidelines. In the provided R code, this file is loaded using the function read.table(). It can also be opened in any text editor or spreadsheet software.
Variables
- Species: cetacean species (common name)
- Latitude: corrected latitude of sighting in decimal degrees
- Longitude: corrected longitude of sighting in decimal degrees
- size: number of individuals sighted in group
File: shapefiles.zip
Description: This zip archive contains the files required to reproduce the figures 1-7 in the Research Article. It can be opened using any zip extractor (e.g., WinRAR). It includes 6 folders: bathymetric data (bathy folder; sourced from NOAA), coastal features/shoreline (coast folder; Land_clipped_for_mapping.Rds sourced from rnaturalearth package in R), the best-fit model-predicted densities for each species-stratum combination (dsms folder), planned and realized survey effort lines (effort folder), strata boundaries (strata folder), and the study area (study area folder). The rds files are loaded in R using the function readRDS (base R). The shapefiles are loaded in R using the function st_read (sf package), but can also be opened in any GIS software (see below Code/software).
Data dictionary
The following variables can be found in the RData files described above:
area.m2: Area of grid cell (square m).
Bearing_R: Horizontal angle of sighting relative to ship's bow (degrees, negative indicate port side).
Bearing_T: Bearing of sighting relative to true north (degrees).
Beaufort: Sea state environmental covariate (on the Beaufort scale).
BestNumber: Best estimate of group size (number of individuals of the same species in a sighting).
CV: Coefficient of Variation
Data_Qual: Data quality ("OK" or "ED" = estimated distance").
depth.m: Depth of seafloor at location (m).
depth.m.std: Depth of seafloor at location (standardized around 0).
det.size: Total group size of detected object (only different.from size if a multi-species sighting).
Det_Best: Best estimate of detection cluster size for use as a covariate (i.e., total group size including multiple species in a sighting).
Det_Max: Maximum estimate of detection cluster size for use as a covariate (i.e., total group size including multiple species in a sighting).
Det_Min: Minimum estimate of detection cluster size for use as a covariate (i.e., total group size including multiple species in a sighting).
Distance: Estimate radial distance of sighting from ship (meters).
distance: Perpendicular distance (meters).
distShore.m: Distance from neareast shoreline (m).
distShore.m.std: Distance from neareast shoreline (standardized around 0).
dst200.abs: Absolute distance from the shelf (i.e., 200 m bathymetric contour) (m).
dst200.abs.std: Absolute distance from the shelf (i.e., 200 m bathymetric contour) (standardized around 0).
dst200.dir: Distance from the 200 m bathymetric contour, directional (i.e., is negative in shallower waters) (m).
dst200.dir.std: Distance from the 200 m bathymetric contour, directional (i.e., is negative in shallower waters) (standardized around 0).
dst200.zero: Distance from 200 m bathymetric contour, takes zero value in shallower waters (m).
dst200.zero.std: Distance from 200 m bathymetric contour, takes zero value in shallower waters (standardized around 0).
dstHTidal.m: Distance to nearest area of high tidal current speed (m).
dstHTidal.m.std: Distance to nearest area of high tidal current speed (standardized around 0).
dstShelf.abs: Absolute distance from the 1000 m bathymetric contour) (m).
dstShelf.abs.std: Absolute distance from the 1000 m bathymetric contour) (standardized around 0).
dstShelf.dir: Distance from the 1000 m bathymetric contour, directional (i.e., is negative in shallower waters) (m).
dstShelf.dir.std: Distance from the 1000 m bathymetric contour, directional (i.e., is negative in shallower waters) (standardized around 0).
dstShelf.zero: Distance from the 1000 m bathymetric contour, takes zero value in shallower waters (m).
dstShelf.zero.std: Distance from the 1000 m bathymetric contour, takes zero value in shallower waters (standardized around 0).
Effort: Distance travelled in a segment (m).
Event: Type of logged event within Mysticetus software
Final_T_ID: Transect ID referring to waypoints on effort grid (e.g., B2 to B3).
GPSIndex: An unique index for GPS positions.
GPSIndUniq: The GPS index added to a ship identifier (TA = CCGS Tanu, TU = CCGS J.P. Tully).
gpstimeutc: Date/time in UTC (year-month-day hours:minutes:seconds).
Horizon_C: Whether horizon was "unobstructed" or if reticles were counted from an "estimated" horizon.
Iteration: Sequential number of iteration when segment has been surveyed more than once.
key: A combination of the SurveyID identifier, the GPSIndUnique and the Sgt_ID.
Latitude: Latitude of sighting, estimated using distance, bearing and ship's position (decimal degrees, rounded to nearest 0.1).
Latitude (segment): Latitude coordinate of segment mid-point (decimal degree).
Longitude: Longitude of sighting, estimated using distance, bearing and ship's position (decimal degrees, rounded to nearest 0.1).
Longitude (segment): Longitude coordinate of segment mid-point (decimal degree).
M_int: Interval between time of sighting and time of nearest GPS coordinate (seconds).
M_species: Whether the sighting contains multiple species ("0" = no, "1" = yes).
max.GPSInd: Maximum GPS index identifier in a segment.
MaxNumber: Maxiumum estimate of group size (number of individuals of the same species in a sighting).
Method: Detection method ("Bi" = binoculars, "NE" = naked eyes).
min.GPSInd: Minimum GPS index identifier in a segment.
MinNumber: Minimum estimate of group size (number of individuals of the same species in a sighting).
NewBeaufort: Sea state grouped into categories (species-specific, e.g., "1-2").
NewVisib: Visibility grouped into categories (species-specific, e.g., "F&P").
Nhat: Estimated abundance in cell
object: Unique object identifier for distance sampling analysis.
ONSEQ_ID: Sequential identifier of segments that have been renamed by custom stratification script.
Platform: Survey platform (Mo = "Monkey's Island", i.e., top deck of survey ship).
port_beauf: Sea state on port side (Beaufort scale)
port_visib: Visibility on port side (G&E: good or excellent, F: fair, P: poor).
Pos_type: Position type (all have been "Corrected" by running a script to correct radial distances when land is used as the horizon to count reticles).
precip: Precipitation (Clear, Haze, Fog, Light Rain, Mist)
PSD_nm: Perpendicular sighting distance from ship (nautical miles).
Region.Label: Name of stratum ("NorthShelf_Bioregion", "South_Coast", "Offshore").
Ret_line: Whether the zero for reticles was the horizon ("HO") or land ("LA").
Reticle: Declination angle of sigthing from horizon (unit = number of reticles in binoculars).
Sample.Label: Sample label for distance sampling analysis.
SD_nm: Radial sighting distance from ship (nautical miles).
Sgt_ID: A unique identifier for each sighting, containing the date.
SHIPLAT: Latitude of ship's position at time of sighting (decimal degree, rounded to nearest 0.1).
SHIPLON: Longitude of ship's position at time of sighting (decimal degree, rounded to nearest 0.1).
Side: Side of sighting (Port or Starboard)
SightedBy: Name of observer.
size: Group size of sighting.
slope.deg: Slope of seafloor at location (degrees).
slope.deg.std: Slope of seafloor at location (standardized around 0).
Species: Common name of sighted species.
speed: Speed of ship at time of sighting (knots).
status: Effort status (On or Off)
stbd_beauf: Sea state on starboard side (Beaufort scale)
stbd_visib: Visibility on starboard side (G&E: good or excellent, F: fair, P: poor).
Sub.Trans: Name of any sub-transect.
SurveyID: An identifier for surveys undertaken by the Cetacean Research Program (CRP).
TidalSpd: Tidal speed (m/s).
TidalSpd.std: Tidal speed (standardized around 0).
Time_PDT: Date/time in Pacific Daylight Time (year-month-day hours:minutes:seconds).
Transect.Label: Name of transect.
TRI: Terrain Ruggedness Index (no unit).
TRI.std: Terrain Ruggedness Index (standardized around 0).
Vessel: Vessel identifier (TA = CCGS Tanu, TU = CCGS J.P. Tully).
Visib: Visibility environmental covariate for the side of the sigthing (G&E: good or excellent, F: fair, P: poor).
Waters: In "CANADA" or "US" waters.
X.AEA: Easting UTM coordinate of segment mid point (m).
X.AEA.std: Easting UTM coordinate of segment mid point (standardized around 0).
Y.AEA: Northing UTM coordinate of segment mid point (m).
Y.AEA: Northing UTM coordinate of segment mid point (standardized around 0).
Code/software
The R code provided in the file "PRISMM DSM code 21-Aug-2025.R" will allow the user to re-run the best-fit density surface model for each cetacean species and stratum combination described in the Research Article, as well as to reproduce all of the figures. The R Environment for Statistical Computing (version 4.4.3 (2025-02-28 ucrt) -- "Trophy Case") was used to run this code, including the following packages: here, dsm, ggplot2, dplyr, tmap, sf, raster, stringr, RColorBrewer and ggspatial.
Shapefiles can be opened and used in any GIS software (e.g. QGIS) and in R or Python. A shapefile consists of multiple file types beyond the .shp (specifically, .cpg, .dbf, .prj, .sbn, and .sbx). The user only interacts directly with the .shp file but the other files need to be in the same directory.
The text file can be opened in any text editor or spreadsheet software, or loaded into R using the read.table() function.
Access information
Other publicly accessible locations of the data:
Data was derived from the following sources:
- Bathymetric data (Bathy_clipped_for_mapping.rds) used in Figures 1 & 2 were obtained from the ETOPO 2022 database hosted by NOAA (NOAA National Centers for Environmental Information, 2022)
- Coastal shoreline (Land_clipped_for_mapping.rds) used in Figures 1 & 2 was extracted using the rnaturalearth package in R
