Open davidcurrie2001 opened 1 year ago
I think it would be relativity simple to add scientific name, but not so straight forward with common name / FAO.
So a function for adding species information and as a start scientific name
Related issues have been opened: #146 #147
Example of adding scientific name to SA using the ICES Worms code list:
# Load some RDBES data
myObject <- createRDBESDataObject(input = "./tests/testthat/h1_v_1_19_18")
# Append ICES specWorms code list to SA data
# (the "Description" column contains the scientific name)
saWithSpecWorms <- dplyr::left_join(myObject[["SA"]],
RDBEScore::icesSpecWoRMS,
by=c("SAspeCode"="Key"))
Example of adding scientific name to SA using the Aphia records from WoRMS:
# Load some RDBES data
myObject <- createRDBESDataObject(input = "./tests/testthat/h1_v_1_19_18")
aphiaRecords <- RDBEScore::wormsAphiaRecord
# Change the AphiaID to a char (so it is easier to join to the RDBES speCode field)
aphiaRecords$AphiaID <- as.character(aphiaRecords$AphiaID)
# Append ahpia records to SA data
# (the "scientificname" column contains the scientific name)
saWithAphiaID <- dplyr::left_join(myObject[["SA"]],
aphiaRecords,
by=c("SAspeCode"="AphiaID"))
Users find it difficult to understand aphia ids but these are the only mandatory species information available in the RDBES. Can we append useful species information such as scientific name/common name to our RDBES data.