Calculation of climatic indicators
V01-climatic_indicators.Rmd
The aim of this vignette is to show the calculation of all statistical indicators only related to meteorological data (indicator evolving flow are excluded).
library(CARD)
#> Loading required package: EXstat
library(airGRdatasets)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
Presentation of the dataset
The package airGRdatasets provides time series for gauging stations located on Metropolitan French territory.
The river basins present in this package are:
# Get all data sets in the package
station_ids <- ls("package:airGRdatasets")
# Create a table with meta data of each gauging station
station_metadata <- dplyr::bind_rows(
lapply(station_ids,
function(id){
data <- base::get(id)
data.frame(CodeH3 = data$Meta$Code$H3,
Name = data$Meta$Name,
Latitude = data$Meta$Coor$Y,
Longitude = data$Meta$Coor$X,
start = first(data$TS$Date),
end = last(data$TS$Date))
})
)
knitr::kable(station_metadata)
CodeH3 | Name | Latitude | Longitude | start | end |
---|---|---|---|---|---|
A273011002 | La Bruche à Russ [Wisches] | 48.50507 | 7.27510 | 1999-01-01 | 2018-12-31 |
A605102001 | La Meurthe à Saint-Dié-des-Vosges | 48.28472 | 6.95606 | 1999-01-01 | 2018-12-31 |
B222001001 | La Meuse à Saint-Mihiel | 48.87090 | 5.53099 | 1999-01-01 | 2018-12-31 |
E540031001 | La Canche à Brimeux | 50.44827 | 1.83080 | 1999-01-01 | 2018-12-31 |
E645651001 | La Nièvre à l’Étoile | 50.00921 | 2.04971 | 1999-01-01 | 2018-12-31 |
F439000101 | Le Loing à Épisy | 48.33755 | 2.78710 | 1999-01-01 | 2018-12-31 |
H010002001 | La Seine à Plaines-Saint-Lange | 47.99599 | 4.48061 | 1999-01-01 | 2018-12-31 |
H120101001 | L’Aube à Bar-sur-Aube | 48.21864 | 4.73602 | 1999-01-01 | 2018-12-31 |
H622101001 | L’Aisne à Givry | 49.49201 | 4.53770 | 1999-01-01 | 2018-12-31 |
J171171001 | Le Trieux à Saint-Péver - Pont Locminé | 48.48336 | -3.11467 | 1999-01-01 | 2018-12-31 |
J421191001 | L’Odet à Ergué-Gabéric - Treodet | 48.00625 | -4.06374 | 1999-01-01 | 2018-12-31 |
K134181001 | L’Arroux à Rigny-sur-Arroux | 46.53406 | 4.03291 | 1999-01-01 | 2018-12-31 |
K265401001 | La Couze Pavin à Saint-Floret | 45.55077 | 3.11012 | 1999-01-01 | 2018-12-31 |
K731261001 | L’Indre à Saint-Cyran-du-Jambot | 47.01712 | 1.12650 | 1999-01-01 | 2018-12-31 |
V123521001 | L’Ire à Doussard | 45.78309 | 6.22419 | 1999-01-01 | 2018-12-31 |
X031001001 | La Durance à Embrun [La Clapière] - DREAL PACA | 44.55218 | 6.48784 | 1999-01-01 | 2018-12-31 |
X045401001 | L’Ubaye au Lauzet-Ubaye [Roche-Rousse] - DREAL PACA | 44.45007 | 6.40111 | 1999-01-01 | 2018-12-31 |
Y643401001 | L’Esteron au Broc [La Clave] | 43.84653 | 7.15666 | 1999-01-01 | 2018-12-31 |
Y862000101 | Le Taravo à Zigliara [Pont d’Abra] | 41.80990 | 8.95951 | 1999-01-01 | 2018-12-31 |
We select randomly 3 stations for this vignette.
sel_ids <- sample(station_ids, size = 3)
sel_ids
#> [1] "K265401001" "K134181001" "E645651001"
And we concat and format the data of these three stations:
df_ts <- dplyr::bind_rows(
lapply(sel_ids,
function(id){
df <- base::get(id)$TS
df$id <- id
return(df)
})
)
df_ts$Date <- as.Date(df_ts$Date) # Convert to date format
str(df_ts)
#> 'data.frame': 21915 obs. of 7 variables:
#> $ Date: Date, format: "1999-01-01" "1999-01-02" ...
#> $ Ptot: num 0.2 18.9 22.5 0.5 0 0 1.8 16.6 3.4 11.8 ...
#> $ Temp: num 3.8 3.1 4.2 6.1 8.5 8.3 6.1 3 -0.6 -4 ...
#> $ Evap: num 0.4 0.3 0.4 0.5 0.6 0.6 0.5 0.3 0.2 0 ...
#> $ Qls : int 3120 3150 5380 6440 5330 4990 4640 5190 5460 4810 ...
#> $ Qmmd: num 1.25 1.26 2.15 2.57 2.13 ...
#> $ id : chr "K265401001" "K265401001" "K265401001" "K265401001" ...
Statistical indicators for temperatures
We list all available indicators for temperature data.
We use the function CARD_list_all()
to get the complete
list of available indicators.
metaEX_all = CARD_list_all()
str(metaEX_all)
#> tibble [563 × 23] (S3: tbl_df/tbl/data.frame)
#> $ CARD_name : chr [1:563] "ETPA" "BFI_Wal" "BFM" "delta{BFI}_LH_H1" ...
#> $ variable_en : chr [1:563] "ETPA" "BFI_Wal" "BFM" "delta{BFI}_LH_H1" ...
#> $ unit_en : chr [1:563] "mm" "without unit" "without unit" "without unit" ...
#> $ name_en : chr [1:563] "Cumulative annual evapotranspiration" "Baseflow index" "Baseflow magnitude" "Change of baseflow index between the near horizon and historical period (Lyne and Hollick)" ...
#> $ description_en : chr [1:563] "" "Ratio between mean inter-annual base flow and mean inter-annual flow" "" "Ratio between mean inter-annual base flow and mean inter-annual flow" ...
#> $ method_en : chr [1:563] "" "1. no temporal aggregation - extraction of the base flow (Wallingford)\n2. no temporal aggregation - calculatio"| __truncated__ "1. no temporal aggregation - extraction of the base flow (Wallingford)\n2. aggregation by day of the year - ave"| __truncated__ "1. no temporal aggregation - extraction of the base flow (Lyne and Hollick)\n2. no temporal aggregation - calcu"| __truncated__ ...
#> $ sampling_period_en : chr [1:563] "09-01, 08-31" NA NA NA ...
#> $ topic_en : chr [1:563] "Evapotranspiration, Average, Intensity" "Flow, Base Flow, Intensity" "Flow, Base Flow, Intensity" "Flow, Base Flow, Intensity" ...
#> $ variable_fr : chr [1:563] "ETPA" "BFI_Wal" "BFM" "delta{BFI}_LH_H1" ...
#> $ unit_fr : chr [1:563] "mm" "sans unité" "sans unité" "sans unité" ...
#> $ name_fr : chr [1:563] "Cumul des évapotranspirations annuelles" "Indice de débit de base" "Magnitude du débit de base" "Changement de l'indice de débit de base entre l'horizon proche et la période historique (Lyne et Hollick)" ...
#> $ description_fr : chr [1:563] "" "Rapport entre débit de base moyen inter-annuel et débit moyen inter-annuel" "" "Rapport entre débit de base moyen inter-annuel et débit moyen inter-annuel" ...
#> $ method_fr : chr [1:563] "" "1. aucune agrégation temporelle - extraction du débit de base (Wallingford)\n2. aucune agrégation temporelle - calcul du BFI" "1. aucune agrégation temporelle - extraction du débit de base (Wallingford)\n2. agrégation par jour de l’année "| __truncated__ "1. aucune agrégation temporelle - extraction du débit de base (Lyne et Hollick)\n2. aucune agrégation temporell"| __truncated__ ...
#> $ sampling_period_fr : chr [1:563] "01-09, 31-08" NA NA NA ...
#> $ topic_fr : chr [1:563] "Évapotranspiration, Moyenne, Intensité" "Débit, Débit de Base, Intensité" "Débit, Débit de Base, Intensité" "Débit, Débit de Base, Intensité" ...
#> $ is_experimental : logi [1:563] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> $ input_vars : chr [1:563] "ETP" "Q" "Q" "Q" ...
#> $ source : chr [1:563] NA "TALLAKSEN, L. et H. VAN LANEN, éd. (2004). Hydrological drought. Processes and estimation methods for streamflo"| __truncated__ "TALLAKSEN, L. et H. VAN LANEN, éd. (2004). Hydrological drought. Processes and estimation methods for streamflo"| __truncated__ NA ...
#> $ preferred_sampling_period: chr [1:563] NA NA NA NA ...
#> $ is_date : logi [1:563] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> $ to_normalise : logi [1:563] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> $ palette : chr [1:563] "#452C1A #7F4A23 #B3762A #D4B86A #EFE0B0 #BCE6DB #7ACEB9 #449C93 #2A6863 #193830" NA NA NA ...
#> $ script_path : chr [1:563] "Evapotranspiration/ETPA.R" "Flow/Baseflow/criteria/BFI_Wal.R" "Flow/Baseflow/criteria/BFM.R" "Flow/Baseflow/criteria/delta{BFI}_LH_H.R" ...
On which we can filter criteria on temperatures:
metaEX_temp <- metaEX_all %>%
filter(grepl("Temperature", topic_en),
!grepl("Sensitivity_to_Climate_Variability", script_path))
knitr::kable(metaEX_temp %>% select("variable_en", "name_en"))
variable_en | name_en |
---|---|
meanTA | Average of annual average temperatures |
meanTSA_DJF | Average temperatures of each winter (months of December, January and February) |
meanTSA_MAM | Average temperatures of each spring (months of March, April and May) |
meanTSA_JJA | Average temperatures of each summer (months of June, July and August) |
meanTSA_SON | Average temperatures of each fall (months of September, October and November) |
TA | Annual mean temperature |
TMA_jan | Average daily temperatures for each January |
TMA_feb | Average daily temperatures for each February |
TMA_mar | Average daily temperatures for each March |
TMA_apr | Average daily temperatures for each April |
TMA_may | Average daily temperatures for each May |
TMA_jun | Average daily temperatures for each June |
TMA_jul | Average daily temperatures for each July |
TMA_aug | Average daily temperatures for each August |
TMA_sep | Average daily temperatures for each September |
TMA_oct | Average daily temperatures for each October |
TMA_nov | Average daily temperatures for each November |
TMA_dec | Average daily temperatures for each December |
TSA_DJF | Annual winter temperatures |
TSA_MAM | Annual spring temperatures |
TSA_JJA | Annual summer temperatures |
TSA_SON | Annual autumn temperatures |
Then, we format the data for the function
CARD_extraction()
.
df_temp <- df_ts %>%
select("Date", "id", "Temp") %>%
rename(T = "Temp")
str(df_temp)
#> 'data.frame': 21915 obs. of 3 variables:
#> $ Date: Date, format: "1999-01-01" "1999-01-02" ...
#> $ id : chr "K265401001" "K265401001" "K265401001" "K265401001" ...
#> $ T : num 3.8 3.1 4.2 6.1 8.5 8.3 6.1 3 -0.6 -4 ...
And run the extraction of indicators!
res_temp <- CARD_extraction(
df_temp,
CARD_name = metaEX_temp$variable_en
)
str(res_temp)
#> List of 2
#> $ metaEX: tibble [2 × 20] (S3: tbl_df/tbl/data.frame)
#> ..$ variable_en : chr [1:2] "meanTA" "TA"
#> ..$ unit_en : chr [1:2] "°C" "°C"
#> ..$ name_en : chr [1:2] "Average of annual average temperatures" "Annual mean temperature"
#> ..$ description_en : chr [1:2] "" ""
#> ..$ method_en : chr [1:2] "1. annual aggregation [09-01, 08-31] - mean\n2. no temporal aggregation - average" ""
#> ..$ sampling_period_en: chr [1:2] "09-01, 08-31" "09-01, 08-31"
#> ..$ topic_en : chr [1:2] "Temperature, Average, Intensity" "Temperature, Average, Intensity"
#> ..$ variable_fr : chr [1:2] "moyTA" "TA"
#> ..$ unit_fr : chr [1:2] "°C" "°C"
#> ..$ name_fr : chr [1:2] "Moyenne des températures moyennes annuelles" "Température moyenne annuelle"
#> ..$ description_fr : chr [1:2] "" ""
#> ..$ method_fr : chr [1:2] "1. agrégation annuelle [01-09, 31-08] - moyenne\n2. aucune agrégation temporelle - moyenne" ""
#> ..$ sampling_period_fr: chr [1:2] "01-09, 31-08" "01-09, 31-08"
#> ..$ topic_fr : chr [1:2] "Température, Moyenne, Intensité" "Température, Moyenne, Intensité"
#> ..$ is_experimental : logi [1:2] FALSE FALSE
#> ..$ input_vars : chr [1:2] "Q" "T"
#> ..$ is_date : logi [1:2] FALSE FALSE
#> ..$ to_normalise : logi [1:2] FALSE FALSE
#> ..$ palette : chr [1:2] "#053061 #2166AC #4393C3 #92C5DE #D1E5F0 #FDDBC7 #F4A582 #D6604D #B2182B #67001F" "#053061 #2166AC #4393C3 #92C5DE #D1E5F0 #FDDBC7 #F4A582 #D6604D #B2182B #67001F"
#> ..$ script_path : chr [1:2] "Temperature/meanTA.R" "Temperature/TA.R"
#> $ dataEX:List of 2
#> ..$ meanTA: tibble [3 × 2] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:3] "E645651001" "K134181001" "K265401001"
#> .. ..$ meanTA: num [1:3] 10.51 10.28 7.83
#> ..$ TA : tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date: Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ TA : num [1:63] NA 10.5 10.7 10.6 10.9 ...
Statistical indicators for potential evapotranspiration
We select all criteria on evaporation except the one evolving flow.
metaEX_evap <- metaEX_all %>%
filter(grepl("Evapotranspiration", topic_en),
!grepl("Flow", topic_en))
knitr::kable(metaEX_evap %>% select("variable_en", "name_en"))
variable_en | name_en |
---|---|
ETPA | Cumulative annual evapotranspiration |
Then, we format the data and run the function
CARD_extraction()
.
df_evap <- df_ts %>%
select("Date", "id", "Evap") %>%
rename(ETP = "Evap") # R is the precipitation variable in the dataframe
str(df_evap)
#> 'data.frame': 21915 obs. of 3 variables:
#> $ Date: Date, format: "1999-01-01" "1999-01-02" ...
#> $ id : chr "K265401001" "K265401001" "K265401001" "K265401001" ...
#> $ ETP : num 0.4 0.3 0.4 0.5 0.6 0.6 0.5 0.3 0.2 0 ...
res_evap <- CARD_extraction(
df_evap,
CARD_name = metaEX_evap$variable_en
)
str(res_evap)
#> List of 2
#> $ metaEX: tibble [1 × 20] (S3: tbl_df/tbl/data.frame)
#> ..$ variable_en : chr "ETPA"
#> ..$ unit_en : chr "mm"
#> ..$ name_en : chr "Cumulative annual evapotranspiration"
#> ..$ description_en : chr ""
#> ..$ method_en : chr ""
#> ..$ sampling_period_en: chr "09-01, 08-31"
#> ..$ topic_en : chr "Evapotranspiration, Average, Intensity"
#> ..$ variable_fr : chr "ETPA"
#> ..$ unit_fr : chr "mm"
#> ..$ name_fr : chr "Cumul des évapotranspirations annuelles"
#> ..$ description_fr : chr ""
#> ..$ method_fr : chr ""
#> ..$ sampling_period_fr: chr "01-09, 31-08"
#> ..$ topic_fr : chr "Évapotranspiration, Moyenne, Intensité"
#> ..$ is_experimental : logi FALSE
#> ..$ input_vars : chr "ETP"
#> ..$ is_date : logi FALSE
#> ..$ to_normalise : logi FALSE
#> ..$ palette : chr "#452C1A #7F4A23 #B3762A #D4B86A #EFE0B0 #BCE6DB #7ACEB9 #449C93 #2A6863 #193830"
#> ..$ script_path : chr "Evapotranspiration/ETPA.R"
#> $ dataEX:List of 1
#> ..$ ETPA: tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date: Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ ETPA: num [1:63] NA 651 655 650 683 ...
Statistical indicators for precipitations
We select all criteria on precipitations except:
- criteria using flow,
- criteria related to parametrization, sensitivity to climate variability, or ratio
- criteria related to liquid or solid precipitations
metaEX_prec <- metaEX_all %>%
filter(grepl("Precipitation", topic_en),
!grepl("Flow|Parameterization|Sensitivity to Climate Variability|Ratio", topic_en),
!grepl("liquid|solid|Annual precipitation", name_en))
knitr::kable(metaEX_prec %>% select("variable_en", "name_en"))
variable_en | name_en |
---|---|
dtCDDA | Maximum number of consecutive dry days in the year |
dtCDDMA_jan | Maximum number of consecutive dry days in each January |
dtCDDMA_feb | Maximum number of consecutive dry days in each February |
dtCDDMA_mar | Maximum number of consecutive dry days in each March |
dtCDDMA_apr | Maximum number of consecutive dry days in each April |
dtCDDMA_may | Maximum number of consecutive dry days in each May |
dtCDDMA_jun | Maximum number of consecutive dry days in each June |
dtCDDMA_jul | Maximum number of consecutive dry days in each July |
dtCDDMA_aug | Maximum number of consecutive dry days in each August |
dtCDDMA_sep | Maximum number of consecutive dry days in each September |
dtCDDMA_oct | Maximum number of consecutive dry days in each October |
dtCDDMA_nov | Maximum number of consecutive dry days in each November |
dtCDDMA_dec | Maximum number of consecutive dry days in each December |
dtCDDSA_DJF | Maximum number of consecutive dry days in winter |
dtCDDSA_MAM | Maximum number of consecutive dry days in spring |
dtCDDSA_JJA | Maximum number of consecutive dry days in summer |
dtCDDSA_SON | Maximum number of consecutive dry days in autumn |
dtCWDA | Maximum number of consecutive rainy days in the year |
dtCWDMA_jan | |
dtCWDMA_feb | |
dtCWDMA_mar | |
dtCWDMA_apr | |
dtCWDMA_may | |
dtCWDMA_jun | |
dtCWDMA_jul | |
dtCWDMA_aug | |
dtCWDMA_sep | |
dtCWDMA_oct | |
dtCWDMA_nov | |
dtCWDMA_dec | |
dtCWDSA_DJF | Maximum number of consecutive rainy days in winter |
dtCWDSA_MAM | Maximum number of consecutive rainy days in spring |
dtCWDSA_JJA | Maximum number of consecutive rainy days in summer |
dtCWDSA_SON | Maximum number of consecutive rainy days in autumn |
dtRA01mm | Number of rainy days in the year |
dtRA20mm | Number of heavy rain days in the year |
dtRA50mm | Number of extreme rain days in the year |
dtRMA01mm_jan | Number of rainy days of each January |
dtRMA01mm_feb | Number of rainy days of each February |
dtRMA01mm_mar | Number of rainy days of each March |
dtRMA01mm_apr | Number of rainy days of each April |
dtRMA01mm_may | Number of rainy days of each May |
dtRMA01mm_jun | Number of rainy days of each June |
dtRMA01mm_jul | Number of rainy days of each July |
dtRMA01mm_aug | Number of rainy days of each August |
dtRMA01mm_sep | Number of rainy days of each September |
dtRMA01mm_oct | Number of rainy days of each October |
dtRMA01mm_nov | Number of rainy days of each November |
dtRMA01mm_dec | Number of rainy days of each December |
dtRMA20mm_jan | Number of heavy rain days for each January |
dtRMA20mm_feb | Number of heavy rain days for each February |
dtRMA20mm_mar | Number of heavy rain days for each March |
dtRMA20mm_apr | Number of heavy rain days for each April |
dtRMA20mm_may | Number of heavy rain days for each May |
dtRMA20mm_jun | Number of heavy rain days for each June |
dtRMA20mm_jul | Number of heavy rain days for each July |
dtRMA20mm_aug | Number of heavy rain days for each August |
dtRMA20mm_sep | Number of heavy rain days for each September |
dtRMA20mm_oct | Number of heavy rain days for each October |
dtRMA20mm_nov | Number of heavy rain days for each November |
dtRMA20mm_dec | Number of heavy rain days for each December |
dtRMA50mm_jan | Number of extreme rain days for each January |
dtRMA50mm_feb | Number of extreme rain days for each February |
dtRMA50mm_mar | Number of extreme rain days for each March |
dtRMA50mm_apr | Number of extreme rain days for each April |
dtRMA50mm_may | Number of extreme rain days for each May |
dtRMA50mm_jun | Number of extreme rain days for each June |
dtRMA50mm_jul | Number of extreme rain days for each July |
dtRMA50mm_aug | Number of extreme rain days for each August |
dtRMA50mm_sep | Number of extreme rain days for each September |
dtRMA50mm_oct | Number of extreme rain days for each October |
dtRMA50mm_nov | Number of extreme rain days for each November |
dtRMA50mm_dec | Number of extreme rain days for each December |
dtRSA01mm_DJF | Number of rainy days in winter |
dtRSA01mm_MAM | Number of rainy days in spring |
dtRSA01mm_JJA | Number of rainy days in summer |
dtRSA01mm_SON | Number of rainy days in autumn |
dtRSA20mm_DJF | Number of heavy rain days in winter |
dtRSA20mm_MAM | Number of heavy rain days in spring |
dtRSA20mm_JJA | Number of heavy rain days in summer |
dtRSA20mm_SON | Number of heavy rain days in autumn |
dtRSA50mm_DJF | Number of extreme rain days in winter |
dtRSA50mm_MAM | Number of extreme rain days in spring |
dtRSA50mm_JJA | Number of extreme rain days in summer |
dtRSA50mm_SON | Number of extreme rain days in autumn |
meanRA | Mean of annual total precipitation accumulations |
meanRA_DJF | Average total precipitations of each winter (months of December, January and February) |
meanRA_MAM | Average total precipitations of each spring (months of March, April and May) |
meanRA_JJA | Average total precipitations of each summer (months of June, July and August) |
meanRA_SON | Average total precipitations of each fall (months of September, October and November) |
RCXA1 | Annual maximum of daily precipitation |
RCXA5 | Annual maximum of 5-day cumulative daily precipitation |
RMA_jan | Cumulative daily precipitation for each January |
RMA_feb | Cumulative daily precipitation for each February |
RMA_mar | Cumulative daily precipitation for each March |
RMA_apr | Cumulative daily precipitation for each April |
RMA_may | Cumulative daily precipitation for each May |
RMA_jun | Cumulative daily precipitation for each June |
RMA_jul | Cumulative daily precipitation for each July |
RMA_aug | Cumulative daily precipitation for each August |
RMA_sep | Cumulative daily precipitation for each September |
RMA_oct | Cumulative daily precipitation for each October |
RMA_nov | Cumulative daily precipitation for each November |
RMA_dec | Cumulative daily precipitation for each December |
RSA_DJF | Cumulative daily precipitation of each winter |
RSA_MAM | Cumulative daily precipitation of each spring |
RSA_JJA | Cumulative daily precipitation of each summer |
RSA_SON | Cumulative daily precipitation of each autumn |
Then, we format the data and run the function
CARD_extraction()
.
df_prec <- df_ts %>%
select("Date", "id", "Ptot") %>%
rename(R = "Ptot") # R is the precipitation variable in the dataframe
str(df_prec)
#> 'data.frame': 21915 obs. of 3 variables:
#> $ Date: Date, format: "1999-01-01" "1999-01-02" ...
#> $ id : chr "K265401001" "K265401001" "K265401001" "K265401001" ...
#> $ R : num 0.2 18.9 22.5 0.5 0 0 1.8 16.6 3.4 11.8 ...
res_prec <- CARD_extraction(
df_prec,
CARD_name = metaEX_prec$variable_en
)
str(res_prec)
#> List of 2
#> $ metaEX: tibble [7 × 20] (S3: tbl_df/tbl/data.frame)
#> ..$ variable_en : chr [1:7] "dtCDDA" "dtCWDA" "dtRA01mm" "dtRA20mm" ...
#> ..$ unit_en : chr [1:7] "day" "day" "day" "day" ...
#> ..$ name_en : chr [1:7] "Maximum number of consecutive dry days in the year" "Maximum number of consecutive rainy days in the year" "Number of rainy days in the year" "Number of heavy rain days in the year" ...
#> ..$ description_en : chr [1:7] "Maximum number of consecutive days in the year with less than 1 mm of precipitation" "Maximum number of consecutive days in the year with at least 1 mm of precipitation" "Number of days with at least 1 mm of precipitation" "Number of days with at least 20 mm of precipitation" ...
#> ..$ method_en : chr [1:7] "" "" "" "" ...
#> ..$ sampling_period_en: chr [1:7] "09-01, 08-31" "09-01, 08-31" "09-01, 08-31" "09-01, 08-31" ...
#> ..$ topic_en : chr [1:7] "Precipitations, Dry Period, Duration" "Precipitations, Low, Duration" "Precipitations, Low, Duration" "Precipitations, Heavy, Duration" ...
#> ..$ variable_fr : chr [1:7] "dtCDDA" "dtCWDA" "dtRA01mm" "dtRA20mm" ...
#> ..$ unit_fr : chr [1:7] "jour" "jour" "jour" "jour" ...
#> ..$ name_fr : chr [1:7] "Nombre maximal de jours secs consécutifs dans l'année" "Nombre maximal de jours pluvieux consécutifs dans l'année" "Nombre de jours pluvieux dans l'année" "Nombre de jours de forte pluie dans l'année" ...
#> ..$ description_fr : chr [1:7] "Nombre maximal de jours consécutifs dans l'année avec moins de 1 mm de précipitation" "Nombre maximal de jours consécutifs dans l'année avec au moins 1 mm de précipitation" "Nombre de jours avec au moins 1 mm de précipitations" "Nombre de jours avec au moins 20 mm de précipitations" ...
#> ..$ method_fr : chr [1:7] "" "" "" "" ...
#> ..$ sampling_period_fr: chr [1:7] "01-09, 31-08" "01-09, 31-08" "01-09, 31-08" "01-09, 31-08" ...
#> ..$ topic_fr : chr [1:7] "Précipitations, Période sèche, Durée" "Précipitations, Faibles, Durée" "Précipitations, Faible, Durée" "Précipitations, Forte, Durée" ...
#> ..$ is_experimental : logi [1:7] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> ..$ input_vars : chr [1:7] "R" "R" "R" "R" ...
#> ..$ is_date : logi [1:7] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> ..$ to_normalise : logi [1:7] FALSE FALSE FALSE FALSE FALSE FALSE ...
#> ..$ palette : chr [1:7] "#003C30 #01665E #35978F #80CDC1 #C7EAE5 #F6E8C3 #DFC27D #BF812D #8C510A #543005" "#452C1A #7F4A23 #B3762A #D4B86A #EFE0B0 #BCE6DB #7ACEB9 #449C93 #2A6863 #193830" "#452C1A #7F4A23 #B3762A #D4B86A #EFE0B0 #BCE6DB #7ACEB9 #449C93 #2A6863 #193830" "#452C1A #7F4A23 #B3762A #D4B86A #EFE0B0 #BCE6DB #7ACEB9 #449C93 #2A6863 #193830" ...
#> ..$ script_path : chr [1:7] "Precipitations/dtCDDA.R" "Precipitations/dtCWDA.R" "Precipitations/dtRA01mm.R" "Precipitations/dtRA20mm.R" ...
#> $ dataEX:List of 7
#> ..$ dtCDDA : tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ dtCDDA: int [1:63] NA 12 17 27 18 19 17 17 27 19 ...
#> ..$ dtCWDA : tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ dtCWDA: int [1:63] NA 16 13 11 11 9 6 17 10 9 ...
#> ..$ dtRA01mm: tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ dtRA01mm: int [1:63] NA 168 181 162 121 132 135 149 161 142 ...
#> ..$ dtRA20mm: tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ dtRA20mm: int [1:63] NA 4 5 3 4 NA 2 3 1 7 ...
#> ..$ dtRA50mm: tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-09-01" "1999-09-01" ...
#> .. ..$ dtRA50mm: int [1:63] NA NA NA NA NA NA NA NA NA NA ...
#> ..$ RCXA1 : tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-04-01" "1999-04-01" ...
#> .. ..$ RCXA1: num [1:63] NA 28.5 32.5 30.2 25.1 20.5 22.6 49.2 25.1 31.1 ...
#> ..$ RCXA5 : tibble [63 × 3] (S3: tbl_df/tbl/data.frame)
#> .. ..$ id : chr [1:63] "E645651001" "E645651001" "E645651001" "E645651001" ...
#> .. ..$ Date : Date[1:63], format: "1998-04-01" "1999-04-01" ...
#> .. ..$ RCXA5: num [1:63] NA 80 70.6 54.1 64.7 49.4 38.4 85.5 60.4 60.5 ...