-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopernicus.qmd
More file actions
113 lines (95 loc) · 3.02 KB
/
Copy pathcopernicus.qmd
File metadata and controls
113 lines (95 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
title: "Copernicus / EFFIS"
format:
html:
toc: true
toc-depth: 2
execute:
echo: false
warning: false
message: false
---
```{r}
`%||%` <- function(x, y) {
if (is.null(x) || length(x) == 0 || all(is.na(x))) return(y)
if (length(x) == 1 && is.character(x) && !nzchar(x)) return(y)
x
}
suppressPackageStartupMessages({
library(readr)
library(dplyr)
library(tibble)
library(jsonlite)
})
summary_path <- "data/processed/effis_burnt_areas_summary.csv"
ba_geojson_path <- "assets/effis_ba/effis_burnt_areas.geojson"
summary <- if (file.exists(summary_path)) {
read_csv(summary_path, show_col_types = FALSE)
} else if (file.exists("assets/effis_ba/summary.json")) {
as_tibble(fromJSON("assets/effis_ba/summary.json", simplifyVector = TRUE))
} else {
tibble(
source = "Copernicus/EFFIS Burnt Areas",
generated_at = NA_character_,
n_features = 0L,
max_date = NA_character_,
min_date = NA_character_,
total_area_ha = 0,
bbox = NA_character_,
max_days = 90,
min_area_ha = 5,
simplify_m = 100,
raw_zip = NA_character_,
asset_geojson = ba_geojson_path
)
}
for (col in c("simplify_m", "asset_geojson")) {
if (!col %in% names(summary)) summary[[col]] <- NA
}
fmt_num <- function(x) format(x, big.mark = ".", decimal.mark = ",", scientific = FALSE)
```
## Estado
::: {.grid}
::: {.g-col-12 .g-col-md-3}
**Áreas quemadas**
`r fmt_num(summary$n_features[1])`
:::
::: {.g-col-12 .g-col-md-3}
**Superficie total estimada**
`r fmt_num(round(summary$total_area_ha[1], 1))` ha
:::
::: {.g-col-12 .g-col-md-3}
**Fecha más reciente**
`r summary$max_date[1] %||% "Sin datos"`
:::
::: {.g-col-12 .g-col-md-3}
**Última generación**
`r summary$generated_at[1] %||% "Sin datos"`
:::
:::
## Fuente
Esta página resume la integración de **Copernicus/EFFIS Burnt Areas**. En el mapa principal, la geometría se descarga únicamente cuando el usuario activa la capa, evitando incrustar todo el GeoJSON dentro del HTML.
```{r}
summary |>
select(source, n_features, min_date, max_date, total_area_ha, bbox, max_days, min_area_ha, simplify_m) |>
knitr::kable()
```
## Ficheros publicados
```{r}
files <- tibble(
fichero = c(
"data/processed/effis_burnt_areas_summary.csv",
"assets/effis_ba/effis_burnt_areas.geojson",
"assets/effis_ba/summary.json"
),
existe = file.exists(fichero),
size_kb = ifelse(file.exists(fichero), round(file.info(fichero)$size / 1024, 1), NA_real_)
)
files |> knitr::kable()
```
## Nota metodológica
- **AEMET** sigue siendo la capa principal de peligro previsto para España.
- **NASA FIRMS** muestra detecciones térmicas recientes.
- **Copernicus/EFFIS Burnt Areas** aporta perímetros o áreas quemadas como contexto de daños y evolución.
- Para limitar el volumen publicado, se filtran por antigüedad y superficie y se simplifica la geometría en una proyección métrica.
- **EFFIS FWI WMS** se mantiene como diagnóstico, pero no se publica como capa operativa mientras no haya una combinación actual de `LAYER` + `TIME` con contenido visual fiable.