diff --git a/plotting/matrix.R b/plotting/matrix.R
index d15d26d5572a973bc4470929b27a9d176c9cb968..e14b1054438bdc02e57f2e80d1c8dfcbe1bcb3f5 100644
--- a/plotting/matrix.R
+++ b/plotting/matrix.R
@@ -471,55 +471,58 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice
     for (itype in 1:nbType) {
         # Gets the type
         type = Type[itype]
-        # Extracts each possibilities of first letter of station code
-        firstLetter = levels(factor(substr(Code, 1, 1)))
+        # Extracts each possibilities of hydrological region
+        RH = rle(sort(df_meta$region_hydro))$values
+        twoL = names(df_meta$region_hydro)
         # Number of different first letters
-        nfL = length(firstLetter)
+        nRH = length(RH)
         # For all the available first letter
-        for (ifL in 1:nfL) {
+        for (iR in 1:nRH) {
             # Gets the first letter
-            fL = firstLetter[ifL]
-
+            rh = RH[iR]
+            okL = rle(sort(twoL[df_meta$region_hydro == rh]))$values
+            nL = nchar(okL[1])
             # Get only station code with the same first letter 
-            subCodefL = Code[substr(Code, 1, 1) == fL]
+            subCodeRh = Code[substr(Code, 1, nL) %in% okL]
             # Counts the number of station in it
-            nsubCodefL = length(subCodefL)
-            # Computes the number of pages needed to plot all stations
-            nMat = as.integer(nsubCodefL/slice) + 1
+            nsubCodeRh = length(subCodeRh)
+            # Computes the number of pages needed to plot
+            # all stations
+            nMat = as.integer(nsubCodeRh/slice) + 1
             # Counts the number of pages
             N_loop = N_loop + nMat
         }
     }
-    
+
     # For all the type of plots
     for (itype in 1:nbType) {
         # Gets the type
         type = Type[itype]
-        
-        # Extracts each possibilities of first letter of station code
-        firstLetter = levels(factor(substr(Code, 1, 1)))
+        # Extracts each possibilities of hydrological region
+        RH = rle(sort(df_meta$region_hydro))$values
+        twoL = names(df_meta$region_hydro)
         # Number of different first letters
-        nfL = length(firstLetter)
+        nRH = length(RH)
         # For all the available first letter
-        for (ifL in 1:nfL) {
+        for (iR in 1:nRH) {
             # Gets the first letter
-            fL = firstLetter[ifL]
-
+            rh = RH[iR]
+            okL = rle(sort(twoL[df_meta$region_hydro == rh]))$values
+            nL = nchar(okL[1])
             # Get only station code with the same first letter 
-            subCodefL = Code[substr(Code, 1, 1) == fL]
+            subCodeRh = Code[substr(Code, 1, nL) %in% okL]
             # Counts the number of station in it
-            nsubCodefL = length(subCodefL)
-            # Computes the number of pages needed to plot all stations
-            nMat = as.integer(nsubCodefL/slice) + 1
+            nsubCodeRh = length(subCodeRh)
+            # Computes the number of pages needed to
+            # plot all stations
+            nMat = as.integer(nsubCodeRh/slice) + 1
             # For all the pages
             for (iMat in 1:nMat) {
-                n_loop = ifL + nfL*(itype-1) + (iMat-1)
-                # N_loop = nfL*nbType
-                
+                n_loop = iR + nRH*(itype-1) + (iMat-1)
                 # Print the matrix name
                 print(paste('Matrix ', iMat, '/', nMat,
                             ' of ', type,
-                            ' for region : ', fL,
+                            ' for region : ', rh,
                             "   (",
                             round(n_loop / N_loop * 100,
                                   0),
@@ -527,7 +530,7 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice
                             sep=''))
                 
                 # Extracts the station for the current page
-                subCode = subCodefL[(slice*(iMat-1)+1):(slice*iMat)]
+                subCode = subCodeRh[(slice*(iMat-1)+1):(slice*iMat)]
                 # Removes NA stations
                 subCode = subCode[!is.na(subCode)]
                 # Reverses verticale order of stations
@@ -537,33 +540,33 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice
 
                 # Creates logical vector to select only info about
                 # stations that will be plot on the page
-                CodefL_trend =
+                CodeRh_trend =
                     Code_trend %in% subCode & Type_trend == type
                 # Extracts those info
-                subPeriods_trend = Periods_trend[CodefL_trend]
-                subNPeriod_trend = NPeriod_trend[CodefL_trend]
-                subVar_trend = Var_trend[CodefL_trend]
-                subType_trend = Type_trend[CodefL_trend]
-                subCode_trend = Code_trend[CodefL_trend]
-                subAlpha_trend = Alpha_trend[CodefL_trend]
-                subTrendValue_trend = TrendValue_trend[CodefL_trend]
-                subDataMean_trend = DataMean_trend[CodefL_trend]
-                subFill_trend = Fill_trend[CodefL_trend]
-                subColor_trend = Color_trend[CodefL_trend]
+                subPeriods_trend = Periods_trend[CodeRh_trend]
+                subNPeriod_trend = NPeriod_trend[CodeRh_trend]
+                subVar_trend = Var_trend[CodeRh_trend]
+                subType_trend = Type_trend[CodeRh_trend]
+                subCode_trend = Code_trend[CodeRh_trend]
+                subAlpha_trend = Alpha_trend[CodeRh_trend]
+                subTrendValue_trend = TrendValue_trend[CodeRh_trend]
+                subDataMean_trend = DataMean_trend[CodeRh_trend]
+                subFill_trend = Fill_trend[CodeRh_trend]
+                subColor_trend = Color_trend[CodeRh_trend]
 
                 # Same for breaking analysis
-                CodefL_mean =
+                CodeRh_mean =
                     Code_mean %in% subCode & Type_mean == type
                 # Extracts right info
-                subPeriods_mean = Periods_mean[CodefL_mean]
-                subNPeriod_mean = NPeriod_mean[CodefL_mean]
-                subVar_mean = Var_mean[CodefL_mean]
-                subType_mean = Type_mean[CodefL_mean]
-                subCode_mean = Code_mean[CodefL_mean]
-                subDataMean_mean = DataMean_mean[CodefL_mean]
-                subbreakValue_mean = breakValue_mean[CodefL_mean]
-                subFill_mean = Fill_mean[CodefL_mean]
-                subColor_mean = Color_mean[CodefL_mean]
+                subPeriods_mean = Periods_mean[CodeRh_mean]
+                subNPeriod_mean = NPeriod_mean[CodeRh_mean]
+                subVar_mean = Var_mean[CodeRh_mean]
+                subType_mean = Type_mean[CodeRh_mean]
+                subCode_mean = Code_mean[CodeRh_mean]
+                subDataMean_mean = DataMean_mean[CodeRh_mean]
+                subbreakValue_mean = breakValue_mean[CodeRh_mean]
+                subFill_mean = Fill_mean[CodeRh_mean]
+                subColor_mean = Color_mean[CodeRh_mean]
                 
                 # Gets the number of variable to plot in
                 # function of the current type
@@ -1219,7 +1222,7 @@ matrix_panel = function (list_df2plot, df_meta, trend_period, mean_period, slice
                        path=outdirTmp,
                        filename=paste(outnameTmp,
                                       '_', type,
-                                      '_', fL,
+                                      '_', rh,
                                       iMat, sep=''),
                        device='pdf',
                        width=width, height=height,
diff --git a/processing/extract.R b/processing/extract.R
index ef5c105bee491d2ffd042272cf6990b1d99dbe98..fc99c92dec05b426a412085e019baa553aef222b 100644
--- a/processing/extract.R
+++ b/processing/extract.R
@@ -105,7 +105,16 @@ iRegHydro = c('D'='Affluents du Rhin',
               'L'='Loire',
               'M'='Loire',
               'N'='Fleuves côtiers au sud de la Loire',
-              'O'='Garonne',
+              'O0'='Garonne',
+              'O1'='Garonne',
+              'O2'='Garonne',
+              'O3'='Tarn-Aveyron',
+              'O4'='Tarn-Aveyron',
+              'O5'='Tarn-Aveyron',
+              'O6'='Tarn-Aveyron',
+              'O7'='Lot',
+              'O8'='Lot',
+              'O9'='Lot',
               'P'='Dordogne',
               'Q'='Adour',
               'R'='Charente',
@@ -369,9 +378,25 @@ extract_meta = function (computer_data_path, filedir, filename,
 
                 # The path to the data file of BH
                 file_path=file_path)
+
+        Ltmp = names(iRegHydro)[nchar(names(iRegHydro)) == 2]
+        Ltmp = substr(Ltmp, 1, 1)
+        infoSecteur = rle(sort(Ltmp))$values
+        
+        oneL = substr(df_meta$code, 1, 1)
+        twoL = substr(df_meta$code, 1, 2)
+        RH = c()
+        for (i in 1:length(oneL)) {
+            if (oneL[i] %in% infoSecteur) {
+                RHtmp = iRegHydro[twoL[i]]
+            } else {
+                RHtmp = iRegHydro[oneL[i]]
+            }
+            RH = c(RH, RHtmp)
+        }
         
         # Adding of the hydrological region
-        df_meta$region_hydro = iRegHydro[substr(df_meta$code, 1, 1)]
+        df_meta$region_hydro = RH
         return (df_meta)
 
     } else {
diff --git a/script.R b/script.R
index 20de3817c1e23a30cfe28728e94eddcca47a3f8a..0ad6d4d3b40565686715be08b8e0436279ce760e 100644
--- a/script.R
+++ b/script.R
@@ -55,21 +55,21 @@ filedir =
 # Name of the file that will be analysed from the BH directory
 # (if 'all', all the file of the directory will be chosen)
 filename =
-    ""
-    "all"
-    # c(
-        # "S2235610_HYDRO_QJM.txt",
-        # "P1712910_HYDRO_QJM.txt",
-        # "P0885010_HYDRO_QJM.txt",
-        # "O5055010_HYDRO_QJM.txt",
-        # "O0384010_HYDRO_QJM.txt",
-        # "S4214010_HYDRO_QJM.txt",
-        # "Q7002910_HYDRO_QJM.txt"
-        # "Q0214010_HYDRO_QJM.txt"
-        # "O3035210_HYDRO_QJM.txt",
-        # "O0554010_HYDRO_QJM.txt",
-        # "O1584610_HYDRO_QJM.txt"
-    # )
+    # ""
+    # "all"
+    c(
+        "S2235610_HYDRO_QJM.txt",
+        "P1712910_HYDRO_QJM.txt",
+        "P0885010_HYDRO_QJM.txt",
+        "O5055010_HYDRO_QJM.txt",
+        "O0384010_HYDRO_QJM.txt",
+        "S4214010_HYDRO_QJM.txt",
+        "Q7002910_HYDRO_QJM.txt",
+        "Q0214010_HYDRO_QJM.txt",
+        "O3035210_HYDRO_QJM.txt",
+        "O0554010_HYDRO_QJM.txt",
+        "O1584610_HYDRO_QJM.txt"
+    )
 
 
 ## AGENCE EAU ADOUR GARONNE SELECTION
@@ -79,8 +79,8 @@ AEAGlistdir =
     ""
 
 AEAGlistname = 
-    # ""
-    "Liste-station_RRSE.docx" 
+    ""
+    # "Liste-station_RRSE.docx" 
 
 
 ## NIVALE SELECTION
@@ -249,42 +249,42 @@ df_meta = get_lacune(df_data, df_meta)
 df_meta = get_hydrograph(df_data, df_meta, period=mean_period[[1]])$meta
 
 ### 3.2. Trend analysis
-# QA trend
-res_QAtrend = get_QAtrend(df_data, df_meta,
-                          period=trend_period,
-                          alpha=alpha,
-                          yearLac_day=yearLac_day)
-
-# QMNA tend
-res_QMNAtrend = get_QMNAtrend(df_data, df_meta,
-                              period=trend_period,
-                              alpha=alpha,
-                              sampleSpan=sampleSpan,
-                              yearLac_day=yearLac_day)
-
-# VCN10 trend
-res_VCN10trend = get_VCN10trend(df_data, df_meta,
-                                period=trend_period,
-                                alpha=alpha,
-                                sampleSpan=sampleSpan,
-                                yearLac_day=yearLac_day)
-
-# Start date for low water trend
-res_tDEBtrend = get_tDEBtrend(df_data, df_meta, 
-                            period=trend_period,
-                            alpha=alpha,
-                            sampleSpan=sampleSpan,
-                            thresold_type='VCN10',
-                            select_longest=TRUE,
-                            yearLac_day=yearLac_day)
-# res_tDEBtrend = read_listofdf(resdir, 'res_tDEBtrend')
-
-# Center date for low water trend
-res_tCENtrend = get_tCENtrend(df_data, df_meta, 
-                            period=trend_period,
-                            alpha=alpha,
-                            sampleSpan=sampleSpan,
-                            yearLac_day=yearLac_day)
+# # QA trend
+# res_QAtrend = get_QAtrend(df_data, df_meta,
+#                           period=trend_period,
+#                           alpha=alpha,
+#                           yearLac_day=yearLac_day)
+
+# # QMNA tend
+# res_QMNAtrend = get_QMNAtrend(df_data, df_meta,
+#                               period=trend_period,
+#                               alpha=alpha,
+#                               sampleSpan=sampleSpan,
+#                               yearLac_day=yearLac_day)
+
+# # VCN10 trend
+# res_VCN10trend = get_VCN10trend(df_data, df_meta,
+#                                 period=trend_period,
+#                                 alpha=alpha,
+#                                 sampleSpan=sampleSpan,
+#                                 yearLac_day=yearLac_day)
+
+# # Start date for low water trend
+# res_tDEBtrend = get_tDEBtrend(df_data, df_meta, 
+#                             period=trend_period,
+#                             alpha=alpha,
+#                             sampleSpan=sampleSpan,
+#                             thresold_type='VCN10',
+#                             select_longest=TRUE,
+#                             yearLac_day=yearLac_day)
+# # res_tDEBtrend = read_listofdf(resdir, 'res_tDEBtrend')
+
+# # Center date for low water trend
+# res_tCENtrend = get_tCENtrend(df_data, df_meta, 
+#                             period=trend_period,
+#                             alpha=alpha,
+#                             sampleSpan=sampleSpan,
+#                             yearLac_day=yearLac_day)
 
 ### 3.3. Break analysis
 # df_break = get_break(res_QAtrend$data, df_meta)
@@ -361,7 +361,7 @@ datasheet_layout(toplot=c(
 
                  glose=list(
                      "Moyenne annuelle du débit journalier",
-                     "Minimum annuel de la moyenne menusuelle du débit journalier",
+                     "Minimum annuel de la moyenne mensuelle du débit journalier",
                      "Minimum annuel de la moyenne sur 10 jours du débit journalier",
                      "Début d'étiage (jour de l'année de la première moyenne sur 10 jours sous le maximum des VCN10)",
                      "Centre d'étiage (jour de l'année du VCN10)"