https://github.com/ices-tools-prod/icesDatras
R interface to DATRAS trawl database web services
https://github.com/ices-tools-prod/icesDatras
Last synced: 5 months ago
JSON representation
R interface to DATRAS trawl database web services
- Host: GitHub
- URL: https://github.com/ices-tools-prod/icesDatras
- Owner: ices-tools-prod
- License: gpl-2.0
- Created: 2016-07-27T14:09:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-20T12:42:49.000Z (about 1 year ago)
- Last Synced: 2024-04-14T02:59:45.891Z (about 1 year ago)
- Language: R
- Homepage: https://datras.ices.dk/WebServices/Webservices.aspx
- Size: 212 KB
- Stars: 12
- Watchers: 11
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- open-sustainable-technology - icesDatras - R interface to Database of Trawl Surveys web services. (Biosphere / Marine Life and Fishery)
README
[](https://travis-ci.org/ices-tools-prod/icesDatras)
[](https://codecov.io/gh/ices-tools-prod/icesDatras)
[](https://github.com/ices-tools-prod/icesDatras/tree/1.2-0)
[](https://cran.r-project.org/package=icesDatras)
[](https://cran.r-project.org/package=icesDatras)
[](https://cran.r-project.org/package=icesDatras)
[-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.en.html)[
](http://ices.dk)
icesDatras
==========icesDatras provides R functions that access the
[web services](https://datras.ices.dk/WebServices/Webservices.aspx) of the
[ICES](http://ices.dk) [DATRAS](http://datras.ices.dk) trawl survey database.icesDatras is implemented as an [R](https://www.r-project.org) package and
available on [CRAN](https://cran.r-project.org/package=icesDatras).DATRAS database support
-----------------------If you have questions relating to the ICES DATRAS database or web services please email: [email protected]
Installation
------------icesDatras can be installed from CRAN using the `install.packages` command:
```R
install.packages("icesDatras")
```Usage
-----For a summary of the package:
```R
library(icesDatras)
?icesDatras
```
Information on available surveys in DATRAS:```R
getSurveyList()```
Working Examples
-----Extracting survey haul (HH), lenght (HL) and agebased (CA) data from a given survey, quarter and year,
i.e. North Sea IBTS, Quarter 1, 2019:```R
survey <- "NS-IBTS"
year <- 2019
quarter <- 1HH <- getHHdata(survey, year, quarter)
HL <- getHLdata(survey, year, quarter)
CA <- getCAdata(survey, year, quarter)
```Extracting catch weight of cod from the Baltic Sea survey, year 2019, quarter 1.
Note: The icesVocab package provides `findAphia`, a function to look up Aphia species codes.```R
library(icesVocab)
aphia <- icesVocab::findAphia("cod")survey <- "BITS"
years <- 2019
quarters <- 1
codwgt <- getCatchWgt(survey, years, quarters, aphia)```
Get catch weight for Baltic cod from all quarters in a small timeseries (e.g. 1991 to 2011) and plot the weight in a sipmle graph per quarter.
```R
library(icesVocab)
library(ggplot2)aphia <- icesVocab::findAphia("cod")
survey <- "BITS"
years <- 1991:2011
quarters <- 1:4
codwgt <- getCatchWgt(survey, years, quarters, aphia)
codwgt %>% ggplot(aes(x = Year, y = CatchWgt, colour= Quarter)) + geom_point()
```References
----------ICES DATRAS database:
http://datras.ices.dkICES DATRAS web services:
https://datras.ices.dk/WebServices/Webservices.aspxAphiaID of marine organisms:
http://www.marinespecies.org/index.phpDevelopment
-----------icesDatras is developed openly on
[GitHub](https://github.com/ices-tools-prod/icesDatras).Feel free to open an
[issue](https://github.com/ices-tools-prod/icesDatras/issues) there if you
encounter problems or have suggestions for future versions.The current development version can be installed using:
```R
library(devtools)
install_github("ices-tools-prod/icesDatras")
```