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 ( - "noaa"or- "dbscan")
Details
Methods:
- DBSCAN
- use dbscan clustering algorithm to identify night time and so daytime. 
- NOAA
- use the algorithm provided by the National Oceanic & Atmospheric Administration (NOAA). 
Examples
if (FALSE) {
# load data
data_nes <- get_data("nes")
# night and day calculation
result <- calc_phase_day(rbindlist(data_nes$year_2018,
  use.name = TRUE,
  idcol = TRUE
))
}
