### A MODIFIER ### # Path to the data computer_data_path = "/home/louis/Documents/bouleau/INRAE/CDD_stationnarite/data" # "C:\\Users\\louis.heraut\\Documents\\CDD_stationnarite\\data" # Work path computer_work_path = "/home/louis/Documents/bouleau/INRAE/CDD_stationnarite/ASH" # "C:\\Users\\louis.heraut\\Documents\\CDD_stationnarite\\ASH" # Manual selection # Path to data that will be analysed filedir = FALSE # "test" # "BanqueHydro_Export2021" filename = FALSE # c("H5920011_HYDRO_QJM.txt", "K4470010_HYDRO_QJM.txt") # "all" # Or list selection # Path to the list file of station that will be analysed listdir = # FALSE "" listname = "Liste-station_RRSE.docx" # FALSE BHdir = "BanqueHydro_Export2021" # FALSE # selecdir = "RRSE_selection" ################## # Set working directory setwd(computer_work_path) # Sourcing R file source('processing/extract.R') source('processing/analyse.R') source('plotting/panel.R') # Usefull library # Result directory resdir = file.path(computer_work_path, 'results') if (!(file.exists(resdir))) { dir.create(resdir) } print(paste('resdir :', resdir)) # Figure directory figdir = file.path(computer_work_path, 'figures') if (!(file.exists(figdir))) { dir.create(figdir) } print(paste('figdir :', figdir)) # Get only the selected station from a list station file if (is.character(listdir) & is.character(listname) & is.character(BHdir)){ df_selec = get_selection(computer_data_path, listdir, listname, cnames=c('code', 'station', 'BV_km2', 'axe_principal_concerne', 'longueur_serie', 'commentaires', 'choix'), cisnum=c('BV_km2', 'longueur_serie')) filedir = BHdir filename = df_selec$filename } # Extract information about selected stations df_info = extract_info(computer_data_path, filedir, filename) # Extract data about selected stations df_data = extract_data(computer_data_path, filedir, filename) # Plot time panel of debit by stations panel(df_data, df_info, figdir, filedir) # Compute gap parameters for stations df_lac = get_lacune(df_data, df_info)