View source: R/twilight_create.R
twilight_create | R Documentation |
This function estimate twilight (i.e., datetime of sunrise and sunset) by searching for the first
and last light of the day which is defined by the light exceeds or
falls below the light threshold twl_thr
.
twilight_create(tag, twl_thr = NULL, twl_offset = NULL, transform_light = TRUE)
tag |
a GeoPressureR |
twl_thr |
Light threshold that defines twilight. By default ( |
twl_offset |
Shift of the middle of the night compared to 00:00 UTC (in hours). If not provided, it uses the middle of all nights. |
transform_light |
logical to use a log transformation of light |
a tag
list containing a new data.frame twilight
with columns:
twilight
(date-time of twilight)
rise
(logical) indicating sunrise (TRUE
) or sunset (FALSE
).
stap_id
if stap_id
is present in light
.
GeoPressureManual , TwGeos::findTwilights()
Other geolight:
geolight_map()
,
twilight_label_read()
,
twilight_label_write()
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |> tag_label(quiet = TRUE)
})
# Create twilight data.frame
tag <- twilight_create(tag)
str(tag$twilight)
plot(tag, type = "twilight")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.