GreenLight | R Documentation |
GreenLight will take input data, check for errors, create a summary report, and optionally output a new data file.
GreenLight(
path.name,
area,
report = TRUE,
raw2analysis = FALSE,
archive.dir = "default"
)
path.name |
The path to the raw data file to be checked. |
area |
The area code for dedicated MBM Alaska region surveys. Acceptable values include:
|
report |
TRUE or FALSE, should a preliminary report be generated? |
raw2analysis |
TRUE or FALSE, should the archive version of the raw data file be generated (if possible)? |
archive.dir |
Path to the desired archive directory for the new data file. Defaults to 3 directory levels above the input file to follow current MBM practices. |
GreenLight is designed to automate common data QA/QC functions that are normally done live by an observer. In the future, these checks will use a specific set of fields derived from a generic aerial survey protocol, but this protocol does not currently exist, so instead the checks provided here are simply to streamline the creation of population estimates using this R package and provide some consistency in the data fields before a data set is shared with others. The specific tests performed are:
Column Names - Are all required columns present and named correctly? Necessary columns are:
4 digit integer representing the year of the observation
2 digit integer representing the month of the observation
1 or 2 digit integer representing the day of the observation
2 character representation of seat assignment; RF (right front), LF (left front), RR (right rear), or LR (left rear)
3 character initials of the observer (such as CJF, all capitalized, or C_F)
character string (or numeric, treated as string) representing the stratum the observation was in (if known by the observer)
character string (or numeric, treated as string) of the DESIGN FILE transect number
character string (or numeric, treated as string) of the transect segment (if known)
character string of flight direction (numeric as degrees, character cardinal or intercardinal directions)
character string of air to ground segment ID
character string of wind direction based on 8 point cardinal/intercardinal directions
integer representing wind speed in knots
character string representing sky condition (clear, scattered, etc.)
character string representing .wav file recording for the associated observation
floating decimal representing decimal degrees of latitude in WGS84 datum
floating decimal representing decimal degrees of longitude in WGS84 datum
floating decimal representing computer clock seconds past midnight
floating decimal representing the delay in clock time and GPS system time in seconds
4 character string representing the acceptable species code for an observation. See sppntable
up to 5 digit integer representing the number seen
character string representing observation type:
single - one lone drake (dimorphic species) or lone bird (monomorphic species)
pair - hen and drake in close association (dimorphic species) or 2 birds in close association (monomorphic species)
open - a mixed sex flock that can't be classified as single, pair, or flkdrake
flkdrake - 2 or more drakes in close association
character string representing observed behavior: diving, flying, swimming, or NA
character string representing distance from the observer: near, far, NA
integer representing the use of the data in analysis:
use in standard index estimate
use as double observer only
additional data collected but not used in analysis
character string reserved for additional comments
Area - Does the area specified have a defined QAQC process? Acceptable values include:
YKD - Yukon Kuskokwim Delta MBM duck stratification
WBPHS - Waterfowl Breeding Population Habitat Survey ("North American")
YKG - Yukon Kuskokwim Delta MBM goose stratification
BLSC - Black Scoter
ACP - Arctic Coastal Plain
CRD - Copper River Delta
VIS - Aircraft Visibility
Swans - Are swans and swan nests appropriately recorded? Appropriate treatment is recording any observed swans separately from their nests, and nests as open 1. This applies to tundra swans (TUSW) and trumpeter swans (TRSW), and their associated nests.
Obs_Type - Are all Obs_Type recorded as one of the accepted 4 codes (single, pair, open, flkdrake)?
Seat - Are the observer seat codes recorded as one of the 4 acceptable upper case codes (RF, LF, RR, LR)?
Species - Are the species codes correct? See sppntable
.
Observer - Are all observer initials the same (1 observer per data file) and upper case?
Numeric columns - The columns Year, Month, Day, Wind_Vel, Lat, Lon, Time, Delay, Num, and Code must contain only numeric values.
A file is given a "red light" and deemed inappropriate for analysis if it fails checks on required columns, is in an undefined area, incorrect Obs_Types detected, unknown seat code, unrecognized species codes, multiple observers per file, or any of the numeric columns contain non-numerics.
A file is given a "yellow light" that indicates inconsistencies in the file, but with known treatments by the function, if any of several common mistakes occur. These include incorrect swan transcription, reversed seat codes (FR for front right instead of RF), use of older species codes, or lower case observer initials.
If a file sufficiently passes quality checks (receives a green light) and raw2analysis = TRUE, a QCobs (archive quality) .csv file and associated report is produced 2 directories above the path.name specified. This is done according to the file structure proposed in current data management plans. If a file receives a yellow light and raw2analysis = TRUE, the associated report will detail the quality checks that were failed and the specific treatment by the function of the offending data fields before creating the QCobs file. If a preliminary report has already been produced, setting report = FALSE before generating a QCobs file will stop another preliminary report from being generated.
None
Charles Frost, charles_frost@fws.gov
https://github.com/USFWS/AKaerial
Greenlight(path.name = "C:/DATA/MyData.csv", area = "CRD", report = TRUE, raw2analysis = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.