## 2 Materials and Methods
### Calculation of Deforestation and Fragmentation  
To calculate the deforestation and fragmentation of mangrove forests, areas with mangrove presence were delimited between 1996 to 2020. Once the mangrove areas were obtained, the deforestation rate was calculated using the formula proposed by [PERSON] (1996) (Equation (1)):  
\[\text{Deforestation rate (DR)}=1/(\text{t}_{2}-\text{t}_{1})\times\text{Ln (A}_{2}/\text{A}_{1})\times 100, \tag{1}\]  
where A\({}_{1}\) and A\({}_{2}\) are the mangrove areas at times t\({}_{1}\) and t\({}_{2}\), respectively.  
For the calculation of fragmentation metrics, a 10 km\({}^{2}\) hexagonal grid was formed in the study area. Hexagonal polygons are considered the most suitable geometry when studying interaction and connectivity. The use of polygons improves the ability to assess landscape metrics in a more homogeneous manner ([PERSON] et al., 2017). We used hexagons as a grid system to analyze fragmentation and connectivity at a landscape level. Each hexagon was assigned one of the Ecuadorian provinces (Esmeraldas, Manabi, Guayas, Santa Elena, El Oro, and Galapagos). The patch analysis tool ([PERSON] et al., 2017) in ArcGIS 10.8 was used to calculate different fragmentation metrics in each mosaic: number of patches (NumP), class area (CA), mean patch size (MPS), total edge (TE), and edge density (ED) (Table 1). From these metrics, the reticular fragmentation index (RFI) was calculated based on the percentage without forest (PSB%) and edge density percentage (ED%) (Table 1), using the formula proposed by [PERSON] (1996) and [PERSON] et al. (2017). A fragment of 1.0 ha was used as a reference value to establish 100% of the PSB% and ED% metrics. This size was used because smaller sizes could distort the calculation.  
\begin{table}
\begin{tabular}{c c c c} \hline
**Parameter** & **Name** & **Definition** & **Unit** \\ \hline Number of Patches & NumP & \begin{tabular}{c} Total number of patches inside the tiles. The more patches there are, \\ the more fragmented the forest is considered to be. \\ \end{tabular} & Number \\ \hline Class area & CA & Sum of areas of all patches belonging to a hexagon. & m\({}^{2}\) \\ \hline Median patch size & MPS & \begin{tabular}{c} The average patch size of the forest within the tile. A smaller \\ average forest patch size is considered indicative of a more \\ fragmented forest. \\ \end{tabular} & m\({}^{2}\) \\ \hline Total edge & TE & \begin{tabular}{c} Perimeter of patches within each tile. The greater the perimeter, the \\ more exposed to disturbances. Greater TE patches may be \\ associated with more fragmented forests (if the fragmentation is \\ related to an anthropogenic disturbance). \\ \end{tabular} & m \\ \hline Edge density & ED & \begin{tabular}{c} Amount of edge (km) relative to the forest area (km\({}^{2}\)) within the tile. \\ ED = TE/CA \\ A high ratio of perimeter to forest patch area may be associated \\ with more fragmented forests (if fragmentation is related to \\ anthropogenic disturbance). \\ \end{tabular} & m/m\({}^{2}\) \\ \hline Edge density percentage & ED & \
\begin{tabular}{c} Edge percentage relative to landscape area. A high ratio of \\ perimeter to forest patch area may be associated with more \\ fragmented forests (if fragmentation is related to \\ anthropogenic disturbance). \\ \end{tabular} & \% \\ \hline Percentage without forest & PSB &
\begin{tabular}{c} Non-manglove area (%) without forest within the tile. Higher \\ percentage of area without forest within the tile would indicate \\ greater fragmentation. \\ \end{tabular} & \% \\ \hline \end{tabular}
\end{table}
Table 1: Description of the fragmentation metrics (S