
Determine the different phases of the day
calc_phase_day.Rd
This function can estimate day-time and night-time based on
light level (dbscan
) or using the location and time data (noaa
).
Usage
calc_phase_day(
dataset,
light = "lightatsurf",
date = "date",
id = ".id",
lon = "lon",
lat = "lat",
method = "noaa"
)
Arguments
- dataset
A dataset containing the light level per individual per time
- light
Name of the light-level column
- date
Name of the datetime column
- id
Name of the individual ID column
- lon
Name of the Longitude column
- lat
Name of the Latitude column
- method
Method used to identify phases of day
Details
Methods:
* DBSCAN: use the dbscan clustering algorithm to identify night time and so daytime. * NOAA: using the algorithms provided by the Notional Oceanic & Atmospheric Administration (NOAA) * ...: to be implemented
Examples
if (FALSE) {
# load data
data("data_nes")
# night and day calculation
result <- calc_phase_day(rbindlist(data_nes$year_2018,
use.name = TRUE,
idcol = TRUE
))
}