Title: | Programmatic Interface to the 'openfisheries.org' API |
---|---|
Description: | A programmatic interface to 'openfisheries.org'. This package is part of the 'rOpenSci' suite (https://ropensci.org). |
Authors: | Karthik Ram [aut, cre], Carl Boettiger [aut], Andrew Dyck [aut] |
Maintainer: | Karthik Ram <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.99 |
Built: | 2024-09-15 06:02:44 UTC |
Source: | https://github.com/ropensci/rfisheries |
A dataset containing full list of Country Codes. Use this dataset if loading from the web is slow.
data(country_code_data)
data(country_code_data)
A data table with 239 rows and 2 variables
Function has been deprecated. Now replaced by of_country_codes
country_codes() landings()
country_codes() landings()
Plots data for an rfisheries result
fish_plot(x, linecolor = "steelblue", linesize = 0.9, title = NULL, ...)
fish_plot(x, linecolor = "steelblue", linesize = 0.9, title = NULL, ...)
x |
A landings dataset belonging to either a species or a country. |
linecolor |
Default line color is steelblue |
linesize |
Default line size is 0.9 |
title |
Plot title. Title is generated based on species or country code. Specify one here only if you need something else. |
... |
additional arguments |
## Not run: fish_plot(of_landings(country = 'CAN')) fish_plot(of_landings(species = 'COD')) ## End(Not run)
## Not run: fish_plot(of_landings(country = 'CAN')) fish_plot(of_landings(species = 'COD')) ## End(Not run)
Function returns a data frame with country name and iso3c
code which is required by the landings
function to return country specific data
of_country_codes(foptions = list())
of_country_codes(foptions = list())
foptions |
additional curl options |
data.frame
## Not run: of_country_codes() ## End(Not run)
## Not run: of_country_codes() ## End(Not run)
The function returns aggregate landings data if no parameters are supplied. One could get country or species-specific data by specifying either one of those options. Country must be provided as the iso3c
code and species must be supplied as a3_code. Supporting functions country_codes
and species_codes
provide that data and can be combined to return data for multiple countries or species.
of_landings(country = NA, species = NA, foptions = list())
of_landings(country = NA, species = NA, foptions = list())
country |
Default is |
species |
Default is |
foptions |
additional optional parameters |
data.frame
## Not run: of_landings() # Landings by country of_landings(country = 'CAN') #landings by species of_landings(species = 'COD') ## End(Not run)
## Not run: of_landings() # Landings by country of_landings(country = 'CAN') #landings by species of_landings(species = 'COD') ## End(Not run)
Returns a data frame with scientific_name, taxocode, a3_code, isscaap, and English name. The a3_code is required by landings
to return species specific landing data.
of_species_codes(foptions = list())
of_species_codes(foptions = list())
foptions |
additional optional parameters |
data.frame
## Not run: of_species_list <- of_species_codes() ## End(Not run)
## Not run: of_species_list <- of_species_codes() ## End(Not run)
country_codes
: service no longer provided
species_codes
: service no longer provided
landings
: service no longer provided
A dataset containing full list of Species Codes. Use this dataset if loading from the web is slow.
data(species_code_data)
data(species_code_data)
A data table with 11562 rows and 5 variables
Function now replaced by of_species_code
species_codes()
species_codes()