data-raw/message_types.R

# read raw tsv, trim the character columns and remove empty columns
message_types <- fs::path("data-raw",
                          "message_types",
                          ext = "tsv") |>
  data.table::fread(encoding = "UTF-8") |>
  purrr::modify_if(is.character, trimws, which = "both") |>
  purrr::discard(~is.na(.x) |> all())

# save the package data in the correct format
usethis::use_data(message_types, overwrite = TRUE)
krose/entsoeapi documentation built on June 15, 2025, 1:46 p.m.