Skip to content

Instantly share code, notes, and snippets.

@karthik
Created July 8, 2015 16:31
Show Gist options
  • Select an option

  • Save karthik/04a0d555cc31fde7993f to your computer and use it in GitHub Desktop.

Select an option

Save karthik/04a0d555cc31fde7993f to your computer and use it in GitHub Desktop.
Reproducible example of fisheries data
library(rfisheries)
library(dplyr)

species <- of_species_codes()
who <- c("TUX", "COD", "VET", "NPA")
by_species <- lapply(who, function(x) of_landings(species = x)) %>% rbind_all

library(ggplot2)
ggplot(by_species, aes(year, catch)) +
  geom_line(size = 1.2) +
  facet_wrap(~species, scales = "free_y")

plot of chunk unnamed-chunk-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment