knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Let's begin by loading the wcfish package and its dependencies.
# Load package library(wcfish) library(tidyverse)
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 data <- wcfish::cdfw_ports
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 wcfish::plot_data("cdfw_ports")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.