This function writes the csv file of the labelled twilight which can be read with TRAINSET https://trainset.raphaelnussbaumer.com/.
Usage
twilight_label_write(
tag,
file = glue::glue("./data/twilight-label/{tag$param$id}.csv"),
quiet = FALSE
)Examples
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |>
tag_label(quiet = TRUE) |>
twilight_create()
label_file <- twilight_label_write(tag, file = tempfile(fileext = ".csv"), quiet = TRUE)
str(utils::read.csv(label_file))
})
#> 'data.frame': 28 obs. of 4 variables:
#> $ series : chr "Rise" "Set" "Rise" "Set" ...
#> $ timestamp: chr "2017-07-27T03:05:00.000Z" "2017-07-27T18:30:00.000Z" "2017-07-28T03:20:00.000Z" "2017-07-28T18:45:00.000Z" ...
#> $ value : num 243 1168 258 1183 238 ...
#> $ label : int 1 1 1 1 1 1 1 1 1 1 ...
