{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Updating HTML index of packages in '.Library'\n",
"\n",
"Making 'packages.html' ...\n",
" done\n",
"\n",
"Skipping install of 'Rstox' from a github remote, the SHA1 (e2246bf3) has not changed since last install.\n",
" Use `force = TRUE` to force installation\n",
"\n"
]
}
],
"source": [
"# Install preprequisites\n",
"# From CRAN\n",
"install.packages(c(\"remotes\", \"RstoxData\", \"data.table\", \"worms\"))\n",
"\n",
"# From GITHUB\n",
"remotes::install_github(\"Sea2Data/Rstox\", ref = \"develop\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Rstox_1.11.1 \n",
"**********\n",
"WARNING: This version of Rstox is an unofficial/developer version and bugs should be expected.\n",
"If problems with Java Memory such as java.lang.OutOfMemoryError occurs, see ?setJavaMemory.\n",
"**********\n",
"\n",
"\n",
"Attaching package: ‘RstoxData’\n",
"\n",
"\n",
"The following object is masked from ‘package:Rstox’:\n",
"\n",
" readErsFile\n",
"\n",
"\n"
]
}
],
"source": [
"# Load libraries\n",
"library(Rstox)\n",
"library(RstoxData)\n",
"library(data.table)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"#\n",
"# (1) Function for adding missing scientific names names\n",
"#\n",
"getScientificNames <- function(data) {\n",
" # Source Edvin's script\n",
" source(\"https://github.com/Sea2Data/cruisetools/raw/master/taxaAnnotation/annotateTaxa.R\")\n",
"\n",
" # Get taxa taxaTable\n",
" ## Get list of aphias\n",
" aphias <- unlist(unique(data$catchsample[!is.na(aphia), \"aphia\"]))\n",
" ## Make taxa table\n",
" taxaTable <- makeTaxaTable(aphias)\n",
"\n",
" # We can merge with NMD biotic catchsample\n",
" newcatchsample <- merge(data$catchsample[,-c(\"scientificname\")], taxaTable[, c(\"AphiaID\", \"scientificname\")], \n",
" by.x=\"aphia\", by.y=\"AphiaID\", all.x = TRUE)\n",
"\n",
" # Now scientificname is properly populated\n",
" data$catchsample <- newcatchsample\n",
" return(data)\n",
" }"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"#\n",
"# (2) Function for downloading all cruise of selection\n",
"#\n",
"\n",
"getSurveySeriesData <- function(surveyName, combine_year = FALSE, combine_table = FALSE) {\n",
" # Download cruise series as ReadBiotic only project into StoX directory\n",
" modelBio <- list(\"ReadBioticXML\")\n",
" projects <- getNMDdata(cruise=surveyName, group=\"all\", model=modelBio, abbrev=FALSE, subdir=TRUE, ow=TRUE)\n",
"\n",
" # Load all biotic files (projects should contains the full path to the files)\n",
" files <- list.files(paste0(projects,\"/input/biotic/\"), full.names=TRUE)\n",
" biotic <- ReadBiotic(files) # This will take a while to process all 80 biotic files!!!\n",
"\n",
" result <- biotic\n",
" \n",
" if (combine_year) {\n",
" result <- list()\n",
" # Merge using data.table's rbindlist\n",
" for(i in seq_along(biotic)) {\n",
" station.dt <- rbindlist(lapply(biotic, \"[[\", \"fishstation\"))\n",
" catch.dt <- rbindlist(lapply(biotic, \"[[\", \"catchsample\"))\n",
" individual.dt <- rbindlist(lapply(biotic, \"[[\", \"individual\"))\n",
" age.dt <- rbindlist(lapply(biotic, \"[[\", \"agedetermination\"))\n",
" }\n",
" result$fishstation <- station.dt\n",
" result$catchsample <- catch.dt\n",
" result$individual <- individual.dt\n",
" result$agedetermination <- age.dt\n",
" }\n",
"\n",
" if (combine_year && combine_table) {\n",
" # (if required) merge all data (all.x means include empty stations too)\n",
" all.dt <- merge(station.dt, catch.dt, all.x = TRUE)\n",
" all.dt <- merge(all.dt, individual.dt, by = intersect(names(all.dt), names(individual.dt)), all.x = TRUE)\n",
"\n",
" ## Age is a bit tricky to merge\n",
" all.dt <- merge(all.dt, age.dt, by.x=c(intersect(names(all.dt), names(age.dt)), \"preferredagereading\"),\n",
" by.y= c(intersect(names(all.dt), names(age.dt)), \"agedeterminationid\"), all.x = TRUE)\n",
" result <- all.dt\n",
" }\n",
" \n",
" return(result)\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"A data.frame: 28 × 1\n",
"\n",
"\tCS |
\n",
"\t<chr> |
\n",
"\n",
"\n",
"\tAtlantic Ocean West of British Isles INT blue whiting spawning survey in spring |
\n",
"\tBarents Sea NOR demersal fish cruise in August-September |
\n",
"\tBarents Sea NOR demersel fish cruise in October-November |
\n",
"\tBarents Sea NOR-RUS 0-group cruise in autumn |
\n",
"\tBarents Sea NOR-RUS ecosystem cruise in autumn |
\n",
"\tNorth Sea International ecosystem cruise in Q2_Q3 |
\n",
"\tNorth Sea International IBTS cruise in Q1 |
\n",
"\tNorth Sea International IBTS cruise in Q2_Q3 |
\n",
"\tNorth Sea International IBTS cruise in Q4 |
\n",
"\tNorth Sea NOR mackerel cruise in summer |
\n",
"\tNorth Sea NOR Sandeel cruise in Apr_May |
\n",
"\tNorth Sea NOR seiskalle cruise in spring |
\n",
"\tNorth Sea NOR shrimp NDSK cruise in Jan_Nov |
\n",
"\tNorwegian Sea continental slope NOR deep-sea fish cruise in autumn |
\n",
"\tNorwegian Sea International ecosystem cruise in May |
\n",
"\tNorwegian Sea NOR mackerel cruise in summer |
\n",
"\tNorwegian Sea NOR Norwegian spring-spawning herring spawning cruise in Feb_Mar |
\n",
"\tNorwegian Sea NOR pelagic deep-sea fish cruise in summer |
\n",
"\tNorwegian Sea NOR salmon cruise in summer |
\n",
"\tSkagerrak NOR beach seine survey in autumn |
\n",
"\tVaranger Stad NOR coastal cruise in autumn |
\n",
"\tBarents Sea NOR-RUS demersal fish cruise in winter |
\n",
"\tLofoten NOR demersal fish cruise in Mar_Apr |
\n",
"\tNorth Sea NOR Herring Acoustic Survey in summer |
\n",
"\tNorwegian Sea continental slope NOR deep-sea fish cruise in spring |
\n",
"\tPorsangerfjorden Tanafjorden Kvænangen NOR ecosystem mapping in spring_autumn |
\n",
"\tBarents Sea NOR capelin spawning cruise in spring |
\n",
"\tCoast of Norway costal sprat acoustic survey yearly |
\n",
"\n",
"
\n"
],
"text/latex": [
"A data.frame: 28 × 1\n",
"\\begin{tabular}{l}\n",
" CS\\\\\n",
" \\\\\n",
"\\hline\n",
"\t Atlantic Ocean West of British Isles INT blue whiting spawning survey in spring\\\\\n",
"\t Barents Sea NOR demersal fish cruise in August-September \\\\\n",
"\t Barents Sea NOR demersel fish cruise in October-November \\\\\n",
"\t Barents Sea NOR-RUS 0-group cruise in autumn \\\\\n",
"\t Barents Sea NOR-RUS ecosystem cruise in autumn \\\\\n",
"\t North Sea International ecosystem cruise in Q2\\_Q3 \\\\\n",
"\t North Sea International IBTS cruise in Q1 \\\\\n",
"\t North Sea International IBTS cruise in Q2\\_Q3 \\\\\n",
"\t North Sea International IBTS cruise in Q4 \\\\\n",
"\t North Sea NOR mackerel cruise in summer \\\\\n",
"\t North Sea NOR Sandeel cruise in Apr\\_May \\\\\n",
"\t North Sea NOR seiskalle cruise in spring \\\\\n",
"\t North Sea NOR shrimp NDSK cruise in Jan\\_Nov \\\\\n",
"\t Norwegian Sea continental slope NOR deep-sea fish cruise in autumn \\\\\n",
"\t Norwegian Sea International ecosystem cruise in May \\\\\n",
"\t Norwegian Sea NOR mackerel cruise in summer \\\\\n",
"\t Norwegian Sea NOR Norwegian spring-spawning herring spawning cruise in Feb\\_Mar \\\\\n",
"\t Norwegian Sea NOR pelagic deep-sea fish cruise in summer \\\\\n",
"\t Norwegian Sea NOR salmon cruise in summer \\\\\n",
"\t Skagerrak NOR beach seine survey in autumn \\\\\n",
"\t Varanger Stad NOR coastal cruise in autumn \\\\\n",
"\t Barents Sea NOR-RUS demersal fish cruise in winter \\\\\n",
"\t Lofoten NOR demersal fish cruise in Mar\\_Apr \\\\\n",
"\t North Sea NOR Herring Acoustic Survey in summer \\\\\n",
"\t Norwegian Sea continental slope NOR deep-sea fish cruise in spring \\\\\n",
"\t Porsangerfjorden Tanafjorden Kvænangen NOR ecosystem mapping in spring\\_autumn \\\\\n",
"\t Barents Sea NOR capelin spawning cruise in spring \\\\\n",
"\t Coast of Norway costal sprat acoustic survey yearly \\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A data.frame: 28 × 1\n",
"\n",
"| CS <chr> |\n",
"|---|\n",
"| Atlantic Ocean West of British Isles INT blue whiting spawning survey in spring |\n",
"| Barents Sea NOR demersal fish cruise in August-September |\n",
"| Barents Sea NOR demersel fish cruise in October-November |\n",
"| Barents Sea NOR-RUS 0-group cruise in autumn |\n",
"| Barents Sea NOR-RUS ecosystem cruise in autumn |\n",
"| North Sea International ecosystem cruise in Q2_Q3 |\n",
"| North Sea International IBTS cruise in Q1 |\n",
"| North Sea International IBTS cruise in Q2_Q3 |\n",
"| North Sea International IBTS cruise in Q4 |\n",
"| North Sea NOR mackerel cruise in summer |\n",
"| North Sea NOR Sandeel cruise in Apr_May |\n",
"| North Sea NOR seiskalle cruise in spring |\n",
"| North Sea NOR shrimp NDSK cruise in Jan_Nov |\n",
"| Norwegian Sea continental slope NOR deep-sea fish cruise in autumn |\n",
"| Norwegian Sea International ecosystem cruise in May |\n",
"| Norwegian Sea NOR mackerel cruise in summer |\n",
"| Norwegian Sea NOR Norwegian spring-spawning herring spawning cruise in Feb_Mar |\n",
"| Norwegian Sea NOR pelagic deep-sea fish cruise in summer |\n",
"| Norwegian Sea NOR salmon cruise in summer |\n",
"| Skagerrak NOR beach seine survey in autumn |\n",
"| Varanger Stad NOR coastal cruise in autumn |\n",
"| Barents Sea NOR-RUS demersal fish cruise in winter |\n",
"| Lofoten NOR demersal fish cruise in Mar_Apr |\n",
"| North Sea NOR Herring Acoustic Survey in summer |\n",
"| Norwegian Sea continental slope NOR deep-sea fish cruise in spring |\n",
"| Porsangerfjorden Tanafjorden Kvænangen NOR ecosystem mapping in spring_autumn |\n",
"| Barents Sea NOR capelin spawning cruise in spring |\n",
"| Coast of Norway costal sprat acoustic survey yearly |\n",
"\n"
],
"text/plain": [
" CS \n",
"1 Atlantic Ocean West of British Isles INT blue whiting spawning survey in spring\n",
"2 Barents Sea NOR demersal fish cruise in August-September \n",
"3 Barents Sea NOR demersel fish cruise in October-November \n",
"4 Barents Sea NOR-RUS 0-group cruise in autumn \n",
"5 Barents Sea NOR-RUS ecosystem cruise in autumn \n",
"6 North Sea International ecosystem cruise in Q2_Q3 \n",
"7 North Sea International IBTS cruise in Q1 \n",
"8 North Sea International IBTS cruise in Q2_Q3 \n",
"9 North Sea International IBTS cruise in Q4 \n",
"10 North Sea NOR mackerel cruise in summer \n",
"11 North Sea NOR Sandeel cruise in Apr_May \n",
"12 North Sea NOR seiskalle cruise in spring \n",
"13 North Sea NOR shrimp NDSK cruise in Jan_Nov \n",
"14 Norwegian Sea continental slope NOR deep-sea fish cruise in autumn \n",
"15 Norwegian Sea International ecosystem cruise in May \n",
"16 Norwegian Sea NOR mackerel cruise in summer \n",
"17 Norwegian Sea NOR Norwegian spring-spawning herring spawning cruise in Feb_Mar \n",
"18 Norwegian Sea NOR pelagic deep-sea fish cruise in summer \n",
"19 Norwegian Sea NOR salmon cruise in summer \n",
"20 Skagerrak NOR beach seine survey in autumn \n",
"21 Varanger Stad NOR coastal cruise in autumn \n",
"22 Barents Sea NOR-RUS demersal fish cruise in winter \n",
"23 Lofoten NOR demersal fish cruise in Mar_Apr \n",
"24 North Sea NOR Herring Acoustic Survey in summer \n",
"25 Norwegian Sea continental slope NOR deep-sea fish cruise in spring \n",
"26 Porsangerfjorden Tanafjorden Kvænangen NOR ecosystem mapping in spring_autumn \n",
"27 Barents Sea NOR capelin spawning cruise in spring \n",
"28 Coast of Norway costal sprat acoustic survey yearly "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Start download data\n",
"\n",
"# List all cruise series\n",
"CS <- getNMDinfo(\"cs\", recursive=FALSE)\n",
"as.data.frame(CS)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"$`Barents Sea NOR-RUS ecosystem cruise in autumn` = \n",
"A data.frame: 82 × 4\n",
"\n",
"\t | code | Cruise | ShipName | Year |
\n",
"\t | <chr> | <chr> | <chr> | <chr> |
\n",
"\n",
"\n",
"\t3 | 1 | 0087_2003_UFVZ_TSIVI | Tsivilsk | 2003 |
\n",
"\t6 | 2 | 2003110 | G.O.Sars | 2003 |
\n",
"\t1 | 3 | 2003209 | Johan Hjort | 2003 |
\n",
"\t4 | 4 | 2003703 | Jan Mayen | 2003 |
\n",
"\t2 | 5 | 2003705 | Jan Mayen | 2003 |
\n",
"\t5 | 6 | 0115_2003_UFFJ_SMOLE | Smolensk | 2003 |
\n",
"\t9 | 1 | 2004210 | Johan Hjort | 2004 |
\n",
"\t7 | 2 | 2004702 | Jan Mayen | 2004 |
\n",
"\t10 | 3 | 2004703 | Jan Mayen | 2004 |
\n",
"\t8 | 4 | 0118_2004_UFFJ_SMOLE | Smolensk | 2004 |
\n",
"\t11 | 5 | 0088_2004_UANA_NANSE | Fridtjof Nansen | 2004 |
\n",
"\t15 | 1 | 2005111 | G.O.Sars | 2005 |
\n",
"\t12 | 2 | 2005209 | Johan Hjort | 2005 |
\n",
"\t16 | 3 | 2005702 | Jan Mayen | 2005 |
\n",
"\t13 | 4 | 2005703 | Jan Mayen | 2005 |
\n",
"\t17 | 5 | 0093_2005_UANA_NANSE | Fridtjof Nansen | 2005 |
\n",
"\t14 | 6 | 0092_2005_UFJJ_SMOLE | Smolensk | 2005 |
\n",
"\t18 | 1 | 2006702 | Jan Mayen | 2006 |
\n",
"\t21 | 2 | 2006211 | Johan Hjort | 2006 |
\n",
"\t19 | 3 | 2006704 | Jan Mayen | 2006 |
\n",
"\t23 | 4 | 2006113 | G.O.Sars | 2006 |
\n",
"\t20 | 5 | 0095_2006_UFJJ_SMOLE | Smolensk | 2006 |
\n",
"\t22 | 6 | 0094_2006_UANA_NANSE | Fridtjof Nansen | 2006 |
\n",
"\t26 | 1 | 2007110 | G.O.Sars | 2007 |
\n",
"\t24 | 2 | 2007210 | Johan Hjort | 2007 |
\n",
"\t27 | 3 | 2007702 | Jan Mayen | 2007 |
\n",
"\t25 | 4 | 0096_2007_UFJJ_SMOLE | Smolensk | 2007 |
\n",
"\t28 | 5 | 0097_2007_UFJN_VILNY | Vilnyus | 2007 |
\n",
"\t29 | 1 | 2008106 | G.O.Sars | 2008 |
\n",
"\t32 | 2 | 2008703 | Jan Mayen | 2008 |
\n",
"\t⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
\n",
"\t54 | 3 | 2013111 | G.O.Sars | 2013 |
\n",
"\t53 | 4 | 0112_2013_UFJN_VILNY | Vilnyus | 2013 |
\n",
"\t55 | 1 | 2014212 | Johan Hjort | 2014 |
\n",
"\t57 | 2 | 2014806 | Helmer Hanssen | 2014 |
\n",
"\t56 | 3 | 2014116 | G.O.Sars | 2014 |
\n",
"\t58 | 4 | 0116_2014_UFJN_VILNY | Vilnyus | 2014 |
\n",
"\t61 | 1 | 2015210 | Johan Hjort | 2015 |
\n",
"\t59 | 2 | 2015843 | Helmer Hanssen | 2015 |
\n",
"\t62 | 3 | 2015114 | G.O.Sars | 2015 |
\n",
"\t60 | 4 | 0117_2015_UFJN_VILNY | Vilnyus | 2015 |
\n",
"\t63 | 1 | 2016209 | Johan Hjort | 2016 |
\n",
"\t65 | 2 | 2016847 | Helmer Hanssen | 2016 |
\n",
"\t64 | 3 | 2016842 | Eros | 2016 |
\n",
"\t66 | 4 | 0142_2016_UANA_NANSE | Fridtjof Nansen | 2016 |
\n",
"\t69 | 1 | 2017209 | Johan Hjort | 2017 |
\n",
"\t67 | 2 | 2017113 | G.O.Sars | 2017 |
\n",
"\t70 | 3 | 2017856 | Helmer Hanssen | 2017 |
\n",
"\t68 | 4 | 0143_2017_UFJN_VLNY | Vilnyus | 2017 |
\n",
"\t71 | 1 | 2018209 | Johan Hjort | 2018 |
\n",
"\t72 | 2 | 2018110 | G.O.Sars | 2018 |
\n",
"\t73 | 3 | 2018838 | Helmer Hanssen | 2018 |
\n",
"\t74 | 4 | 0145_2018_UFJN_VLNY | Vilnyus | 2018 |
\n",
"\t75 | 1 | 2019113 | G.O.Sars | 2019 |
\n",
"\t76 | 2 | 2019209 | Johan Hjort | 2019 |
\n",
"\t77 | 3 | 2019813 | Helmer Hanssen | 2019 |
\n",
"\t78 | 4 | 0147_2019_UFJN_VLNY | Vilnyus | 2019 |
\n",
"\t79 | 1 | 2020111 | G.O.Sars | 2020 |
\n",
"\t80 | 2 | 2020209 | Johan Hjort | 2020 |
\n",
"\t81 | 3 | 0151_2020_UFJN_VILN | Vilnyus | 2020 |
\n",
"\t82 | 4 | 0152_2020_UHOB_ATLA | Atlantniro | 2020 |
\n",
"\n",
"
\n"
],
"text/latex": [
"\\textbf{\\$`Barents Sea NOR-RUS ecosystem cruise in autumn`} = A data.frame: 82 × 4\n",
"\\begin{tabular}{r|llll}\n",
" & code & Cruise & ShipName & Year\\\\\n",
" & & & & \\\\\n",
"\\hline\n",
"\t3 & 1 & 0087\\_2003\\_UFVZ\\_TSIVI & Tsivilsk & 2003\\\\\n",
"\t6 & 2 & 2003110 & G.O.Sars & 2003\\\\\n",
"\t1 & 3 & 2003209 & Johan Hjort & 2003\\\\\n",
"\t4 & 4 & 2003703 & Jan Mayen & 2003\\\\\n",
"\t2 & 5 & 2003705 & Jan Mayen & 2003\\\\\n",
"\t5 & 6 & 0115\\_2003\\_UFFJ\\_SMOLE & Smolensk & 2003\\\\\n",
"\t9 & 1 & 2004210 & Johan Hjort & 2004\\\\\n",
"\t7 & 2 & 2004702 & Jan Mayen & 2004\\\\\n",
"\t10 & 3 & 2004703 & Jan Mayen & 2004\\\\\n",
"\t8 & 4 & 0118\\_2004\\_UFFJ\\_SMOLE & Smolensk & 2004\\\\\n",
"\t11 & 5 & 0088\\_2004\\_UANA\\_NANSE & Fridtjof Nansen & 2004\\\\\n",
"\t15 & 1 & 2005111 & G.O.Sars & 2005\\\\\n",
"\t12 & 2 & 2005209 & Johan Hjort & 2005\\\\\n",
"\t16 & 3 & 2005702 & Jan Mayen & 2005\\\\\n",
"\t13 & 4 & 2005703 & Jan Mayen & 2005\\\\\n",
"\t17 & 5 & 0093\\_2005\\_UANA\\_NANSE & Fridtjof Nansen & 2005\\\\\n",
"\t14 & 6 & 0092\\_2005\\_UFJJ\\_SMOLE & Smolensk & 2005\\\\\n",
"\t18 & 1 & 2006702 & Jan Mayen & 2006\\\\\n",
"\t21 & 2 & 2006211 & Johan Hjort & 2006\\\\\n",
"\t19 & 3 & 2006704 & Jan Mayen & 2006\\\\\n",
"\t23 & 4 & 2006113 & G.O.Sars & 2006\\\\\n",
"\t20 & 5 & 0095\\_2006\\_UFJJ\\_SMOLE & Smolensk & 2006\\\\\n",
"\t22 & 6 & 0094\\_2006\\_UANA\\_NANSE & Fridtjof Nansen & 2006\\\\\n",
"\t26 & 1 & 2007110 & G.O.Sars & 2007\\\\\n",
"\t24 & 2 & 2007210 & Johan Hjort & 2007\\\\\n",
"\t27 & 3 & 2007702 & Jan Mayen & 2007\\\\\n",
"\t25 & 4 & 0096\\_2007\\_UFJJ\\_SMOLE & Smolensk & 2007\\\\\n",
"\t28 & 5 & 0097\\_2007\\_UFJN\\_VILNY & Vilnyus & 2007\\\\\n",
"\t29 & 1 & 2008106 & G.O.Sars & 2008\\\\\n",
"\t32 & 2 & 2008703 & Jan Mayen & 2008\\\\\n",
"\t⋮ & ⋮ & ⋮ & ⋮ & ⋮\\\\\n",
"\t54 & 3 & 2013111 & G.O.Sars & 2013\\\\\n",
"\t53 & 4 & 0112\\_2013\\_UFJN\\_VILNY & Vilnyus & 2013\\\\\n",
"\t55 & 1 & 2014212 & Johan Hjort & 2014\\\\\n",
"\t57 & 2 & 2014806 & Helmer Hanssen & 2014\\\\\n",
"\t56 & 3 & 2014116 & G.O.Sars & 2014\\\\\n",
"\t58 & 4 & 0116\\_2014\\_UFJN\\_VILNY & Vilnyus & 2014\\\\\n",
"\t61 & 1 & 2015210 & Johan Hjort & 2015\\\\\n",
"\t59 & 2 & 2015843 & Helmer Hanssen & 2015\\\\\n",
"\t62 & 3 & 2015114 & G.O.Sars & 2015\\\\\n",
"\t60 & 4 & 0117\\_2015\\_UFJN\\_VILNY & Vilnyus & 2015\\\\\n",
"\t63 & 1 & 2016209 & Johan Hjort & 2016\\\\\n",
"\t65 & 2 & 2016847 & Helmer Hanssen & 2016\\\\\n",
"\t64 & 3 & 2016842 & Eros & 2016\\\\\n",
"\t66 & 4 & 0142\\_2016\\_UANA\\_NANSE & Fridtjof Nansen & 2016\\\\\n",
"\t69 & 1 & 2017209 & Johan Hjort & 2017\\\\\n",
"\t67 & 2 & 2017113 & G.O.Sars & 2017\\\\\n",
"\t70 & 3 & 2017856 & Helmer Hanssen & 2017\\\\\n",
"\t68 & 4 & 0143\\_2017\\_UFJN\\_VLNY & Vilnyus & 2017\\\\\n",
"\t71 & 1 & 2018209 & Johan Hjort & 2018\\\\\n",
"\t72 & 2 & 2018110 & G.O.Sars & 2018\\\\\n",
"\t73 & 3 & 2018838 & Helmer Hanssen & 2018\\\\\n",
"\t74 & 4 & 0145\\_2018\\_UFJN\\_VLNY & Vilnyus & 2018\\\\\n",
"\t75 & 1 & 2019113 & G.O.Sars & 2019\\\\\n",
"\t76 & 2 & 2019209 & Johan Hjort & 2019\\\\\n",
"\t77 & 3 & 2019813 & Helmer Hanssen & 2019\\\\\n",
"\t78 & 4 & 0147\\_2019\\_UFJN\\_VLNY & Vilnyus & 2019\\\\\n",
"\t79 & 1 & 2020111 & G.O.Sars & 2020\\\\\n",
"\t80 & 2 & 2020209 & Johan Hjort & 2020\\\\\n",
"\t81 & 3 & 0151\\_2020\\_UFJN\\_VILN & Vilnyus & 2020\\\\\n",
"\t82 & 4 & 0152\\_2020\\_UHOB\\_ATLA & Atlantniro & 2020\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"**$`Barents Sea NOR-RUS ecosystem cruise in autumn`** = \n",
"A data.frame: 82 × 4\n",
"\n",
"| | code <chr> | Cruise <chr> | ShipName <chr> | Year <chr> |\n",
"|---|---|---|---|---|\n",
"| 3 | 1 | 0087_2003_UFVZ_TSIVI | Tsivilsk | 2003 |\n",
"| 6 | 2 | 2003110 | G.O.Sars | 2003 |\n",
"| 1 | 3 | 2003209 | Johan Hjort | 2003 |\n",
"| 4 | 4 | 2003703 | Jan Mayen | 2003 |\n",
"| 2 | 5 | 2003705 | Jan Mayen | 2003 |\n",
"| 5 | 6 | 0115_2003_UFFJ_SMOLE | Smolensk | 2003 |\n",
"| 9 | 1 | 2004210 | Johan Hjort | 2004 |\n",
"| 7 | 2 | 2004702 | Jan Mayen | 2004 |\n",
"| 10 | 3 | 2004703 | Jan Mayen | 2004 |\n",
"| 8 | 4 | 0118_2004_UFFJ_SMOLE | Smolensk | 2004 |\n",
"| 11 | 5 | 0088_2004_UANA_NANSE | Fridtjof Nansen | 2004 |\n",
"| 15 | 1 | 2005111 | G.O.Sars | 2005 |\n",
"| 12 | 2 | 2005209 | Johan Hjort | 2005 |\n",
"| 16 | 3 | 2005702 | Jan Mayen | 2005 |\n",
"| 13 | 4 | 2005703 | Jan Mayen | 2005 |\n",
"| 17 | 5 | 0093_2005_UANA_NANSE | Fridtjof Nansen | 2005 |\n",
"| 14 | 6 | 0092_2005_UFJJ_SMOLE | Smolensk | 2005 |\n",
"| 18 | 1 | 2006702 | Jan Mayen | 2006 |\n",
"| 21 | 2 | 2006211 | Johan Hjort | 2006 |\n",
"| 19 | 3 | 2006704 | Jan Mayen | 2006 |\n",
"| 23 | 4 | 2006113 | G.O.Sars | 2006 |\n",
"| 20 | 5 | 0095_2006_UFJJ_SMOLE | Smolensk | 2006 |\n",
"| 22 | 6 | 0094_2006_UANA_NANSE | Fridtjof Nansen | 2006 |\n",
"| 26 | 1 | 2007110 | G.O.Sars | 2007 |\n",
"| 24 | 2 | 2007210 | Johan Hjort | 2007 |\n",
"| 27 | 3 | 2007702 | Jan Mayen | 2007 |\n",
"| 25 | 4 | 0096_2007_UFJJ_SMOLE | Smolensk | 2007 |\n",
"| 28 | 5 | 0097_2007_UFJN_VILNY | Vilnyus | 2007 |\n",
"| 29 | 1 | 2008106 | G.O.Sars | 2008 |\n",
"| 32 | 2 | 2008703 | Jan Mayen | 2008 |\n",
"| ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |\n",
"| 54 | 3 | 2013111 | G.O.Sars | 2013 |\n",
"| 53 | 4 | 0112_2013_UFJN_VILNY | Vilnyus | 2013 |\n",
"| 55 | 1 | 2014212 | Johan Hjort | 2014 |\n",
"| 57 | 2 | 2014806 | Helmer Hanssen | 2014 |\n",
"| 56 | 3 | 2014116 | G.O.Sars | 2014 |\n",
"| 58 | 4 | 0116_2014_UFJN_VILNY | Vilnyus | 2014 |\n",
"| 61 | 1 | 2015210 | Johan Hjort | 2015 |\n",
"| 59 | 2 | 2015843 | Helmer Hanssen | 2015 |\n",
"| 62 | 3 | 2015114 | G.O.Sars | 2015 |\n",
"| 60 | 4 | 0117_2015_UFJN_VILNY | Vilnyus | 2015 |\n",
"| 63 | 1 | 2016209 | Johan Hjort | 2016 |\n",
"| 65 | 2 | 2016847 | Helmer Hanssen | 2016 |\n",
"| 64 | 3 | 2016842 | Eros | 2016 |\n",
"| 66 | 4 | 0142_2016_UANA_NANSE | Fridtjof Nansen | 2016 |\n",
"| 69 | 1 | 2017209 | Johan Hjort | 2017 |\n",
"| 67 | 2 | 2017113 | G.O.Sars | 2017 |\n",
"| 70 | 3 | 2017856 | Helmer Hanssen | 2017 |\n",
"| 68 | 4 | 0143_2017_UFJN_VLNY | Vilnyus | 2017 |\n",
"| 71 | 1 | 2018209 | Johan Hjort | 2018 |\n",
"| 72 | 2 | 2018110 | G.O.Sars | 2018 |\n",
"| 73 | 3 | 2018838 | Helmer Hanssen | 2018 |\n",
"| 74 | 4 | 0145_2018_UFJN_VLNY | Vilnyus | 2018 |\n",
"| 75 | 1 | 2019113 | G.O.Sars | 2019 |\n",
"| 76 | 2 | 2019209 | Johan Hjort | 2019 |\n",
"| 77 | 3 | 2019813 | Helmer Hanssen | 2019 |\n",
"| 78 | 4 | 0147_2019_UFJN_VLNY | Vilnyus | 2019 |\n",
"| 79 | 1 | 2020111 | G.O.Sars | 2020 |\n",
"| 80 | 2 | 2020209 | Johan Hjort | 2020 |\n",
"| 81 | 3 | 0151_2020_UFJN_VILN | Vilnyus | 2020 |\n",
"| 82 | 4 | 0152_2020_UHOB_ATLA | Atlantniro | 2020 |\n",
"\n"
],
"text/plain": [
"$`Barents Sea NOR-RUS ecosystem cruise in autumn`\n",
" code Cruise ShipName Year\n",
"3 1 0087_2003_UFVZ_TSIVI Tsivilsk 2003\n",
"6 2 2003110 G.O.Sars 2003\n",
"1 3 2003209 Johan Hjort 2003\n",
"4 4 2003703 Jan Mayen 2003\n",
"2 5 2003705 Jan Mayen 2003\n",
"5 6 0115_2003_UFFJ_SMOLE Smolensk 2003\n",
"9 1 2004210 Johan Hjort 2004\n",
"7 2 2004702 Jan Mayen 2004\n",
"10 3 2004703 Jan Mayen 2004\n",
"8 4 0118_2004_UFFJ_SMOLE Smolensk 2004\n",
"11 5 0088_2004_UANA_NANSE Fridtjof Nansen 2004\n",
"15 1 2005111 G.O.Sars 2005\n",
"12 2 2005209 Johan Hjort 2005\n",
"16 3 2005702 Jan Mayen 2005\n",
"13 4 2005703 Jan Mayen 2005\n",
"17 5 0093_2005_UANA_NANSE Fridtjof Nansen 2005\n",
"14 6 0092_2005_UFJJ_SMOLE Smolensk 2005\n",
"18 1 2006702 Jan Mayen 2006\n",
"21 2 2006211 Johan Hjort 2006\n",
"19 3 2006704 Jan Mayen 2006\n",
"23 4 2006113 G.O.Sars 2006\n",
"20 5 0095_2006_UFJJ_SMOLE Smolensk 2006\n",
"22 6 0094_2006_UANA_NANSE Fridtjof Nansen 2006\n",
"26 1 2007110 G.O.Sars 2007\n",
"24 2 2007210 Johan Hjort 2007\n",
"27 3 2007702 Jan Mayen 2007\n",
"25 4 0096_2007_UFJJ_SMOLE Smolensk 2007\n",
"28 5 0097_2007_UFJN_VILNY Vilnyus 2007\n",
"29 1 2008106 G.O.Sars 2008\n",
"32 2 2008703 Jan Mayen 2008\n",
"30 3 2008208 Johan Hjort 2008\n",
"33 4 2008822 Atlantic Star 2008\n",
"31 5 0100_2008_UFJN_VILNY Vilnyus 2008\n",
"34 1 2009208 Johan Hjort 2009\n",
"36 2 2009702 Jan Mayen 2009\n",
"35 3 0105_2009_UFJN_VILNY Vilnyus 2009\n",
"37 4 2009109 G.O.Sars 2009\n",
"40 1 2010111 G.O.Sars 2010\n",
"38 2 2010210 Johan Hjort 2010\n",
"41 3 2010703 Jan Mayen 2010\n",
"39 4 0106_2010_UFJN_VILNY Vilnyus 2010\n",
"42 5 0107_2010_UANA_NANSE Fridtjof Nansen 2010\n",
"45 1 2011717 Helmer Hanssen 2011\n",
"43 2 0109_2011_UFJN_VILNY Vilnyus 2011\n",
"44 3 2011830 Christina E 2011\n",
"46 4 2011213 Johan Hjort 2011\n",
"47 1 2012845 Helmer Hanssen 2012\n",
"48 2 2012209 Johan Hjort 2012\n",
"50 3 2012111 G.O.Sars 2012\n",
"49 4 0110_2012_UFJN_VILNY Vilnyus 2012\n",
"51 1 2013843 Helmer Hanssen 2013\n",
"52 2 2013208 Johan Hjort 2013\n",
"54 3 2013111 G.O.Sars 2013\n",
"53 4 0112_2013_UFJN_VILNY Vilnyus 2013\n",
"55 1 2014212 Johan Hjort 2014\n",
"57 2 2014806 Helmer Hanssen 2014\n",
"56 3 2014116 G.O.Sars 2014\n",
"58 4 0116_2014_UFJN_VILNY Vilnyus 2014\n",
"61 1 2015210 Johan Hjort 2015\n",
"59 2 2015843 Helmer Hanssen 2015\n",
"62 3 2015114 G.O.Sars 2015\n",
"60 4 0117_2015_UFJN_VILNY Vilnyus 2015\n",
"63 1 2016209 Johan Hjort 2016\n",
"65 2 2016847 Helmer Hanssen 2016\n",
"64 3 2016842 Eros 2016\n",
"66 4 0142_2016_UANA_NANSE Fridtjof Nansen 2016\n",
"69 1 2017209 Johan Hjort 2017\n",
"67 2 2017113 G.O.Sars 2017\n",
"70 3 2017856 Helmer Hanssen 2017\n",
"68 4 0143_2017_UFJN_VLNY Vilnyus 2017\n",
"71 1 2018209 Johan Hjort 2018\n",
"72 2 2018110 G.O.Sars 2018\n",
"73 3 2018838 Helmer Hanssen 2018\n",
"74 4 0145_2018_UFJN_VLNY Vilnyus 2018\n",
"75 1 2019113 G.O.Sars 2019\n",
"76 2 2019209 Johan Hjort 2019\n",
"77 3 2019813 Helmer Hanssen 2019\n",
"78 4 0147_2019_UFJN_VLNY Vilnyus 2019\n",
"79 1 2020111 G.O.Sars 2020\n",
"80 2 2020209 Johan Hjort 2020\n",
"81 3 0151_2020_UFJN_VILN Vilnyus 2020\n",
"82 4 0152_2020_UHOB_ATLA Atlantniro 2020\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Pick \"Barents Sea NOR-RUS ecosystem cruise in autumn\" cruise series (no. 5)\n",
"myCS <- CS[5]\n",
"getNMDinfo(c(\"cs\", myCS))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading cruise series 'Barents Sea NOR-RUS ecosystem cruise in autumn' ...\n",
"\n",
"Searching for files (164 runs):\n",
"\n",
"\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Overwriting: /home/jovyan/workspace/stox/project/Barents Sea NOR-RUS ecosystem cruise in autumn_Alldata \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading... (1 runs):\n",
"\n",
"\n",
"\n"
]
}
],
"source": [
"# Get all data from the survey, combine all cruises into hierarchical tables\n",
"surveyData <- getSurveySeriesData(myCS, combine_year = TRUE)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"A matrix: 4 × 1 of type int\n",
"\n",
"\tfishstation | 13917 |
\n",
"\tcatchsample | 243012 |
\n",
"\tindividual | 3606935 |
\n",
"\tagedetermination | 261539 |
\n",
"\n",
"
\n"
],
"text/latex": [
"A matrix: 4 × 1 of type int\n",
"\\begin{tabular}{r|l}\n",
"\tfishstation & 13917\\\\\n",
"\tcatchsample & 243012\\\\\n",
"\tindividual & 3606935\\\\\n",
"\tagedetermination & 261539\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A matrix: 4 × 1 of type int\n",
"\n",
"| fishstation | 13917 |\n",
"| catchsample | 243012 |\n",
"| individual | 3606935 |\n",
"| agedetermination | 261539 |\n",
"\n"
],
"text/plain": [
" [,1] \n",
"fishstation 13917\n",
"catchsample 243012\n",
"individual 3606935\n",
"agedetermination 261539"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Examine sample count of the survey\n",
"sampleCount <- lapply(surveyData, nrow)\n",
"t(as.data.frame(sampleCount))"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"NA"
],
"text/latex": [
"NA"
],
"text/markdown": [
"NA"
],
"text/plain": [
"[1] NA"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Check if we have missing scientific names (answer: yes)\n",
"unique(surveyData$catchsample$scientificname)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Loading required package: httr\n",
"\n",
"Loading required package: plyr\n",
"\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"REQUESTING 817 ITEMS BY ID from World Register of Marine Species (www.marinespecies.org), 13/01/2021 12:09:14 PM (CC-BY)\n",
",126436,126441,126437,126444,126461,126439,151324,127137,127144,105865\n",
",107649,233889,127254,274100,126758,126759,19494,126735,127255,126757\n",
",127191,1135,126417,126433,127212,127193,127110,154675,127115,127073\n",
",11723,126435,126505,127214,1128,127206,127235,127104,127205,106669\n",
",127218,105863,127199,125589,234519,125566,126580,127103,127072,11760\n",
",127113,125909,126752,135220,127136,127070,138481,106903,126088,127111\n",
",127112,106782,123082,125575,126102,140692,125517,125912,127203,101800\n",
",127143,127190,127139,126154,127207,126160,254529,126150,139178,110708\n",
",123080,123586,100653,101,105,127217,105410,107315,110690,123084\n",
",126104,127211,51,1806,127198,127215,127098,1248,140223,1302\n",
",107013,123083,558,123081,883,125732,1066,159523,110711,138281\n",
",138036,153097,105894,127119,126352,126555,126450,126627,107012,107566\n",
",124612,100694,118283,119036,107567,107563,126715,123258,123915,124321\n",
",127095,107568,117145,135301,106994,107533,107521,107651,101170,127186\n",
",123203,138314,156819,1358,110381,1207,101592,130769,127312,103732\n",
",139437,101759,123776,298380,101174,107504,127200,107569,104054,11716\n",
",134204,146941,158269,1268,2081,11707,159920,111600,272298,101173\n",
",1839,123851,123221,101528,124154,124160,123815,105919,106738,1137\n",
",11718,124156,124167,125158,101417,124135,135306,104,140474,196874\n",
",124147,146142,111598,101157,123908,124149,1130,107052,107497,1341\n",
",128529,125171,125166,102181,1762,105868,127387,127379,110679,126447\n",
",126175,1082,106671,1337,107044,125594,124978,138820,1267,126716\n",
",126152,127096,141449,123338,106057,106215,126438,126507,124967,125587\n",
",124151,123321,125170,1365,123276,117703,55,107322,110364,124043\n",
",124798,140525,254728,138866,139490,124934,124404,137704,102146,130097\n",
",138933,101537,127219,146943,125147,123177,104055,111723,156103,129491\n",
",181299,346965,133185,125125,160212,141905,423255,141896,141902,146851\n",
",137710,110911,124969,124900,147023,124324,124223,793,156452,107677\n",
",107676,126156,101408,102224,130099,138592,103105,152391,139525,126432\n",
",136051,138938,137701,882,134586,138906,100790,138875,140536,141820\n",
",140227,146420,124710,101160,213,106210,101156,138858,138899,254656\n",
",423556,123506,154825,149668,127140,123896,100951,140596,156383,510534\n",
",138923,139523,138709,111367,283798,100954,1567,138908,153083,127194\n",
",124933,124655,156264,139015,127142,124943,140480,127220,123142,140467\n",
",138878,254378,141989,138864,140103,139008,138859,157012,228,137858\n",
",988,111711,985,101881,138855,138904,101078,129289,124966,146953\n",
",101395,1292,131673,123207,138797,102200,123881,127116,1131,129437\n",
",138122,233981,123188,153095,124860,106983,156345,102152,123335,156101\n",
",107125,102145,274046,102864,107498,125825,126451,138265,140579,129924\n",
",124446,1803,103259,106039,229,927,123441,140430,110349,138902\n",
",126736,142001,107323,141999,159519,293567,107240,254617,1363,107552\n",
",129379,254583,127108,127236,137658,134366,140717,111544,1360,149\n",
",134669,134214,134224,134360,141904,1566,523706,134659,133882,134591\n",
",133910,254510,131779,134023,170671,126751,132005,1614,107205,1269\n",
",107232,138818,140524,160143,107531,124020,1367,127099,126472,127231\n",
",293648,127023,126103,134240,141580,130467,981,233984,1608,138873\n",
",138860,110377,130801,117597,160141,124443,127101,127222,127102,124121\n",
",100817,182882,100982,101163,101383,123390,126453,125498,135263,150637\n",
",135294,125595,125447,11709,105711,127138,126822,125516,126458,125579\n",
",125603,127105,126501,158960,127146,105869,102281,105913,105824,127309\n",
",105883,106673,125100,138339,140649,2,123479,123128,123813,106854\n",
",123574,104062,106835,123250,123143,129496,123231,1205,102297,137943\n",
",167882,492171,754175,144192,129553,265027,112120,1065,102563,101400\n",
",145725,13552,393810,164811,138266,382226,754174,102,118827,101397\n",
",135259,126833,125606,830,125743,127251,178738,154444,123106,147109\n",
",123206,123622,237,559,23123,125269,125333,143755,126617,125436\n",
",158656,105766,125390,119039,125601,125469,105874,126361,293018,126484\n",
",10329,126612,293496,105872,126440,274423,22626,127213,126725,126527\n",
",105870,274476,158950,159262,126831,126449,126375,411,123160,10313\n",
",10216,137134,126448,126996,398381,300735,110676,1364,1340,1648\n",
",135252,2041,105408,105450,104174,110342,110783,1778,125508,122323\n",
",1080,135302,110695,1371,110680,117212,106350,1250,106674,106358\n",
",156451,117849,107163,143751,104566,106790,110674,153091,107590,107678\n",
",1071,107021,138483,107643,107011,125815,106331,117070,117059,103251\n",
",101796,117143,11782,101445,111041,206633,104023,123291,123336,131834\n",
",100706,100681,129370,423901,144197,144129,136025,117728,130305,144199\n",
",939,923,129155,111037,110749,104040,124782,131629,100688,901\n",
",129487,134691,110398,102870,146940,103483,132046,132095,1606,100655\n",
",134711,10309,137793,110709,106341,104464,102644,110908,1609,1277\n",
",129233,131644,132077,138238,119962,117103,100757,107007,342212,106766\n",
",101506,100834,134687,146762,956,119842,158351,514209,106829,131774\n",
",106377,101519,119822,123121,11776,123540,123970,123353,123333,138068\n",
",118451,145,123244,123633,123587,149765,123219,123561,123503,103714\n",
",103488,134106,106989,138672,156818,107374,593072,106122,889,140702\n",
",173,138288,172,123297,118420,103509,137885,138673,110842,9904\n",
",104022,138268,137673,175024,124418,391543,100854,140168,130500,123386\n",
",532031,100839,138824,127182,124085,137871,123974,170674,124535,106918\n",
",134033,134022,137714,135144,106845,150642,104057,126459,117994,118394\n",
",118396,103862,1296,140600,10331,123182,117870,106687,938,135233\n",
",103256,1069,274967,103443,127374,159526,266489,16327,123158,106149\n",
",135226,123456,101798,116115,117487,100782,101063,101764,126446,110671\n",
",100803,138482,129566,106393,867958,21263,134741\n",
"by id .............................................. DONE\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message in makeTaxaTable(aphias):\n",
"“Some provided Aphia IDs encode non-accepted scientific names.”\n"
]
}
],
"source": [
"# Let's populate them\n",
"newSurveyData <- getScientificNames(surveyData)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"A data.frame: 817 × 1\n",
"\n",
"\tunique(newSurveyData$catchsample$scientificname) |
\n",
"\t<chr> |
\n",
"\n",
"\n",
"\tNA |
\n",
"\tActiniidae |
\n",
"\tActinostolidae |
\n",
"\tSagartiidae |
\n",
"\tEpizoanthidae |
\n",
"\tActinia |
\n",
"\tUrticina |
\n",
"\tHormathia |
\n",
"\tCerianthus |
\n",
"\tEpizoanthus |
\n",
"\tActinia equina |
\n",
"\tBolocera tuediae |
\n",
"\tUrticina felina |
\n",
"\tActinostola callosa |
\n",
"\tStomphia coccinea |
\n",
"\tHormathia digitata |
\n",
"\tHormathia nodosa |
\n",
"\tMetridium senile |
\n",
"\tGastropoda |
\n",
"\tPriapulida |
\n",
"\tPriapulidae |
\n",
"\tHalicryptus spinulosus |
\n",
"\tPriapulopsis bicaudatus |
\n",
"\tPriapulus caudatus |
\n",
"\tPetromyzontidae |
\n",
"\tMyxine glutinosa |
\n",
"\tLethenteron camtschaticum |
\n",
"\tPetromyzon marinus |
\n",
"\tGammaridae |
\n",
"\tLysianassidae |
\n",
"\t⋮ |
\n",
"\tNeptunea denselirata |
\n",
"\tPhascoliidae |
\n",
"\tTrigoniidae |
\n",
"\tMollusca |
\n",
"\tEchinidea |
\n",
"\tPasiphaea affinis |
\n",
"\tBoreoscala greenlandica |
\n",
"\tGracilechinus acutus |
\n",
"\tPolyplacophora |
\n",
"\tPorifera |
\n",
"\tCalcarea |
\n",
"\tLiponema multicorne |
\n",
"\tErrantia |
\n",
"\tSedentaria |
\n",
"\tPlatyhelminthes |
\n",
"\tPhaeophyceae |
\n",
"\tLiparis bathyarcticus |
\n",
"\tAnnelida |
\n",
"\tPolychaeta |
\n",
"\tSpionida |
\n",
"\tSabellida |
\n",
"\tMaldanidae |
\n",
"\tAphroditiformia |
\n",
"\tAphroditidae |
\n",
"\tPolynoidae |
\n",
"\tNephtyidae |
\n",
"\tAmpharetidae |
\n",
"\tSabellidae |
\n",
"\tSerpulidae |
\n",
"\tDorididae |
\n",
"\n",
"
\n"
],
"text/latex": [
"A data.frame: 817 × 1\n",
"\\begin{tabular}{l}\n",
" unique(newSurveyData\\$catchsample\\$scientificname)\\\\\n",
" \\\\\n",
"\\hline\n",
"\t NA \\\\\n",
"\t Actiniidae \\\\\n",
"\t Actinostolidae \\\\\n",
"\t Sagartiidae \\\\\n",
"\t Epizoanthidae \\\\\n",
"\t Actinia \\\\\n",
"\t Urticina \\\\\n",
"\t Hormathia \\\\\n",
"\t Cerianthus \\\\\n",
"\t Epizoanthus \\\\\n",
"\t Actinia equina \\\\\n",
"\t Bolocera tuediae \\\\\n",
"\t Urticina felina \\\\\n",
"\t Actinostola callosa \\\\\n",
"\t Stomphia coccinea \\\\\n",
"\t Hormathia digitata \\\\\n",
"\t Hormathia nodosa \\\\\n",
"\t Metridium senile \\\\\n",
"\t Gastropoda \\\\\n",
"\t Priapulida \\\\\n",
"\t Priapulidae \\\\\n",
"\t Halicryptus spinulosus \\\\\n",
"\t Priapulopsis bicaudatus \\\\\n",
"\t Priapulus caudatus \\\\\n",
"\t Petromyzontidae \\\\\n",
"\t Myxine glutinosa \\\\\n",
"\t Lethenteron camtschaticum\\\\\n",
"\t Petromyzon marinus \\\\\n",
"\t Gammaridae \\\\\n",
"\t Lysianassidae \\\\\n",
"\t ⋮\\\\\n",
"\t Neptunea denselirata \\\\\n",
"\t Phascoliidae \\\\\n",
"\t Trigoniidae \\\\\n",
"\t Mollusca \\\\\n",
"\t Echinidea \\\\\n",
"\t Pasiphaea affinis \\\\\n",
"\t Boreoscala greenlandica\\\\\n",
"\t Gracilechinus acutus \\\\\n",
"\t Polyplacophora \\\\\n",
"\t Porifera \\\\\n",
"\t Calcarea \\\\\n",
"\t Liponema multicorne \\\\\n",
"\t Errantia \\\\\n",
"\t Sedentaria \\\\\n",
"\t Platyhelminthes \\\\\n",
"\t Phaeophyceae \\\\\n",
"\t Liparis bathyarcticus \\\\\n",
"\t Annelida \\\\\n",
"\t Polychaeta \\\\\n",
"\t Spionida \\\\\n",
"\t Sabellida \\\\\n",
"\t Maldanidae \\\\\n",
"\t Aphroditiformia \\\\\n",
"\t Aphroditidae \\\\\n",
"\t Polynoidae \\\\\n",
"\t Nephtyidae \\\\\n",
"\t Ampharetidae \\\\\n",
"\t Sabellidae \\\\\n",
"\t Serpulidae \\\\\n",
"\t Dorididae \\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A data.frame: 817 × 1\n",
"\n",
"| unique(newSurveyData$catchsample$scientificname) <chr> |\n",
"|---|\n",
"| NA |\n",
"| Actiniidae |\n",
"| Actinostolidae |\n",
"| Sagartiidae |\n",
"| Epizoanthidae |\n",
"| Actinia |\n",
"| Urticina |\n",
"| Hormathia |\n",
"| Cerianthus |\n",
"| Epizoanthus |\n",
"| Actinia equina |\n",
"| Bolocera tuediae |\n",
"| Urticina felina |\n",
"| Actinostola callosa |\n",
"| Stomphia coccinea |\n",
"| Hormathia digitata |\n",
"| Hormathia nodosa |\n",
"| Metridium senile |\n",
"| Gastropoda |\n",
"| Priapulida |\n",
"| Priapulidae |\n",
"| Halicryptus spinulosus |\n",
"| Priapulopsis bicaudatus |\n",
"| Priapulus caudatus |\n",
"| Petromyzontidae |\n",
"| Myxine glutinosa |\n",
"| Lethenteron camtschaticum |\n",
"| Petromyzon marinus |\n",
"| Gammaridae |\n",
"| Lysianassidae |\n",
"| ⋮ |\n",
"| Neptunea denselirata |\n",
"| Phascoliidae |\n",
"| Trigoniidae |\n",
"| Mollusca |\n",
"| Echinidea |\n",
"| Pasiphaea affinis |\n",
"| Boreoscala greenlandica |\n",
"| Gracilechinus acutus |\n",
"| Polyplacophora |\n",
"| Porifera |\n",
"| Calcarea |\n",
"| Liponema multicorne |\n",
"| Errantia |\n",
"| Sedentaria |\n",
"| Platyhelminthes |\n",
"| Phaeophyceae |\n",
"| Liparis bathyarcticus |\n",
"| Annelida |\n",
"| Polychaeta |\n",
"| Spionida |\n",
"| Sabellida |\n",
"| Maldanidae |\n",
"| Aphroditiformia |\n",
"| Aphroditidae |\n",
"| Polynoidae |\n",
"| Nephtyidae |\n",
"| Ampharetidae |\n",
"| Sabellidae |\n",
"| Serpulidae |\n",
"| Dorididae |\n",
"\n"
],
"text/plain": [
" unique(newSurveyData$catchsample$scientificname)\n",
"1 NA \n",
"2 Actiniidae \n",
"3 Actinostolidae \n",
"4 Sagartiidae \n",
"5 Epizoanthidae \n",
"6 Actinia \n",
"7 Urticina \n",
"8 Hormathia \n",
"9 Cerianthus \n",
"10 Epizoanthus \n",
"11 Actinia equina \n",
"12 Bolocera tuediae \n",
"13 Urticina felina \n",
"14 Actinostola callosa \n",
"15 Stomphia coccinea \n",
"16 Hormathia digitata \n",
"17 Hormathia nodosa \n",
"18 Metridium senile \n",
"19 Gastropoda \n",
"20 Priapulida \n",
"21 Priapulidae \n",
"22 Halicryptus spinulosus \n",
"23 Priapulopsis bicaudatus \n",
"24 Priapulus caudatus \n",
"25 Petromyzontidae \n",
"26 Myxine glutinosa \n",
"27 Lethenteron camtschaticum \n",
"28 Petromyzon marinus \n",
"29 Gammaridae \n",
"30 Lysianassidae \n",
"⋮ ⋮ \n",
"788 Neptunea denselirata \n",
"789 Phascoliidae \n",
"790 Trigoniidae \n",
"791 Mollusca \n",
"792 Echinidea \n",
"793 Pasiphaea affinis \n",
"794 Boreoscala greenlandica \n",
"795 Gracilechinus acutus \n",
"796 Polyplacophora \n",
"797 Porifera \n",
"798 Calcarea \n",
"799 Liponema multicorne \n",
"800 Errantia \n",
"801 Sedentaria \n",
"802 Platyhelminthes \n",
"803 Phaeophyceae \n",
"804 Liparis bathyarcticus \n",
"805 Annelida \n",
"806 Polychaeta \n",
"807 Spionida \n",
"808 Sabellida \n",
"809 Maldanidae \n",
"810 Aphroditiformia \n",
"811 Aphroditidae \n",
"812 Polynoidae \n",
"813 Nephtyidae \n",
"814 Ampharetidae \n",
"815 Sabellidae \n",
"816 Serpulidae \n",
"817 Dorididae "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Re-check the scientific names\n",
"as.data.frame(unique(newSurveyData$catchsample$scientificname))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
"version": "4.0.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}