filterEchoData {birdscanR} | R Documentation |
filterEchoData
Description
With the function filterEchoData
the echo data can be
filtered by several parameters. The function returns the filtered echo data.
Usage
filterEchoData(
echoData = NULL,
timeRangeTargetTZ = NULL,
targetTimeZone = "Etc/GMT0",
protocolData = NULL,
classSelection = NULL,
classProbCutOff = NULL,
altitudeRange_AGL = NULL,
manualBlindTimes = NULL,
echoValidator = FALSE
)
Arguments
echoData |
dataframe with the echo data from the data list created by
the function |
timeRangeTargetTZ |
Character vector of length 2, with start and end of time range, formatted as "%Y-%m-%d %H:%M". Echoes outside the time range will be excluded. |
targetTimeZone |
"Etc/GMT0" String specifying the target time zone. Default is "Etc/GMT0". |
protocolData |
dataframe with the protocol data from the data list
created by the function |
classSelection |
character string vector with the classes that should be included. |
classProbCutOff |
numeric cutoff value for class probabilities. Echoes with a lower class probability will be excluded. |
altitudeRange_AGL |
numeric vector of length 2 with start and end of the altitude range. Echoes outside the altitude range will be excluded. |
manualBlindTimes |
dataframe with the manual blind times created by the
function |
echoValidator |
logical, if set to TRUE, echoes labelled by the echo validator as “non-bio scatterer” will be excluded. If set to FALSE, all echoes are included. |
Value
returns the filtered echo data in the same format as provided in the
parameter echoData
.
Author(s)
Fabian Hertner, fabian.hertner@swiss-birdradar.com; Birgen Haest, birgen.haest@vogelwarte.ch
Examples
## Not run:
# Set server, database, and other input settings for data extraction
# ===========================================================================
dbServer = "MACHINE\\SERVERNAME" # Set the name of your SQL server
dbName = "db_Name" # Set the name of your database
dbDriverChar = "SQL Server" # Set either "SQL Server" or "PostgreSQL"
mainOutputDir = file.path(".", "results")
radarTimeZone = "Etc/GMT0"
targetTimeZone = "Etc/GMT0"
listOfRfFeaturesToExtract = c(167, 168)
siteLocation = c(47.494427, 8.716432)
sunOrCivil = "civil"
# Get data
# ===========================================================================
dbData = extractDbData(dbDriverChar = dbDriverChar,
dbServer = dbServer,
dbName = dbName,
saveDbToFile = TRUE,
dbDataDir = mainOutputDir,
radarTimeZone = radarTimeZone,
targetTimeZone = targetTimeZone,
listOfRfFeaturesToExtract = listOfRfFeaturesToExtract,
siteLocation = siteLocation,
sunOrCivil = sunOrCivil)
# Set input settings for filtering of the data
# ===========================================================================
timeRangeData = c("2021-01-15 00:00", "2021-01-31 00:00")
classSelection = c("passerine_type", "wader_type", "swift_type",
"large_bird", "unid_bird", "bird_flock")
classProbCutoff = NULL
altitudeRange = c(50, 1000)
data(manualBlindTimes)
cManualBlindTimes = manualBlindTimes
useEchoValidator = FALSE
# Filter the echo data
# ===========================================================================
filteredEchoData = filterEchoData(echoData = dbData$echoData,
timeRangeTargetTZ = timeRangeData,
targetTimeZone = targetTimeZone,
protocolData - dbData$protocolData,
classSelection = classSelection,
classProbCutOff = classProbCutoff,
altitudeRange_AGL = altitudeRange,
manualBlindTimes = cManualBlindTimes,
echoValidator = useEchoValidator)
## End(Not run)