fwspp_submission: Import species occurrence records after review and export...

View source: R/fwspp_submission.R

fwspp_submissionR Documentation

Import species occurrence records after review and export files ready for submission to FWSpecies database

Description

This function imports xlsx files previously exported by fwspp_review for expert review. With appropriate reviews and edits made to the xlsx documents (see Details), they are now imported and processed (i.e., cleaned based on edits made to the review file) and exported in a format amenable to incorporation into the FWSpecies database (https://sites.google.com/a/fws.gov/fwspecies/home-1).

Usage

fwspp_submission(
  in_dir = "./fwspp_review",
  out_dir = file.path(in_dir, "fwspp_submission"),
  xlsx = NULL,
  overwrite = FALSE,
  verbose = TRUE
)

Arguments

in_dir

a non-empty scalar character path to directory containing xlsx files generated by fwspp_review and subsequently reviewed to correct taxon codes or reject records. The default a fwspp_review directory in the current working directory.

out_dir

a non-empty character scalar of path to store an output file for each USFWS property formatted for submission to NRPC. The default is to use or create a fwspp_submission directory within the in_dir

xlsx

optional character string of xlsx files, including extension, to import from in_dir. The default (NULL) is to import all xlsx files in in_dir. Non-conforming xlsx files are skipped.

overwrite

logical (default FALSE); overwrite existing files with the same name?

verbose

logical (default TRUE); provide detailed messaging during review processing?

Details

During review, users may modify the values for any observation from the taxon_code to evidence columns. Two columns in particular, however, will demand the most attention - accept_record and taxon_code.

Records without adequate documentation for inclusion in the FWSpecies database should have accept_record = No. Some observations may be set to accept_record = No by default because of ambiguous or misspelled scientific names.

Should a valid taxonomic match be found (e.g., by retrieving the appropriate taxon_code for the correct scientific name with fws_taxonomy), update the taxon_code in the spreadsheet and set accept_record = ModifiedTaxonCode. Setting accept_record = ModifiedTaxonCode means any taxonomic changes will be incorporated, and the record accepted, in the file subsequently created for submission to the FWSpecies database.

Changes to species taxonomy (taxon_code and sci_name) will be incorporated ONLY if taxon_code is corrected and accept_record = ModifiedTaxonCode.

Changes or additions to common names (com_name) will be accepted ONLY if accept_record = ModifiedTaxonCode, but taxon_code need not be changed for changes only to common name.

Changes to other columns (occurrence to evidence) will be incorporated as-is so long as accept_record = Yes or accept_record = ModifiedTaxonCode.

Records with accept_record = No are excluded.

Value

NULL; Exports individual Excel file(s) to out_dir for submission to the NRPC FWSpecies database

Examples

## Not run: 
lowcountry <- find_fws(c("romain", "santee", "ace basin", "waccamaw"))
lc <- fws_occ(fws = lowcountry)
fwspp_review(lc)
# Expert review of records occurs
fwspp_submission()

## End(Not run)

adamdsmith/fwspp documentation built on Oct. 16, 2023, 3:43 a.m.