This function creates VPTS CSV output files in line with the ALOFT data standard, described here. Note that this function only works on Birdscan MR1 database versions >= 1.7.0.4 as the variable feature37.speed is required for the density calculation.
Usage
createVPTS(
dbName,
outputDir,
echoes,
classSelection = c("passerine_type", "wader_type", "swift_type", "large_bird",
"unid_bird", "bird_flock"),
altitudeRange = c(50, 1500),
altitudeBinSize = 50,
timeRange,
timeBinDuration_sec = 900,
timeZone = "Etc/GMT0",
protocolData,
visibilityData,
siteData,
sunriseSunset,
manualBlindTimes = NULL,
saveBlindTimes = FALSE,
blindTimesOutputDir = getwd(),
blindTimeAsMtrZero = NULL,
propObsTimeCutoff = 0.2
)
Arguments
- dbName
Character string, containing the name of the database you are processing
- outputDir
Character variable indicating where you want the VPTS files to be stored. The function will create a subdirectory called "vpts" within the specified
outputDir
.- echoes
dataframe with the echo data from the data list created with
extractDbData()
or a subset of it created by the function- classSelection
character string vector with all classes which should be used to calculate the density. The density and number of Echoes will be calculated for each class as well as for all classes together.
- altitudeRange
numeric vector of length 2 with the start and end of the altitude range in meter a.g.l.
- altitudeBinSize
numeric, size of the altitude bins in meter.
- timeRange
Character vector of length 2, with start and end of time range, formatted as "%Y-%m-%d %H:%M"
- timeBinDuration_sec
duration of timeBins in seconds (numeric). for values <= 0 a duration of 1 hour will be set
- timeZone
time zone in which the time bins should be created as string, e.g. "Etc/GMT0"
- protocolData
dataframe with the protocol data from the data list created by
extractDbData()
or a subset of it created by the functionfilterProtocolData()
.- visibilityData
dataframe with the visibility data from the data list created by
extractDbData()
.- siteData
A data frame holding the site table, as extracted with
extractDbData()
orgetSiteTable()
.- sunriseSunset
dataframe with sunrise/sunset, and civil and nautical dawn/dusk. Computed with
twilight()
.- manualBlindTimes
dataframe with the manual blind times created by the function
loadManualBlindTimes()
.- saveBlindTimes
Logical, determines whether to save the blind times to a file. Default: False.
- blindTimesOutputDir
Character string containing the path to save the blind times to. Default: 'your-working-directory'
- blindTimeAsMtrZero
character string vector with the blind time types which should be treated as observation time with MTR zero.
- propObsTimeCutoff
numeric between 0 and 1. Time bins with a proportional observation time smaller than
propObsTimeCutoff
are set to NA.
See also
Other manipulation functions:
addDayNightInfoPerEcho()
,
computeDensity()
,
computeMTR()
,
convertTimeZone()
,
filterSpeedFeature37()
,
mergeVisibilityAndManualBlindTimes()
,
reclassToBats()
,
twilight()