| |
| library(shiny) |
| library(bslib) |
| library(bsicons) |
| library(mapgl) |
| library(sf) |
| library(dplyr) |
| library(readr) |
| library(DT) |
| library(httr) |
| library(plotly) |
| library(lubridate) |
| library(shinycssloaders) |
| library(curl) |
| library(stringr) |
| library(purrr) |
| library(arrow) |
| library(shinyjs) |
| library(writexl) |
|
|
|
|
| |
| httr::set_config(httr::config(ssl_verifypeer = FALSE)) |
| |
|
|
| |
| ofm_positron_style <- "https://tiles.openfreemap.org/styles/positron" |
| ofm_bright_style <- "https://tiles.openfreemap.org/styles/bright" |
|
|
| |
| |
| sentinel_url <- "https://tiles.maps.eox.at/wmts/1.0.0/s2cloudless-2023_3857/default/GoogleMapsCompatible/{z}/{y}/{x}.jpg" |
| sentinel_attribution <- '<a href="https://s2maps.eu" target="_blank">Sentinel-2 cloudless - by EOX IT Services GmbH</a> (Contains modified Copernicus Sentinel data 2023)' |
|
|
| |
| for (f in list.files("funs", pattern = "\\.R$", full.names = TRUE)) { |
| source(f) |
| } |
|
|
| |
|
|
| |
| if (!dir.exists("data")) dir.create("data") |
|
|
| |
| station_data_cache_dir <- file.path("data", "station_data") |
| if (dir.exists(station_data_cache_dir)) { |
| unlink(station_data_cache_dir, recursive = TRUE) |
| } |
| dir.create(station_data_cache_dir) |
|
|
| |
| map_cache_dir <- file.path("data", "map_cache") |
| if (dir.exists(map_cache_dir)) { |
| unlink(map_cache_dir, recursive = TRUE) |
| } |
| dir.create(map_cache_dir) |
|
|
| |
| parquet_cache_dir <- file.path("data", "parquet_cache") |
| if (dir.exists(parquet_cache_dir)) { |
| unlink(parquet_cache_dir, recursive = TRUE) |
| } |
| dir.create(parquet_cache_dir) |
|
|
| |
|
|
| |
| mf_index <- NULL |
|
|
| |
| |
| max_year_data <- year(Sys.Date()) |
| default_end_date <- Sys.Date() |
| default_start_date <- as.Date("2026-03-05") |
|
|