View source: R/zoop_downloader.R
Zoopdownloader | R Documentation |
This function downloads all IEP zooplankton datasets from the internet, converts them to a consistent format, binds them together, and exports the combined dataset as .Rds R data files and/or an R object. Datasets currently include "EMP" (Environmental Monitoring Program), "FRP" (Fish Restoration Program), "FMWT" (Fall Midwater Trawl), "STN" (Townet Survey), "20mm" (20mm survey), "DOP" (Directed Outflow Project Lower Trophic Study), and "YBFMP" (Yolo Bypass Fish Monitoring Program).
Zoopdownloader(
Data_sets = c("EMP_Meso", "FMWT_Meso", "STN_Meso", "20mm_Meso", "FRP_Meso",
"EMP_Micro", "FRP_Macro", "EMP_Macro", "FMWT_Macro", "STN_Macro", "DOP_Meso",
"DOP_Macro"),
Biomass = TRUE,
Data_folder = tempdir(),
Save_object = TRUE,
Return_object = FALSE,
Return_object_type = "List",
Redownload_data = FALSE,
Download_method = "auto",
Zoop_path = file.path(Data_folder, "zoopforzooper"),
Env_path = file.path(Data_folder, "zoopenvforzooper"),
Crosswalk = zooper::crosswalk,
Stations = zooper::stations
)
Data_sets |
Datasets to include in combined data. Choices include "EMP_Meso", "FMWT_Meso", "STN_Meso", "20mm_Meso", "FRP_Meso", "YBFMP_Meso", "EMP_Micro", "YBFMP_Micro", "FRP_Macro", "EMP_Macro", "FMWT_Macro", "STN_Macro", "DOP_Macro", and "DOP_Meso". Defaults to including all datasets except the two YBFMP datasets. |
Biomass |
Whether to add carbon biomass (carbon biomass per unit effort ( |
Data_folder |
Path to folder in which source datasets are stored, and to which you would like datasets to be downloaded if you set |
Save_object |
Should the combined data be saved to disk? Defaults to |
Return_object |
Should data be returned as an R object? If |
Return_object_type |
If |
Redownload_data |
Should source datasets be redownloaded from the internet? Defaults to |
Download_method |
Method used to download files. See argument |
Zoop_path |
File path specifying the folder and filename of the zooplankton dataset. Defaults to |
Env_path |
File path specifying the folder and filename of the dataset with accessory environmental parameters. Defaults to |
Crosswalk |
Crosswalk table to be used for conversions. Must have columns named for each unique combination of source and size class with an underscore separator, as well as all taxonomic levels Phylum through Species, Taxname (full scientific name) and Lifestage. See |
Stations |
Latitudes and longitudes for each unique station. See |
Note that EMP Macro samples with QAQC flags (any value of AmphipodCode other than "A") have had their Amphipod CPUE set to NA in this function. For more information on the source datasets see zooper
.
If Return_object = TRUE
, returns the combined dataset as a list or tibble, depending on whether Return_object_type
is set to "List"
or "Combined"
. If Save_object = TRUE
, writes 2 .Rds files to disk: one with the zooplankton catch data and another with accessory environmental parameters.
Sam Bashevkin
Zoopsynther
, crosswalk
, stations
, zooper
## Not run:
Data <- Zoopdownloader(Data_folder = tempdir(), Return_object = TRUE,
Save_object = FALSE, Redownload_data = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.