Let’s begin by loading the wcfish package and its dependencies.
# Load package
library(wcfish)
library(tidyverse)
#> ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
#> ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
#> ✓ tibble 3.1.5 ✓ dplyr 1.0.7
#> ✓ tidyr 1.1.4 ✓ stringr 1.4.0
#> ✓ readr 2.0.2 ✓ forcats 0.5.1
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> x dplyr::filter() masks stats::filter()
#> x dplyr::lag() masks stats::lag()
The package includes the following West Coast fisheries datasets (listed below):
Coastwide datasets
?taxa
?ports
?blocks
California (CDFW) datasets
?cdfw_waters
?cdfw_ports
?cdfw_n_comm_fishers
?cdfw_n_comm_vessels_length
?cdfw_n_comm_vessels_port
?cdfw_n_comm_vessels
?cdfw_cpfv
?cdfw_cpfv_effort
?cdfw_kelp
?cdfw_kelp_tots
PACFIN datasets
?pacfin_species
?pacfin_ports
?pacfin_all6
?pacfin_crab2
Other West Coast fisheries datasets
?swfsc
?calcom
Every dataset is documented with metadata. To view the metadata for a dataset, use the ?
command. For example, if you wanted to look at the meta-data for the cdfw_ports
dataset, you would do the following:
# Examine the metadata for the cdfw_port dataset
?cdfw_ports
This will pop up a description of the dataset and its columns in the “Help” screen of your R text editor.
You can save the dataset as an object in your R environment using the assingment operator:
# Save a dataset in your R environment
wcfish::cdfw_ports data <-
We encourage you to work with the data and plot it based on your own needs. However, we also provide a plot_data
function for generating a quick plot of the dataset of interest. Note that this only works for the CDFW datasets.
# Quickly plot a CDFW dataset
::plot_data("cdfw_ports")
wcfish#> Warning: Removed 50 rows containing missing values (position_stack).