id <- "18LX"
knitr::opts_knit$set(root.dir = here::here())
library(GeoPressureR)
library(ggplot2)12 Twilight label
Tip
Delete this block when you have read!
If you don’t have light data, delete this file!
- These scripts should be adapted based on your project, but the same script should run for all your tags. You can always check the original version online.
- Make sure you’ve read the GeoPressureManual, in particular the twilight labeling instructions, before running this script
- Nothing is saved at the end of the script and it is meant to be like that. Only twilight label file and config.yml should be edited. Use
10-geopressuretemplate.Rfor the final run.
12.1 Create tag
Make sure you have already created the label file with the “1-label.qmd” script.
tag <- tag_create(
id,
crop_start = config::get("tag_create", id)$crop_start,
crop_end = config::get("tag_create", id)$crop_end,
quiet = TRUE
) |>
tag_label(quiet = TRUE) |>
tag_set_map(
extent = config::get("tag_set_map", id)$extent,
scale = config::get("tag_set_map", id)$scale,
known = config::get("tag_set_map", id)$known
)12.2 Create Twilight
Generate the twilight automatically. Check that twl_offset allows for night/day being centered on the figure, otherwise edit accordingly
tag <- twilight_create(
tag,
twl_offset = config::get("twilight_create", id)$twl_offset
)Warning: ! 1 twilights are set at midnight (relative to `twl_offset`).
i There is likely a problem with `twl_offset = -0.0327003999197384`.
plot(tag, type = "twilight")