Skip to contents

Extracts and parses datetime information from filenames in the file path column (automatically detected), then adds several useful time-related columns (e.g., date, year, month, hour) to the input data frame.

Usage

birdnet_add_datetime(data, tz = "UTC")

Arguments

data

A data frame containing BirdNET output.

tz

Time zone to assign when parsing datetime. Defaults to "UTC".

Value

A data frame with additional columns:

datetime

POSIXct datetime parsed from the filename.

date

Date portion of the datetime.

year, month, mday, yday, hour, minute

Individual datetime components.

Details

The function uses birdnet_detect_columns to find the column containing file paths based on common name patterns (e.g., "file", "path").

Examples

if (FALSE) { # \dontrun{
combined_data <- birdnet_combine("path/to/BirdNET/output")
data_with_time <- birdnet_add_datetime(combined_data)
} # }