diff --git a/plotting/layout.R b/plotting/layout.R index 03def19190ad08b4855b4c60079b2ff5955547df..d22be3c8f8d3807efd2704c8541ff3f9706ca1b8 100644 --- a/plotting/layout.R +++ b/plotting/layout.R @@ -1,3 +1,31 @@ +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# plotting/layout.R +# +# + + # Usefull library library(ggplot2) library(scales) @@ -9,7 +37,6 @@ library(grid) library(ggh4x) library(RColorBrewer) - # Sourcing R file source('plotting/panel.R', encoding='latin1') diff --git a/plotting/panel.R b/plotting/panel.R index 8555629563abcba9c8f7ee33cba82083654d02b7..5f50ab808598d40cdaeddf89887cc81ba070e350 100644 --- a/plotting/panel.R +++ b/plotting/panel.R @@ -1,3 +1,31 @@ +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# plotting/panel.R +# +# + + # Usefull library library(ggplot2) library(scales) diff --git a/processing/analyse.R b/processing/analyse.R index 2d5e0f603237236276c182730e2d959805daf224..51a782973d866ff3734ab9f35b84e8cdd53f5343 100644 --- a/processing/analyse.R +++ b/processing/analyse.R @@ -1,3 +1,34 @@ +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# processing/analyse.R +# +# File that realise all the possible analysis of data. +# This file regroup mainly the functions use to compute the trend +# analysis of hydrologic variables thanks to the Mann-Kendall Test. +# Functions needed for break or gap analysis are also present. + + # Usefull library library(dplyr) library(zoo) @@ -5,7 +36,6 @@ library(StatsAnalysisTrend) library(lubridate) library(trend) - # Sourcing R file source('processing/format.R', encoding='latin1') @@ -16,9 +46,9 @@ get_lacune = function (df_data, df_meta) { # Get all different stations code Code = levels(factor(df_meta$code)) - # Create new vector to stock results for cumulative time gap by station + # Create new vector to stock results for cumulative and mean + # time gap by station tLac = c() - # Create new vector to stock results for mean time gap by station meanLac = c() # Get rows where there is no NA @@ -27,8 +57,7 @@ get_lacune = function (df_data, df_meta) { df_data_NoNA = df_data[NoNA,] # For every station - for (code in Code) { - + for (code in Code) { # Get only the data rows for the selected station df_data_code = df_data[df_data$code==code,] # Get date for the selected station @@ -52,62 +81,65 @@ get_lacune = function (df_data, df_meta) { # Compute the mean gap lac_mean = mean(lac[lac != 0]) # Store the mean gap - meanLac = c(meanLac, lac_mean) - + meanLac = c(meanLac, lac_mean) } # Compute the cumulative gap rate in pourcent tLac100 = tLac * 100 - # Create tibble for lacune df_lac = tibble(code=Code, tLac100=tLac100, meanLac=meanLac) - # Join a tibble df_meta = full_join(df_meta, df_lac) - return (df_meta) } - +# Compute intercept values of linear trends with first order values +# of trends and the data on which analysis is performed. get_intercept = function (df_Xtrend, df_Xlist, unit2day=365.25) { - + + # Create a column in trend full of NA df_Xtrend$intercept = NA + # For all different group for (g in df_Xlist$info$group) { + # Get the data and trend value linked to this group df_data_code = df_Xlist$data[df_Xlist$data$group == g,] - df_Xtrend_code = df_Xtrend[df_Xtrend$group == g,] + # Get the time start and end of the different periods Start = df_Xtrend_code$period_start - UStart = levels(factor(Start)) End = df_Xtrend_code$period_end + # Extract only the unrepeated dates + UStart = levels(factor(Start)) UEnd = levels(factor(End)) - + # Get the number of different periods of trend analysis nPeriod = max(length(UStart), length(UEnd)) + # For each of these perdiods for (i in 1:nPeriod) { - + # Get data and trend associated to the period df_data_code_per = df_data_code[df_data_code$Date >= Start[i] & df_data_code$Date <= End[i],] - df_Xtrend_code_per = df_Xtrend_code[df_Xtrend_code$period_start == Start[i] & df_Xtrend_code$period_end == End[i],] - + + # Get the group associated to this period id = which(df_Xtrend$group == g & df_Xtrend$period_start == Start[i] & df_Xtrend$period_end == End[i]) + # Compute mean of flow and time period mu_X = mean(df_data_code_per$Qm3s, na.rm=TRUE) - mu_t = as.numeric(mean(c(Start[i], End[i]), na.rm=TRUE)) / unit2day - + + # Get the intercept of the trend b = mu_X - mu_t * df_Xtrend_code_per$trend - + # And store it df_Xtrend$intercept[id] = b } } @@ -115,26 +147,35 @@ get_intercept = function (df_Xtrend, df_Xlist, unit2day=365.25) { } +# Compute the start and the end of the period for a trend analysis +# according to the accessible data get_period = function (per, df_Xtrend, df_XEx, df_Xlist) { + # Convert results of trend to tibble df_Xtrend = tibble(df_Xtrend) + # Fix the period start and end of the accessible period to a + # default date df_Xtrend$period_start = as.Date("1970-01-01") df_Xtrend$period_end = as.Date("1970-01-01") + # Change the format of the date variable to date df_Xlisttmp = reprepare(df_XEx, df_Xlist, colnamegroup=c('code')) df_XExtmp = df_Xlisttmp$data + # For all the different group for (g in df_Xlisttmp$info$group) { - + # Get the analyse data associated to the group df_XExtmp_code = df_XExtmp[df_XExtmp$group == g,] - + # Get the id in the trend result associated to the group + id = which(df_Xtrend$group1 == g) + + # Compute index of the nearest accessible start and end date iStart = which.min(abs(df_XExtmp_code$Date - as.Date(per[1]))) iEnd = which.min(abs(df_XExtmp_code$Date - as.Date(per[2]))) - id = which(df_Xtrend$group1 == g) - + # Store the start and end of the trend analysis df_Xtrend$period_start[id] = as.Date(df_XExtmp_code$Date[iStart]) df_Xtrend$period_end[id] = @@ -144,90 +185,105 @@ get_period = function (per, df_Xtrend, df_XEx, df_Xlist) { } - +# Compute the break date of the flow data by station get_break = function (df_data, df_meta, p_thresold=0.05) { # Get all different stations code Code = levels(factor(df_meta$code)) + # Number of stations nCode = length(Code) + # Blank date break list and associated station code vector date_break = list() Code_break = c() + + # For all accessible code for (code in Code) { - + # Get the associated data df_data_code = df_data[df_data$code == code,] + # Remove NA data df_data_codeNoNA = df_data_code[!is.na(df_data_code$Qm3s),] + # Perform the break analysis thanks to the Pettitt test res_break = pettitt.test(df_data_codeNoNA$Qm3s) + # Extract p value p_value = res_break$p + # The length of the data analysed nbreak = res_break$nobs + # Index of the break date ibreak = res_break$estimate - if (length(ibreak) > 1) { - ibreak = ibreak[1] - } - # step1 = mean(df_data_codeNoNA$Qm3s[1:ibreak]) - # step2 = mean(df_data_codeNoNA$Qm3s[(ibreak+1):nbreak]) + # If the p value results is under the thresold if (p_value <= p_thresold) { + # Get the mean of the index break if there is several + ibreak = round(mean(ibreak), 0) + # Store the date break with its associated code date_break = append(date_break, df_data_codeNoNA$Date[ibreak]) Code_break = append(Code_break, code) } + # step1 = mean(df_data_codeNoNA$Qm3s[1:ibreak]) + # step2 = mean(df_data_codeNoNA$Qm3s[(ibreak+1):nbreak]) } + # Create a tibble with the break analysis results df_break = tibble(code=Code_break, Date=as.Date(date_break)) - return (df_break) } - +# Realise the trend analysis of the average annual flow (QA) +# hydrological variable get_QAtrend = function (df_data, period, p_thresold) { - # AVERAGE ANNUAL FLOW : QA # - + + # Make sure to convert the period to a list period = as.list(period) - + + # Set the max interval period as the minimal possible Imax = 0 + # Blank tibble for data to return df_QAtrendB = tibble() + # For all periods for (per in period) { - + # Prepare the data to fit the entry of extract.Var df_QAlist = prepare(df_data, colnamegroup=c('code')) + # Compute the QA over the data df_QAEx = extract.Var(data.station=df_QAlist, funct=mean, timestep='year', period=per, pos.datetime=1, na.rm=TRUE) - + # Compute the trend analysis df_QAtrend = Estimate.stats(data.extract=df_QAEx, level=p_thresold) + # Get the associated time interval I = interval(per[1], per[2]) + # If it is the largest interval if (I > Imax) { + # Store it and the associated data and info Imax = I df_QAlistB = df_QAlist df_QAExB = df_QAEx } + # Specify the period of analyse df_QAtrend = get_period(per, df_QAtrend, df_QAEx, df_QAlist) - - - - df_QAtrendB = bind_rows(df_QAtrendB, df_QAtrend) - + # Store the trend + df_QAtrendB = bind_rows(df_QAtrendB, df_QAtrend) } - + # Clean results of trend analyse res_QAtrend = clean(df_QAtrendB, df_QAExB, df_QAlistB) - return (res_QAtrend) } - +# Realise the trend analysis of the monthly minimum flow in the +# year (QMNA) hydrological variable get_QMNAtrend = function (df_data, period, p_thresold) { - # MONTHLY MINIMUM FLOW IN THE YEAR : QMNA # period = as.list(period) @@ -237,13 +293,6 @@ get_QMNAtrend = function (df_data, period, p_thresold) { for (per in period) { df_QMNAlist = prepare(df_data, colnamegroup=c('code')) - - # df_QMNAEx = extract.Var(data.station=df_QMNAlist, - # funct=mean, - # period=per, - # timestep='month', - # pos.datetime=1, - # na.rm=TRUE) df_QMNAEx = extract.Var(data.station=df_QMNAlist, funct=mean, @@ -253,7 +302,9 @@ get_QMNAtrend = function (df_data, period, p_thresold) { pos.datetime=1, na.rm=TRUE) - df_QMNAlist = reprepare(df_QMNAEx, df_QMNAlist, colnamegroup=c('code')) + df_QMNAlist = reprepare(df_QMNAEx, + df_QMNAlist, + colnamegroup=c('code')) df_QMNAEx = extract.Var(data.station=df_QMNAlist, funct=min, @@ -272,7 +323,8 @@ get_QMNAtrend = function (df_data, period, p_thresold) { df_QMNAExB = df_QMNAEx } - df_QMNAtrend = get_period(per, df_QMNAtrend, df_QMNAEx, + df_QMNAtrend = get_period(per, df_QMNAtrend, + df_QMNAEx, df_QMNAlist) df_QMNAtrendB = bind_rows(df_QMNAtrendB, df_QMNAtrend) @@ -284,8 +336,8 @@ get_QMNAtrend = function (df_data, period, p_thresold) { } +# Realise the trend analysis of the minimum 10 day average flow over the year (VCN10) hydrological variable get_VCN10trend = function (df_data, df_meta, period, p_thresold) { - # MINIMUM 10 DAY AVERAGE FLOW OVER THE YEAR : VCN10 # # Get all different stations code Code = levels(factor(df_meta$code)) diff --git a/processing/extract.R b/processing/extract.R index 3a004d7a76da5d21ebc6ec409a8d70b2c83bd616..408398012569b37fa58400abfb82c88e9cf33545 100644 --- a/processing/extract.R +++ b/processing/extract.R @@ -1,3 +1,31 @@ +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# processing/extract.R +# +# + + # Usefull library library(tools) library(dplyr) @@ -175,7 +203,7 @@ get_selection_AG = function (computer_data_path, listdir, listname, # 'longueur_serie')) -get_selection_NV = function (computer_data_path, listdir, listname) { +get_selection_IN = function (computer_data_path, listdir, listname) { # Get the file path to the data list_path = file.path(computer_data_path, listdir, listname) @@ -193,7 +221,7 @@ get_selection_NV = function (computer_data_path, listdir, listname) { return (df_selec) } # Example -# df_selec_NV = get_selection_NV( +# df_selec_IN = get_selection_IN( # "/home/louis/Documents/bouleau/INRAE/CDD_stationnarite/data", # "", # "nival_selection.txt") diff --git a/processing/format.R b/processing/format.R index 21d6c928c6480bf9d607995025d1d5b17e2f7329..4c4cbeacf94c711dda18088506a01485aadd0500 100644 --- a/processing/format.R +++ b/processing/format.R @@ -1,3 +1,31 @@ +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# processing/format.R +# +# + + # Usefull library library(dplyr) @@ -43,6 +71,7 @@ join = function (df_data_AG, df_data_NV, df_meta_AG, df_meta_NV) { } +# Prepare the data in order to have a list of a data tibble with date, group and flow column and a info tibble with the station code and group column to fit the entry of the 'StatsAnalysisTrend' package prepare = function(df_data, colnamegroup=NULL) { colnamegroup = c(colnamegroup) diff --git a/script.R b/script.R index 1e75cde9f82610fe9fbadf4301f4582c4ef96c9f..fa56fd167f1d441f5547c7b514c28fe6d78535a0 100644 --- a/script.R +++ b/script.R @@ -1,6 +1,37 @@ -############ A MODIFIER ############ - - +# \\\ +# Copyright 2021-2022 Louis Héraut*1 +# +# *1 INRAE, France +# louis.heraut@inrae.fr +# +# This file is part of ash R toolbox. +# +# ash R toolbox is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# ash R toolbox is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ash R toolbox. If not, see <https://www.gnu.org/licenses/>. +# /// +# +# +# script.R +# +# Script file to manage the trend analysis of the Adour-Garonne basin. +# Performs the necessary calls to processing and plotting functions in +# order to realise the hydrologic trend analysis of stations according +# to the input parameters. The nearest area belove is where you need to +# write your prefer parameters for the analysis. See the 'README.txt' +# file for more information. + + +############## START OF REGION TO MODIFY (without risk) ############## # Path to the data computer_data_path = "/home/louis/Documents/bouleau/INRAE/CDD_stationnarite/data" @@ -12,15 +43,17 @@ computer_work_path = # "C:\\Users\\louis.heraut\\Documents\\CDD_stationnarite\\ASH" -### BANQUE HYDRO ### -# Path to the directory where BH data is stored from the work path +## BANQUE HYDRO +# Path to the directory where Banque Hydro (BH) data is stored +# from the work path filedir = # "" "BanqueHydro_Export2021" -### MANUAL SELECTION ### -# Name of the file that will be analysed from the AG directory +## MANUAL SELECTION +# Name of the file that will be analysed from the BH directory +# (if 'all', all the file of the directory will be chosen) filename = # "" @@ -38,8 +71,9 @@ filename = -### AGENCE EAU ADOUR GARONNE SELECTION ### -# Path to the list file of AG data that will be analysed +## AGENCE EAU ADOUR GARONNE SELECTION +# Path to the 'docx' list file of station from the Agence de l'eau +# Adour-Garonne that will be analysed AGlistdir = "" @@ -48,17 +82,17 @@ AGlistname = # "Liste-station_RRSE.docx" -### NIVALE SELECTION ### -# Path to the list file of metadata about station that will be analysed -NVlistdir = +## NIVALE SELECTION +# Path to the 'txt' list file of station from INRAE that will be analysed +INlistdir = "" -NVlistname = +INlistname = "" # "nival_selection.txt" -### TREND ANALYSIS ### +## TREND ANALYSIS # Time period to analyse periodAll = c("1800-01-01", "2019-12-31") periodSub = c("1968-01-01", "2019-12-31") @@ -69,25 +103,26 @@ period1 = c("1968-01-01", "1994-12-31") period2 = c("1995-01-01", "2019-12-31") mean_period = list(period1, period2) -# p value +# p value thresold p_thresold = 0.1 #c(0.01, 0.05, 0.1) -### MAP ### +## MAP +# Path to the shapefile for france contour from 'computer_data_path' fr_shpdir = 'map/france' fr_shpname = 'gadm36_FRA_0.shp' +# Path to the shapefile for basin shape from 'computer_data_path' bs_shpdir = 'map/bassin' bs_shpname = 'BassinHydrographique.shp' +# Path to the shapefile for river shape from 'computer_data_path' rv_shpdir = 'map/river' rv_shpname = 'CoursEau_FXX.shp' +############### END OF REGION TO MODIFY (without risk) ############### -#################################### - - -# FILE STRUCTURE # +## 1. FILE STRUCTURE # Set working directory setwd(computer_work_path) @@ -98,7 +133,6 @@ source('processing/analyse.R', encoding='latin1') source('plotting/panel.R', encoding='latin1') source('plotting/layout.R', encoding='latin1') - # Result directory resdir = file.path(computer_work_path, 'results') if (!(file.exists(resdir))) { @@ -114,14 +148,14 @@ if (!(file.exists(figdir))) { print(paste('figdir :', figdir)) +## 2. SELECTION OF STATION # Initialization of null data frame if there is no data selected df_data_AG = NULL -df_data_NV = NULL +df_data_IN = NULL df_meta_AG = NULL -df_meta_NV = NULL +df_meta_IN = NULL - -# AGENCE EAU ADOUR GARONNE SELECTION # +### 2.1. Selection of the Agence de l'eau Adour-Garonne if (AGlistname != ""){ # Get only the selected station from a list station file @@ -147,81 +181,80 @@ if (AGlistname != ""){ # Extract metadata about selected stations df_meta_AG = extract_meta(computer_data_path, filedir, filename) - # Extract data about selected stations df_data_AG = extract_data(computer_data_path, filedir, filename) } -# NIVALE SELECTION # -if (NVlistname != ""){ +### 2.2. INRAE selection +if (INlistname != ""){ # Get only the selected station from a list station file - df_selec_NV = get_selection_NV(computer_data_path, - NVlistdir, - NVlistname) + df_selec_IN = get_selection_IN(computer_data_path, + INlistdir, + INlistname) # Get filenames of the selection - filename = df_selec_NV[df_selec_NV$ok,]$filename + filename = df_selec_IN[df_selec_IN$ok,]$filename ##### # filename = filename[(1+20):(16+20)] ##### # Extract metadata about selected stations - df_meta_NV = extract_meta(computer_data_path, filedir, filename) - + df_meta_IN = extract_meta(computer_data_path, filedir, filename) # Extract data about selected stations - df_data_NV = extract_data(computer_data_path, filedir, filename) + df_data_IN = extract_data(computer_data_path, filedir, filename) } -# MANUAL SELECTION # -if (AGlistname == "" & NVlistname == "") { - +### 2.3. Manual selection +if (AGlistname == "" & INlistname == "") { # Extract metadata about selected stations df_meta_AG = extract_meta(computer_data_path, filedir, filename) - # Extract data about selected stations df_data_AG = extract_data(computer_data_path, filedir, filename) } - -# JOIN # -# Make the join -df_join = join(df_data_AG, df_data_NV, df_meta_AG, df_meta_NV) +### 2.4. Data join +df_join = join(df_data_AG, df_data_IN, df_meta_AG, df_meta_IN) df_data = df_join$data df_meta = df_join$meta -# ANALYSE # -# Compute gap parameters for stations +## 3. ANALYSE +### 3.1. Compute gap parameters for stations df_meta = get_lacune(df_data, df_meta) - -# QA TREND # +### 3.2. Trend analysis +# QA trend res_QAtrend = get_QAtrend(df_data, period=trend_period, p_thresold=p_thresold) -# QMNA TREND # +# QMNA tend res_QMNAtrend = get_QMNAtrend(df_data, period=trend_period, p_thresold=p_thresold) -# VCN10 TREND # +# VCN10 trend res_VCN10trend = get_VCN10trend(df_data, df_meta, period=trend_period, p_thresold=p_thresold) - +### 3.3. Break analysis # df_break = get_break(res_QAtrend$data, df_meta) # df_break = get_break(res_QMNAtrend$data, df_meta) # df_break = get_break(res_VCN10trend$data, df_meta) # histogram(df_break$Date, df_meta, - # figdir=figdir) +# figdir=figdir) # cumulative(df_break$Date, df_meta, dyear=8, - # figdir=figdir) +# figdir=figdir) + + +## 4. PLOTTING +# Shapefile importation in order to it only once time +df_shapefile = ini_shapefile(computer_data_path, fr_shpdir, fr_shpname, bs_shpdir, bs_shpname, rv_shpdir, rv_shpname, riv=FALSE) -# TIME PANEL # +### 4.1. Simple time panel to criticize station data # Plot time panel of debit by stations # panels_layout(list(df_data, df_data), # layout_matrix=c(1, 2), @@ -234,10 +267,7 @@ res_VCN10trend = get_VCN10trend(df_data, df_meta, # figdir=figdir, # filename_opt='time') - -df_shapefile = ini_shapefile(computer_data_path, fr_shpdir, fr_shpname, bs_shpdir, bs_shpname, rv_shpdir, rv_shpname, riv=FALSE) - - +### 4.2. Analysis layout panels_layout(isplot=c( 'datasheet', 'matrix',