View source: R/birdnet_format.R
birdnet_format | R Documentation |
Reformats BirdNET outputs with a "recordingID" column for easier data manipulation, a "verify" column to support manual verification of detection results, and a "timezone" column to clarify the timezone setting used by the audio recorder.
birdnet_format(results.directory, timezone)
results.directory |
Path to directory where raw BirdNET result files have been stored. This directory should not contain anything aside from BirdNET results, otherwise the function may have unintended behavior. All results in a single folder should either be .txt or .csv files from |
timezone |
Timezone setting used in the audio recorder (e.g, "GMT"). This argument allows you to specify the timezone shown by the wave filename. If recordings were taken in local time at your study site, specify an Olson-names-formatted character timezone for the location (e.g., "America/Los_Angeles"). If recordings were taken in GMT, you can put either "GMT" or "UTC" (both are acceptable in R for downstream date-time formatting). This argument is critical to foster clarity in data analysis through the years and across monitoring locations, because some projects may vary across time and space as to whether the standard operating procedure specifies recordings in GMT vs. local time. |
This function was developed by the National Park Service Natural Sounds and Night Skies Division to process audio data using BirdNET. It was developed for use on Windows. CSV encodings may vary based on platform and result in errors.
Saves a new formatted file of BirdNET results with filename inclusion "formatted" and suffix "txt" or "csv" depending on input.
Output contains the following columns:
filepath: Filepath for the processed audio file.
start: Start time of detection in seconds.
end: End time of detection in seconds.
scientific_name: Species scientific name.
common_name: Species common name.
confidence: BirdNET's confidence level in this detection ranging from 0 (least confident) to 1 (most confident).
lat: Latitude input used.
long: Longitude input used.
week: Week of year.
overlap: Overlap input used.
sensitivity: Sensitivity input used.
min_conf: Minimum confidence input used.
species_list: Species list used.
model: BirdNET model used.
recordingID: Recording identifier for the file, e.g., SITE_YYYYMMDD_HHMMSS.wav.
verify: A column into which verifications may be populated. When initially created, will be 'NA'.
timezone: Timezone setting used in the audio recorder.
birdnet_analyzer
, birdnet_verify
## Not run:
# Create a BirdNET results directory for this example
dir.create('example-results-directory')
# Write examples of raw BirdNET outputs to example results directory
data(exampleBirdNET1)
write.table(
x = exampleBirdNET1,
file = 'example-results-directory/Rivendell_20210623_113602.BirdNET.results.r.csv',
row.names = FALSE, quote = FALSE, sep = ','
)
data(exampleBirdNET2)
write.table(
x = exampleBirdNET2,
file = 'example-results-directory/Rivendell_20210623_114602.BirdNET.results.r.csv',
row.names = FALSE, quote = FALSE, sep = ','
)
# Run birdnet_format:
birdnet_format(
results.directory = 'example-results-directory',
timezone = 'GMT'
)
# Delete all temporary example files when finished
unlink(x = 'example-results-directory', recursive = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.