Created
May 31, 2016 07:19
-
-
Save slarge/cc249c4ca6f43384856a6a297cafca3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm(list = ls()) | |
# Downloads and parses Calinus finmarchicus abundance data from EMODnet OOPS for the Greater North Sea | |
# 10 yr rolling mean and 1 yr seasonal data are provided. The latter is probably most relevant for fisheries applications. | |
# Citation for data: "European Marine Observation Data Network (EMODnet) Biology project (www.emodnet-biology.eu), funded by the European Commission's Directorate - General for Maritime Affairs and Fisheries (DG MARE)" | |
# | |
#Install package | |
install.packages("jsonlite") | |
library(jsonlite) | |
# | |
emodDatJSON <- fromJSON("http://geo.vliz.be/geoserver/Emodnetbio/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Emodnetbio:OOPS_summaries&outputFormat=json") | |
# | |
emodDat <- emodDatJSON$features$properties | |
calFin <- emodDat[emodDat$name %in% "Greater North Sea" & | |
emodDat$scientificName %in% "Calanus finmarchicus",] | |
calFin$binLength <- ifelse(calFin$endYearCollection - calFin$startYearCollection == 9, 10, 1) | |
calFin <- calFin[calFin$binLength < 10,] | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment