Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- Fixed issue where macrozoop biomass was being incorrectly converted to micrograms, resulting in 100X higher biomass values.
- Added FRP 2022 data and adjusted crosswalk to reflect changes to their taxonomic table.
- Added 2023 FMWT/STN data and adjusted zoopdownloader to reflect new date format
- Added FRP 2023 data and adjusted crosswalk to reflect changes to their table.
- Adjusted crosswalk table to reflect the order "Cladocera" being split into several orders.

# zooper 2.5.1

Expand Down
3 changes: 2 additions & 1 deletion R/Download_utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ zoop_urls<-function(Sources){

if("EMP"%in%Sources){
EMP_revision_url <- "https://pasta.lternet.edu/package/eml/edi/522"
EMP_latest_revision <- utils::tail(Tryer(n=3, fun=readLines, con=EMP_revision_url, warn = FALSE), 1)
#EMP_latest_revision <- utils::tail(Tryer(n=3, fun=readLines, con=EMP_revision_url, warn = FALSE), 1)
EMP_latest_revision = 11 #Keeping the old EMP dataset until I can go through and do a full update - next pull request.
EMP_pkg_url <- paste0("https://pasta.lternet.edu/package/data/eml/edi/522/", EMP_latest_revision)
EMP_entities <- Tryer(n=3, fun=readLines, con=EMP_pkg_url, warn = FALSE)
EMP_name_urls <- paste("https://pasta.lternet.edu/package/name/eml/edi/522", EMP_latest_revision, EMP_entities, sep="/")
Expand Down
2 changes: 1 addition & 1 deletion R/zoop_downloader.R
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ Zoopdownloader <- function(

data.list[["FMWT_Macro"]] <- dplyr::bind_rows(zoo_FMWT_Macro, zoo_SMSCG_Macro)%>%
dplyr::select(-"ID")%>%
distinct()%>% #remove any samples duplicated between the SMSCG datset and the FMWTdataset
dplyr::distinct()%>% #remove any samples duplicated between the SMSCG datset and the FMWTdataset
dplyr::mutate(Microcystis = as.character(.data$Microcystis))%>%
tidyr::pivot_longer(cols=c(-"Project", -"Year", -"Survey", -"Date", -"Datetime",
-"Station", -"Time", -"TideCode",
Expand Down
2 changes: 1 addition & 1 deletion R/zoop_synthesizer.R
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Zoopsynther<-function(
}

if(!is.null(Taxa) & !purrr::every(Taxa, ~.%in%CompleteTaxaList)){
warning("Check spelling of Taxa, some are not present in the completeTaxaList and are likely misspelled.")
warning("Check spelling of Taxa, some are not present in the completeTaxaList and are likely misspelled. If you want information on Cladocera, note that the Order Cladocera has been revised to reflect several different orders, three of which are found in our estuary: Anomopoda, Ctenopoda, and Onychopoda. 'Branchiopoda' (Class) will select all of these orders.")
}

#Make it possible to re-download data if desired
Expand Down
1 change: 0 additions & 1 deletion data-raw/crosswalk-zoopComb-zoopEnvComb-startDates.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ zoop<-Zoopdownloader(Data_sets=c("EMP_Meso", "FMWT_Meso", "STN_Meso",
Data_folder=tempdir(), Save_object=FALSE, Return_object=TRUE,
Redownload_data=TRUE, Crosswalk=crosswalk, Biomass=TRUE)


zoopComb <- zoop$Zooplankton

zoopEnvComb <- zoop$Environment
Expand Down
582 changes: 297 additions & 285 deletions data-raw/crosswalk.csv

Large diffs are not rendered by default.

Binary file modified data/crosswalk.rda
Binary file not shown.
Binary file modified data/startDates.rda
Binary file not shown.
Binary file modified data/zoopComb.rda
Binary file not shown.
Binary file modified data/zoopEnvComb.rda
Binary file not shown.
1 change: 1 addition & 0 deletions tests/testthat/test-Crosswalk.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,4 @@ taxname_level<-zooper::crosswalk%>%
test_that("Taxnames are entered with a consistent taxonomic level", {
expect_equal(length(taxname_level), 0)
})

5 changes: 3 additions & 2 deletions tests/testthat/test-Source_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ test_that("20mm Meso column names have not changed", {

test_that("FRP Meso column names have not changed", {
expect_setequal(names_FRP_Meso, c( "SampleID_key","SampleID_frp","CommonName", "VisitNo","Location", "Date",
"subsample" ,
"subsample" , "DragMethod",
"Count" , "AdjCount" ,"CPUE","Flagged_Data_zoops", "StartTime",
"EndTime", "LatitudeStart", "LatitudeEnd", "LongitudeStart", "LongitudeEnd",
"DepthOfWater", "NetMeterEnd", "TowDirection", "NetMeterStart",
Expand Down Expand Up @@ -242,6 +242,7 @@ test_that("EMP Micro column names have not changed", {

test_that("FRP Macro column names have not changed", {
expect_setequal(names_FRP_Macro, c("SampleID_key","SampleID_frp", "CommonName", "VisitNo", "subsample",
"DragMethod",
"Count", "AdjCount", "Flagged_Data_macroinvert", "StartTime", "EndTime",
"LatitudeStart", "LatitudeEnd", "LongitudeStart", "LongitudeEnd", "DepthOfSample",
"DepthOfWater", "NetMeterEnd", "TowDirection", "NetMeterStart", "Boulder",
Expand All @@ -253,7 +254,7 @@ test_that("FRP Macro column names have not changed", {
test_that("FRP site data column names have not changed", {
expect_setequal(names_FRP_sites, c('VisitNo', 'Location', 'Date', 'Temp', 'SC', 'pH', 'DO',
'Turbidity', 'Chlorophyll', 'Phycocyanin', 'FDOM', 'Secchi',
'Microcystis', 'Tide', 'Weather', 'WindWaves', 'Flagged_Data'))
'Microcystis', 'Tide', 'Weather', 'WindWaves', 'Flagged_Data', "SiteComments"))

})

Expand Down
1 change: 1 addition & 0 deletions zooper.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: e55d72fd-fe3f-4bf5-9b19-6df88f448b78

RestoreWorkspace: No
SaveWorkspace: No
Expand Down