Title: | 'Programmatic Interface to the 'openfisheries.org' API' |
Version: | 0.2 |
Date: | 2016-02-18 |
Maintainer: | Karthik Ram <karthik.ram@gmail.com> |
Description: | A programmatic interface to 'openfisheries.org'. This package is part of the 'rOpenSci' suite (http://ropensci.org). |
Depends: | R (≥ 2.15) |
Imports: | httr, data.table, assertthat, ggplot2, rjson |
LazyData: | yes |
URL: | http://www.github.com/ropensci/rfisheries |
BugReports: | http://www.github.com/ropensci/rfisheries/issues/new |
License: | MIT + file LICENSE |
RoxygenNote: | 5.0.1 |
NeedsCompilation: | no |
Packaged: | 2016-02-19 00:01:39 UTC; karthik |
Author: | Karthik Ram [aut, cre], Carl Boettiger [aut], Andrew Dyck [aut] |
Repository: | CRAN |
Date/Publication: | 2016-02-19 08:50:03 |
country_code_data
Description
A dataset containing full list of Country Codes. Use this dataset if loading from the web is slow.
Usage
data(country_code_data)
Format
A data table with 239 rows and 2 variables
country_codes
Description
Function has been deprecated. Now replaced by of_country_codes
Usage
country_codes()
landings()
Plots data for an rfisheries result
Description
Plots data for an rfisheries result
Usage
fish_plot(x, linecolor = "steelblue", linesize = 0.9, title = NULL, ...)
Arguments
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 |
Examples
## Not run:
fish_plot(of_landings(country = 'CAN'))
fish_plot(of_landings(species = 'COD'))
## End(Not run)
Download full list of ISO-3166 alpha 3 country code.
Description
Function returns a data frame with country name and iso3c
code which is required by the landings
function to return country specific data
Usage
of_country_codes(foptions = list())
Arguments
foptions |
additional curl options |
Value
data.frame
Examples
## Not run:
of_country_codes()
## End(Not run)
Returns landings data from the openfisheries API
Description
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.
Usage
of_landings(country = NA, species = NA, foptions = list())
Arguments
country |
Default is |
species |
Default is |
foptions |
additional optional parameters |
Value
data.frame
Examples
## Not run:
of_landings()
# Landings by country
of_landings(country = 'CAN')
#landings by species
of_landings(species = 'COD')
## End(Not run)
Download species data including three-letter ASFIS species code.
Description
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.
Usage
of_species_codes(foptions = list())
Arguments
foptions |
additional optional parameters |
Value
data.frame
Examples
## Not run:
of_species_list <- of_species_codes()
## End(Not run)
Deprecated functions in rfisheries
Description
-
country_codes
: service no longer provided -
species_codes
: service no longer provided -
landings
: service no longer provided
species_code_data
Description
A dataset containing full list of Species Codes. Use this dataset if loading from the web is slow.
Usage
data(species_code_data)
Format
A data table with 11562 rows and 5 variables
species_codes
Description
Function now replaced by of_species_code
Usage
species_codes()