Integrated Economic, Environmental and Social Index—Case Study: Medina of Tangier

: Assessing tourism sustainability has become of paramount importance to researchers and policymakers in regard to better protecting tourism destinations, particularly with the continued increase in the number of tourists and visitors who alter the natural components of the environment and degrade ecosystems. The use of geographic data is of great importance, as it can serve as a dashboard for monitoring and controlling the sustainability of tourist areas. Due to their diversity and abundance in the city of Tangier, these tools are available and easy to use. The medina of Tangier is used as a calculation example, a method that will also be applicable to other areas of the metropolitan city and to other cities as well. Based on the annual meeting of the different component of society involved in the Medina of Tangier, the data are extracted and integrated into the proposed model through a plugin interface. Therefore, the use of geographic data is of great importance, especially in environmental monitoring and land management, due to its ease of use and availability. However, calculating composite sustainability indices involves several steps and requires a basic understanding of existing models. This article describes the development and design of a plugin package in QGIS that serves as an easy-to-use tool to automatically process and calculate economic, environmental and social indices and the overall tourism sustainability index. These plugins were built in Python and designed as plugins for the QGIS software version 3.22.


Introduction
Every year, the city of Tangier in Morocco attracts a considerable number of visitors, both national and international.Despite its economic prosperity, the city faces intense pressure on its natural and cultural resources, leading to unpredictable consequences on tourism activity in the long term.To mitigate these repercussions, the application of the concept of sustainable development in the tourism sector remains essential.Sustainable tourism, as defined by [1] the World Tourism Organization (UNWTO), involves the judicious use and preservation of natural, economic and cultural resources for truly sustainable development, ensuring their long term viability.Tourism plays a central role in achieving the sustainable development goals (SDGs).More specifically, the United Nations officially designated 2017 as the International Year of Sustainable Tourism for Development, explicitly highlighting the contribution of tourism to the achievement of three of the 169 SDG targets, namely SDG 12 on responsible consumption and production, SDG 8 on decent work and economic growth, as well as SDG 14 [2].Understanding the critiques and challenges associated with the SDGs can improve perceptions of the potential role that the tourism sector can play in advancing these goals [3].Furthermore, the preservation of natural landscapes and cultural Tour.Hosp.2024, 5 490 heritage is essential for the sustainable development of a tourist destination, with these values enhancing its attractiveness and sustainability [4].
Sustainability is characterized by careful monitoring and evaluation.Our aim is to better understand the problems encountered and their impacts on the sustainability of a tourist area.It is crucial to accurately assess sustainability in order to determine necessary interventions, thereby providing decision-makers with effective decision-making tools.
This idea is gaining momentum, as evidenced by the growth of research in the field, particularly on the principles and practices of sustainability assessment, as illustrated by references such as UNWTO [5], T.G and Ko [6], and AG [7].
Sustainability assessment can be developed using a variety of approaches, depending on the objectives, scale and scope of the study [8].Consequently, the literature on this topic is growing, presenting a considerable diversity of approaches [9].
Setting up frameworks is crucial to structuring work on indicators and underlying statistics.Given that sustainable development encompasses three distinct dimensions, as well as their interactions, measuring this concept involves organizing a diversity of relevant indicators.The chosen frameworks must be simple and easily understandable, thus allowing indicators to be linked to public policy themes and used for decision-making purposes by decision-makers and the general public.
In general, programs and models imposed by the State and international institutions do not always adapt optimally to a territory, especially since it is complex to use sustainability indicators based on varied information in terms of spatial and temporal scales [10].This is why it is essential to involve local stakeholders so that they take charge of the management of their own territory and legitimize its development.This involvement is materialized by the selection of the most relevant indicators, as well as the weightings assigned to the different components and indicators.Although indisputable scientific standards exist for some indicators, stakeholders may establish their own standards, seeking a balance between the less favorable and the less desirable, due to the real difficulty in adjusting sustainability to a desired state.Tolerance in assessment also plays a crucial role in monitoring and evolving sustainability over assessment periods, becoming increasingly demanding over time.
Our proposal consists of a set of plugins dedicated to the evaluation and monitoring of sustainable development in local tourist destinations.This set of plugins is mainly based on a participatory approach, based on the consent of the actors intervening in the local territory, and is limited in space and time.These actors ensure the sustainability of the natural and cultural resources of their territory, thus contributing to the choice of different evaluation parameters.Furthermore, by first referring to the approach of [6,11] the result is a simple and reduced model which is based on an arithmetic average of the indicators, bringing together the three components of sustainability.It does not primarily take into account the process of constructing a composite indicator but focuses mainly on the integration of any model adapted to a tourist destination, as well as its execution.
The city of Tangier, like other tourist sites in Morocco, faces a series of challenges related to the governance of its tourism sector.An in-depth assessment of the sustainability of its tourism areas, carried out using plugins integrated into QGIS, will provide decisionmakers with a more detailed understanding of specific challenges.This will allow them to formulate suitable solutions aimed at protecting, exploiting and fully promoting the city's tourism potential.
The analysis of the Medina of Tangier highlights the degradation of historical resources, the fragility of the local community, and the deterioration of environmental wellbeing, thus leading to a decline in tourist attraction.The central objective of this project is to mitigate these impacts by implementing appropriate measures while simultaneously strengthening the tourist appeal of the areas concerned.
As indicated in the graphic summary, our work is divided into two axes.The first axis aims to propose a calculation model for the evaluation of tourism sustainability, while the second axis is dedicated to the creation of an interface in the form of plugins on QGIS.
The proposed model, described as simple and suitable, is based on the indicator approach, considered the cornerstone of the creation of composite indices and a global index of a compact and meaningful nature.Finally, it integrates geographic information systems (GIS), including the new plugin which provides a visual and conversational interface for entering data, running the model and visualizing the results on dynamic and interactive maps.An in-depth diagnosis stimulates decision-makers to make appropriate and effective decisions.
Indeed, to assess sustainability, it is crucial to develop a model that uses scientific mathematical tools and an appropriate theoretical concept to understand, analyze and interpret the data.An overview of the methods and approaches developed to assess tourism sustainability is available in the educational document [12].Furthermore, other approaches, although not providing a specific model, have been significant in assessing tourism sustainability, as illustrated by H. Mohamed and Rachid [13], JGM Steenbruggen et al. [14], and R. Clift et al. [15].
Most of the mathematical models examined for sustainability are based on the open indicator theory, as presented in A. Saltelli et al. [16], Y. Fu et al. [17] and F. Franceschini et al. [18].In general, an indicator can be both a measure and an assessment tool of sustainability, used effectively in sustainability planning to measure performance and encourage positive change.The main characteristic of an indicator is its ability to summarize, concentrate and condense the complexity of data into a manageable and meaningful amount of information, as mentioned in [19].According to another perspective shared by H. Opschoor [20], the use of sustainability indicators goes beyond the simple description of a tourism site, providing normative measures regarding the gap between the current state of sustainability and the desired baseline state.
In the tourism sustainability modeling process, the concept of a composite indicator is integrated to reflect the potential interactions and influences between the designed indicators.Furthermore, indicators or composite indicators are increasingly recognized as useful tools for decision-making and public communication in areas such as economy, environment and society, as mentioned in RK Singh et al. [7,12] and FJ Blancas et al. [10].
The methodology for constructing a composite indicator, as described by N. Michela et al. [21], involves several steps, including the selection and aggregation of relevant indicators, the treatment of missing data, the normalization of indicators according to units of measurement, as well as the choice of indicator weights, as illustrated in S. Haloui et al. [22], which proposes a sustainability assessment model suitable for evaluating the sustainability status of a tourist destination at desired intervals by successive comparison using faulty indicators, which will be adjusted subsequently.
The implementation of composite indicators (CIs), with its diversity of approaches, should be considered as a means of initiating discussion and arousing public interest, as highlighted in references [23,24].This approach involves several steps, each requiring specific actions and the appropriate selection of methods.Specifically, it includes indicator selection, standardization approaches, weighting systems, and aggregation formulas [10].However, it is important to consider the conceptual requirements of a sustainability index, as discussed in [25].
Based on this consensus, and in compliance with these guiding principles, this work presents an original model for evaluating the sustainability of tourism.This model mainly differs from existing frameworks in the literature because it is based on a simplified approach adapted to a study area defined by its stakeholders.These actors assume responsibility for the choice of indicators, standards, weightings and tolerances granted to each indicator.The particularity of this model lies in its simplicity, flexibility and adaptability to various contexts.
Secondly, due to the use of simple plugins based on Geographic Information Systems (GIS), these plugins appear to be an essential solution, particularly given the geographical aspect inherent to tourism.Many studies have explored the link between GIS and sustainable development [26,27], with a particular focus on sustainable tourism.In addition, Roche S. et al. [28] points out that the evolution of GIS technology has paved the way for the development of solutions that meet the needs of various organizations.Alshuwaikhat et al. [29] presents the development of a GIS-based model to assess the sustainability of university campus operations and demonstrates how it can help decisionmakers design strategies to improve its environmental sustainability.B. Boers et al. [30] integrated GIS into sustainable tourism infrastructure planning.
However, according to Y. Farsari et al. [31], there appears to be a lack of GIS-based applications to support the planning and management of tourism destinations.The use of GIS should be re-evaluated in this context to integrate spatial analysis where necessary with non-spatial features.
The approach adopted has a balanced view of the three dimensions of sustainability (environmental, economic and social), in contrast to most research, which focuses mainly on the environmental aspect, the social aspect or both simultaneously.This difference can be attributed to the subjectivity specific to each researcher in their approach to research, although the perception of sustainability varies among different tourism stakeholders, as they approach tourism development from different perspectives according to [25].Indeed, although tourism is an economic activity guided by financial objectives, it should not automatically be considered as the main cause of the deterioration of the other constituents of sustainability.It is therefore essential to guarantee clear and explicit representativeness (of the three components).
To facilitate the calculation of indices for users and decision-makers who do not have solid knowledge of GIS, and to support the open source model, the plugins are integrated into QGIS (an open source geographic information system software which allows the creation, visualization, editing, and analysis of geospatial data).Using QGIS is highly recommended, as it is freely available and its capabilities can be extended with a wide range of external plugins developed by its large community.Recently, many plugins have been developed under QGIS to serve sustainability goals, including the web mapping application for spatial ecotourism information using QGIS [32], the Imagine Sustainability Assessment Tool [33], which is based on the geographic algorithm MCDA, along with the Spatial Sustainability Assessment Model (SSAM) developed by ARPA Umbria and the University of Perugia (Developer: Gianluca Massei), is used for assessing sustainability in a geographical environment.Additionally, the USM toolset (Urban Sprawl Metric toolset) [34], which facilitates the calculation of weighted urban sprawl (WUP), and the Q-LIP environment [35] are also utilized.
The core functionality of the plugins is written in Python (3.2), while the graphical user interface (GUI) is developed using the Qt designer concept.Version 3.5.1 is compatible with QGIS version 3.22, and all of its features can be run on a standard desktop QGIS.
The following presents the tools used in the form of mathematical functions for each component of sustainable tourism and the overall sustainability index, as well as for the adjustment.Next, the interface section is illustrated by the plugins assigned to each function.The implementation is then addressed in the context of the Medina of Tangier, followed by the results, discussion and conclusion of the work.

Technical Implementation (Model)
We are now able to demonstrate how the proposed model was designed based on indicator theory.The design process involves identifying a tourist destination and determining its characteristics, e.g., an ecological site (natural resources, landscape, endemic species, beach, forests, etc.) and/or a cultural site (historical site, museum, etc.).Most importantly, it involves collecting the decisions and proposals of the stakeholders involved, which can be represented by various entities, such as the State and its institutions, tourism professionals, the local community linked to the tourist activity, associations and trade unions linked to the tourism sector, tourists and site visitors and university researchers.
As mentioned, the necessary information from the decisions of selected stakeholders can be used to characterize the sustainability of the tourism destination based on commonly accepted key parameters and indicators.Therefore, the evaluation of tourism destination performance can be completely carried out by defining sustainability indices for a given period.
In the following, we define the entire sustainability model through its composite indicator by referring to the works of [12,21,36].Although the model is applied on a large scale, since we operate within the same computational parameters, it can also be applied to small study areas.
Taking into account the delegation of the choice, aggregation, standardization and weighting of indicators to stakeholders within the framework of an annual meeting on the state of sustainability of the city of Tangier within the Observatory for the Protection of the Environment and Historic Monuments of Tangier (OPEMHT) [37], deemed qualified and in accordance with the references already mentioned, this study mainly focuses on the evaluation of composite indicators and the overall index of sustainability.
Nevertheless, the OPEMHT is an activist association dedicated to protecting the environment and historical monuments in Tangier, considering sustainable development as a key solution to achieving its goals.It organizes several meetings and an annual gathering where its annual report on the sustainability of the environment and tourist monuments in the city is presented, along with proposed adjustments and directives.This meeting is a suggestive forum that brings together over 200 stakeholders, including representatives from associations and unions dedicated to environmental protection, the Tangier prefecture, urban and rural municipalities, the National Development Agency for the North (NDAN), tourism professionals and academic researchers.During the event, several workshops discuss sustainability anomalies, questionable indicators, indicator standards, weightings and allowed tolerances.

Method for Calculating Different Composite Indicators and the Overall Sustainability Indicator
The weighted arithmetic mean is used to calculate the average value by combining different values with different weights [38]; similarly, one can calculate the sustainability of a tourist area by combining different indicators with different weights.
i: is the value of indicator i, w i : is the weight or weighting of indicator i n: is the total number of indicators.Then, we define the function δ as follows: The role of this function δ is to detect when an indicator is below its corresponding standard by a given tolerance factor τ.This design of the function δ leads to a zero contribution to the overall sustainability index if the standard norms are not respected; otherwise, this function retains all positive contributions to this index.Now, based on this function, we introduce the following conceptual indices based on time periods t, t ≥ 1.
First, we introduce a useful tolerance parameter τ t , which depends on time and decreases with time, e.g., where τ represents the initial tolerance factor predefined at time t = 1, its importance lies in the fact that the tolerance becomes smaller and then stricter over time.
Using the relations (1) and ( 2), we obtain the following composite indicators:

Composite economic indicator
Composite environmental indicator Composite social indicator where represents the I * i chosen economic (ec), environmental (en) and social (so) indicators and S * i are their standard standards.The positive scalars α i , β i , γ i > 0 are successively their corresponding weights.
With these defined and characterized composite indicators, we are now able to introduce the Global Sustainability Index (GSI), which can provide an accurate and clear assessment of the sustainability status of the entire tourism destination.This overall evaluation index is defined as an average of the indicators defined in (3)-(5): Overall Rating Index where δ 1 , δ 2 and δ 3 are the weights of the sustainability index.
The proposed model has properties that enable it to provide a clear measure of sustainability status.Specifically, it should be noted that all values fall between [0, 1] (a scale of order 1), including the overall index.Furthermore, it is easy to see that an indicator with a value of 0 implies non-compliance, while a value of 1 indicates compliance within the predefined tolerance.Additionally, the model clearly shows that the best cases for sustainability are: If IC ec (t) = 1, all economic indicators are respected.On the other hand, in the event of failure of durability: If IC ec (t) = 0, this does not mean that none of the economic indicators are respected.Similar considerations apply to the overall sustainability index, as follows: As can be observed, if the overall sustainability index is strictly between [0, 1]: 0 < GSI(t) < 1, then this means that we do not have perfect durability and that at least one component is not perfect.It is also worth noting that, if the output value of GSI(t) is close to 1, then the durability should be slightly improved.However, if the GSI value (t) is far from 1 or close to 0, then the sustainability is significantly deteriorated, requiring radical changes and improvements in the economic, environmental and social components of the tourist destination studied.

Durability Adjustment
The sustainability adjustment (Adj) mainly occurs after the sustainability assessment.However, this does not mean that no immediate changes should be made in the face of unpredictable variations in sustainability performance.
The adjustment process of tourism sustainability involves evaluating the situation resulting from previous decisions aimed at correcting or improving problematic situations.
In practice, this evaluation aims to adapt and improve current actions at time t k in relation to future actions at time t k+1 .This involves evaluating the model's return values regarding the corresponding indicators and their standards, with specific tolerances.The resulting adjustments, in the form of recommendations and ratings, are then allocated to stakeholders based on their respective responsibilities.
The adjustments are revised according to three main criteria: Worst durability: This situation at time t k occurs if we obtain In this case, the immediate recommendation is to correct the underlying faulty indicators by improving their subsequent state based on the relationship: where the parameter Adj represents a relative quantity added to the failing indicators to achieve the performances and objectives targeted by decision-makers and/or responsible actors.Minimized Tolerance: The tolerance must be reduced upon its cancellation.It should be chosen as a decreasing value tending towards 0, i.e., τ → 0 .
Stabilize or increase the normative values: at each time period t k , for the elementary composite indices, this consequently improves the overall state of sustainability.

Description of the Plugins
Process IC ec (t), IC en (t) and IC so (t) After choosing the calculation time and the study area, the plugins IC ec (t), IC en (t) and IC so (t) allow you to automatically calculate the three indices of the sustainability compo- nents, as well the global sustainability index GSI(t), and to generate adjustments and Adj (t) recommendations for deficient indicators.To run the model program, the main user tasks can be summarized into three steps, as shown in the following Figure 1:

Durability Adjustment
The sustainability adjustment (Adj) mainly occurs after the sustainability assessment.However, this does not mean that no immediate changes should be made in the face of unpredictable variations in sustainability performance.
The adjustment process of tourism sustainability involves evaluating the situation resulting from previous decisions aimed at correcting or improving problematic situations.In practice, this evaluation aims to adapt and improve current actions at time tk in relation to future actions at time tk+1.This involves evaluating the model's return values regarding the corresponding indicators and their standards, with specific tolerances.The resulting adjustments, in the form of recommendations and ratings, are then allocated to stakeholders based on their respective responsibilities.
The adjustments are revised according to three main criteria: Worst durability: This situation at time tk occurs if we obtain  * ( ) −  * +  < 1 (9) In this case, the immediate recommendation is to correct the underlying faulty indicators by improving their subsequent state based on the relationship: where the parameter Adj represents a relative quantity added to the failing indicators to achieve the performances and objectives targeted by decision-makers and/or responsible actors.
Minimized Tolerance: The tolerance must be reduced upon its cancellation.It should be chosen as a decreasing value tending towards 0, i.e.,  → 0.
Stabilize or increase the normative values: at each time period tk, for the elementary composite indices, this consequently improves the overall state of sustainability.

Description of the Plugins Process 𝐼𝐶 (𝑡), 𝐼𝐶 (𝑡) 𝑎𝑛𝑑 𝐼𝐶 (𝑡)
After choosing the calculation time and the study area, the plugins  (),  () and  () allow you to automatically calculate the three indices of the sustainability components, as well the global sustainability index GSI(t), and to generate adjustments and Adj(t) recommendations for deficient indicators.To run the model program, the main user tasks can be summarized into three steps, as shown in the following Figure 1:  2.3.Tabs for Calculating the Composite Indices of the Three Components IC ec (t), IC en (t) and IC so (t) The calculation tabs for the composite index IC ec (t), IC en (t) and IC so (t) Figures 2-4  make it possible to assess the economic, environmental and social sustainability of previously georeferenced tourist areas.This window requires data entry, including calculation time, component indicators, associated weights, associated standards, and tolerance.These data must result from a consensus between the actors acting in the area studied.The user can choose from a list prepared in advance (connected to a csv file) validated by the World Tourism Organization (UNWTO) and its standards (Figure 5), if they are recognized, such as air pollution (Sulfur Dioxide (SO 2 ) µg/m 3 Health protection limit value 125th percentile of daily averages 99.2%).The result obtained appears on the map according to the parameters selected by the user, and a preview appears once the area is selected Figure 5.
ously georeferenced tourist areas.This window requires data entry, including cal time, component indicators, associated weights, associated standards, and to These data must result from a consensus between the actors acting in the area The user can choose from a list prepared in advance (connected to a csv file) valid the World Tourism Organization (UNWTO) and its standards (Figure 5), if they ognized, such as air pollution (Sulfur Dioxide (SO2) µg/m 3 Health protection lim 125th percentile of daily averages 99.2%).The result obtained appears on the map ing to the parameters selected by the user, and a preview appears once the area is Figure 5.   time, component indicators, associated weights, associated standards, and These data must result from a consensus between the actors acting in the ar The user can choose from a list prepared in advance (connected to a csv file) v the World Tourism Organization (UNWTO) and its standards (Figure 5), if th ognized, such as air pollution (Sulfur Dioxide (SO2) µg/m 3 Health protection 125th percentile of daily averages 99.2%).The result obtained appears on the m ing to the parameters selected by the user, and a preview appears once the area Figure 5.

Global Sustainability Index Calculation
The GSI(t) tab (Figure 6) makes it possible to assess overall sustainability by ing the three composite indicators previously calculated according to Equation ( the GSI calculation is performed, the information will be loaded into the study ar (attribute table).Insertion of data into the attribute table is performed automaticall data can be used by the user to provide further interpretation and illustration, g idea of the severity of unsustainability and allowing users to generate necessary ments.

Global Sustainability Index Calculation
The GSI(t) tab (Figure 6) makes it possible to assess overall sustainability by ing the three composite indicators previously calculated according to Equation ( the GSI calculation is performed, the information will be loaded into the study ar (attribute table).Insertion of data into the attribute table is performed automaticall data can be used by the user to provide further interpretation and illustration, g idea of the severity of unsustainability and allowing users to generate necessary ments.

Global Sustainability Index Calculation
The GSI(t) tab (Figure 6) makes it possible to assess overall sustainability by combining the three composite indicators previously calculated according to Equation (8).Once the GSI calculation is performed, the information will be loaded into the study area layer (attribute table).Insertion of data into the attribute table is performed automatically.These data can be used by the user to provide further interpretation and illustration, giving an idea of the severity of unsustainability and allowing users to generate necessary adjustments.

Adjustment Tab (Adj)
The Adjustment tab (Figure 7) groups together the defective indicators, their category (component to which they belong), their weights and the adjustments to be made.It also contains a table describing the proposed recommendations, with their values evolving according to their severity, translated by their deviation from the indicator and its standard.It starts with urgent, moves through very urgent, and finally reaches the catastrophic state of the indicator.The calculation here is performed according to Equation (11), which represents the deviation of the indicator from its norm.

Case Study: The Medina of Tangier
Tangier is a coastal city in Morocco located at the northern tip of the country, facing the Strait of Gibraltar, which separates the Atlantic Ocean from the Mediterranean Sea.The tourist destination considered represents a well-known historical and cultural destination called the Medina of Tangier.In the following section, we will apply the proposed model to this destination using the plugins, and we will analyze the results on its sustainability.

Adjustment Tab (Adj)
The Adjustment tab (Figure 7) groups together the defective indicators, their category (component to which they belong), their weights and the adjustments to be made.It also contains a table describing the proposed recommendations, with their values evolving according to their severity, translated by their deviation from the indicator and its standard.It starts with urgent, moves through very urgent, and finally reaches the catastrophic state of the indicator.The calculation here is performed according to Equation (11), which represents the deviation of the indicator from its norm.

Adjustment Tab (Adj)
The Adjustment tab (Figure 7) groups together the defective indicators, their category (component to which they belong), their weights and the adjustments to be made.It also contains a table describing the proposed recommendations, with their values evolving according to their severity, translated by their deviation from the indicator and its standard.It starts with urgent, moves through very urgent, and finally reaches the catastrophic state of the indicator.The calculation here is performed according to Equation (11), which represents the deviation of the indicator from its norm.

Case Study: The Medina of Tangier
Tangier is a coastal city in Morocco located at the northern tip of the country, facing the Strait of Gibraltar, which separates the Atlantic Ocean from the Mediterranean Sea.The tourist destination considered represents a well-known historical and cultural destination called the Medina of Tangier.In the following section, we will apply the proposed model to this destination using the plugins, and we will analyze the results on its sustainability.

Case Study: The Medina of Tangier
Tangier is a coastal city in Morocco located at the northern tip of the country, facing the Strait of Gibraltar, which separates the Atlantic Ocean from the Mediterranean Sea.The tourist destination considered represents a well-known historical and cultural destination called the Medina of Tangier.In the following section, we will apply the proposed model to this destination using the plugins, and we will analyze the results on its sustainability.

Medina of Tangier as a Historical and Cultural Destination
The Medina of Tangier, one of the city's tourist jewels, enchants with its charm.This ancient city is home to several historic mosques, picturesque alleys and other Moroccan buildings from different eras.In the heart of the old town is the famous Place du Petit Soko, the real pulsating center of the district.To the east of this square, you discover a group of mosques, among which the Great Mosque stands out.It attracts many visitors, fascinated by its authentic Moroccan-style architecture.
In the heart of the Medina is the Kasbah, built by the Portuguese in the 15th century .It is an ancient fortress and includes, among other things, the magnificent Dar el-Makhzen palace.The Kasbah is the best restored in all of Morocco.The Kasbah Museum is housed in the former sultan's palace, and the Morocco Museum has a rich collection of archaeological objects from the region.Also located in an early 20th century villa is Morocco's first museum of modern art, showcasing an interesting collection of abstract paintings.

Application of the Model
The proposed sustainability performance study was conducted for the initial period (t 1 ) from 2018 due to the lack of recent data.The characteristics of the Medina of Tangier are based above all on historical and cultural potential.The services provided and the relationship with the local community are also crucial aspects.Considering these factors, the collected data were chosen based on the selected indicators to be implemented in the evaluation model given by Equations ( 3)- (6).
The primary data for this study were obtained through meetings with stakeholders involved in OPEMHT.Additional information was collected from the Tangier Tourism Delegation (Table 1).The information collected was then analyzed and categorized according to the chosen indicators, as well as their associated standards and tolerances.

Analysis and Discussion of Results
The results concerning the destination Medina of Tangier, selected in the map under QGIS, were calculated in the dedicated plugins from the model based on the tolerances and weights adopted, as shown in Figure 2. Note that a greater weight has was attributed to the social component SI so (δ 3 = 5) due to its importance being recognized by all stakeholders, who consider that humans, with their rich traditions and customs, are a central element in the sustainable development process.Additionally, historical monuments are also regarded as the true capital of tourist destinations.On the other hand, the economic and environmental components, CI ec , CI en , have lower improvement factors (δ 1 = 1, δ 3 = 2).Then, based on these values, the sustainability state of the Medina of Tangier for the year t 1 = 2018 was determined to reflect the resulting interactions between the different sustainability components through indicators.Note that the indicators responsible for "unsustainability", based on their assessed values, can be easily identified from the fits in Figure 8.

Analysis and Discussion of Results
The results concerning the destination Medina of Tangier, selected in the map under QGIS, were calculated in the dedicated plugins from the model based on the tolerances and weights adopted, as shown in Figure 2. Note that a greater weight has was attributed to the social component  (δ3 = 5) due to its importance being recognized by all stakeholders, who consider that humans, with their rich traditions and customs, are a central element in the sustainable development process.Additionally, historical monuments are also regarded as the true capital of tourist destinations.On the other hand, the economic and environmental components,  ,  , have lower improvement factors (δ1 = 1, δ3 = 2).Then, based on these values, the sustainability state of the Medina of Tangier for the year t1 = 2018 was determined to reflect the resulting interactions between the different sustainability components through indicators.Note that the indicators responsible for "unsustainability", based on their assessed values, can be easily identified from the fits in Figure 8.The adjustment consists of compensating for the deficit observed in the values of the failing indicators by using the difference between the indicator value and its standard, as indicated in Equation (10).
Figures 9-11 display the values of the indicators for the three dimensions of sustainability within the studied area of the Medina and as shown in Figure 12, we observed that several indicators do not meet their standards.For example, although the indicator of "Number of visitors" presents an average lower than its standard, its impact on the calculation of the component economic is not particularly marked due to its relative insignificance in this component.However, its impact on the calculation of the overall tourism The adjustment consists of compensating for the deficit observed in the values of the failing indicators by using the difference between the indicator value and its standard, as indicated in Equation (10).
Figures 9-11 display the values of the indicators for the three dimensions of sustainability within the studied area of the Medina and as shown in Figure 12, we observed that several indicators do not meet their standards.For example, although the indicator of "Number of visitors" presents an average lower than its standard, its impact on the calculation of the component economic is not particularly marked due to its relative insignificance in this component.However, its impact on the calculation of the overall tourism sustainability index is notable, given that the weighting of the economic component is significant compared to the other sustainability components.On the other hand, the indicator "Number of permanently polluting vehicles" has a lesser influence on the overall index, even if its weighting is substantial in the environmental component.This is explained by the fact that the weighting of the environmental component is lower than that of the other components.
sustainability index is notable, given that the weighting of the economic component is significant compared to the other sustainability components.On the other hand, the indicator "Number of permanently polluting vehicles" has a lesser influence on the overall index, even if its weighting is substantial in the environmental component.This is explained by the fact that the weighting of the environmental component is lower than that of the other components.sustainability index is notable, given that the weighting of the economic component is significant compared to the other sustainability components.On the other hand, the indicator "Number of permanently polluting vehicles" has a lesser influence on the overall index, even if its weighting is substantial in the environmental component.This is explained by the fact that the weighting of the environmental component is lower than that of the other components.Therefore, our assessment model automatically qualifies the Tangier Medina site as relatively unsustainable.This is also reflected in the value of the overall sustainability index GSI (2018) = 0.51, which is far from the perfect value of 1. Indeed, in terms of persistent sustainability, the production result represents only 51% of perfect durability.This negative aspect should be avoided in the following year t2 (2019), as there could still be a risk of decline in unsustainability if the main responsible indicators are not properly adjusted, addressing the real causes of unsustainability.
The challenge of effective monitoring of the Medina of Tangier lies in maintaining the best indicators while improving the poor ones.This is essential to defend and protect this fragile site against possible internal deterioration and external disturbances, as well as to achieve a higher composite indicator.
It should be noted that adjustments and recommendations were partially implemented after the year 2018, taking into account the proposals of the Observatory for the Protection of the Environment and Historical Monuments of Tangier.However, this project has not yet been fully implemented, and it would have brought more flexibility and ease of operation.
The quantifiable measure has the advantage of being overwhelming and indisputable.Previous assessments lacked this specificity, being rather qualitative and subject to Therefore, our assessment model automatically qualifies the Tangier Medina site as relatively unsustainable.This is also reflected in the value of the overall sustainability index GSI (2018) = 0.51, which is far from the perfect value of 1. Indeed, in terms of persistent sustainability, the production result represents only 51% of perfect durability.This negative aspect should be avoided in the following year t 2 (2019), as there could still be a risk of decline in unsustainability if the main responsible indicators are not properly adjusted, addressing the real causes of unsustainability.
The challenge of effective monitoring of the Medina of Tangier lies in maintaining the best indicators while improving the poor ones.This is essential to defend and protect this fragile site against possible internal deterioration and external disturbances, as well as to achieve a higher composite indicator.
It should be noted that adjustments and recommendations were partially implemented after the year 2018, taking into account the proposals of the Observatory for the Protection of the Environment and Historical Monuments of Tangier.However, this project has not yet been fully implemented, and it would have brought more flexibility and ease of operation.
The quantifiable measure has the advantage of being overwhelming and indisputable.Previous assessments lacked this specificity, being rather qualitative and subject to multiple interpretations.It is up to decision-makers to determine whether to make the desired adjustments based on their political and community interests.
In this context, the importance of our study lies in the integration of geomatics in the exploration of tourism sustainability, thus allowing: First, provide clear information to decision-makers to facilitate decision-making aimed at protecting local resources that can be used to promote sustainable tourism development at the local level.Indeed, the plugins produced are used to evaluate both small and large tourist areas, they can be valuable tools for researchers and local, national or even international decision-makers by providing them with a complete vision of the sustainable aspects of a territory.This helps them to make informed decisions and simulate results according to their specific needs.
Second, the proposed plugins create relational synergies, fostering collaboration and agreement among stakeholders in a participatory governance approach, thus ensuring relevant solutions to sustainability issues in tourism destinations.However, mastery of the use of GIS software version 3.22, as well as most of their applications, is generally held by researchers specializing in the field.These tools are not easily accessible in terms of ergonomics for non-specialized users, especially since modifications are constant due to changes in the number and ownership of indicators.
In our context, plugins are considered part of an easy technical toolkit that offers the ability to diagnose, track and recommend adjustments via a simple and visible interactive interface.Tables do not always facilitate interpretations, especially when there are large amounts of data, which can lead to loss of information.
In our current situation, there is a direct opportunity to connect the Tangier Medina as well as other tourist destinations in the city to relevant information, including their overall sustainability levels and all economic, environmental and social data, taking into account the specific characteristics of each destination.These plugins simplify the task of local decision-makers in the city of Tangier, thus facilitating the making of informed decisions.The envisaged application also allows local residents to access relevant data related to the assessment of sustainable tourism in their city of Tangier.Our contribution consists of providing plugins that calculate the interactions between indicators and present the results through interactive maps, thus illustrating the state of sustainability of the areas studied, with the desired adjustments and associated recommendations.

Conclusions
This article introduces simple and user-friendly QGIS plugins developed in Python, which enable the automated processing and calculation of tourism sustainability indices.These tools assess the sustainability of tourist areas and are particularly valuable for decision-makers without advanced GIS skills.Designed to monitor, track, and manage attractive destinations threatened by the overexploitation of natural and cultural resources, these plugins address a crucial need [39].
The example of the medina of Tangier clearly demonstrates the effectiveness and practicality of the proposed model.It is now essential to continue this process of diagnosis and adjustment and to gradually extend it to several vulnerable tourist areas.
Regarding future prospects, this work can evolve on multiple fronts.For the model, it is possible to expand parameter options, such as indicators, stakeholders, weightings, standards, and tolerances, to better reflect reality.This is especially relevant, as research in this field progresses and offers increasingly tailored solutions.Responsibility for unsustainability can be clearly defined by assigning each indicator to the responsible actors.For example, in the case of infrastructure problems, responsibility can be attributed to the State and sector professionals.
The proposed model has helped stakeholders minimize the risks of unsustainability and opened the way to other challenges and issues.It is essential to involve all stakeholders in the process of managing the sustainability of a tourist area, starting with the choice of relevant indicators, determining reference standards, comparing these with actual indicators and producing an adjustment value to address any shortcomings, all within a participatory and responsible approach supported by user-friendly technology.
For the plugins, the development of a web interface facilitating data entry and visualizing results in the form of dynamic maps will be the focus of our upcoming work, centered on web mapping.The effectiveness of this work will depend on the careful selection of input parameters, the precision of calculations, and the understanding of recommended adjustments, all geolocated, thus ensuring continuous improvement of the results.
Most models generally limit themselves to the diagnostic phase.Our future goal is to define the responsibilities influencing each indicator, considering possible interactions between them.The multi-criteria decision-making approach (MCDE) will accomplish this task, making the model robust and applicable in various circumstances, whether in the choice of indicators, weightings, tolerances, interactions between indicators, etc.
Finally, Morocco is experiencing a resurgence after the COVID-19 crisis, with significant figures in terms of tourist numbers and revenue.However, it faces major challenges, including, notably, increased competition from similar markets and the need to adopt technologies, such as artificial intelligence, while preserving its natural and cultural resources for future generations.Integrating technologies, including mobile applications, into destination management strategies is essential to enhance the efficiency, attractiveness, and sustainability of tourism.

Figure 1 .
Figure 1.The main tasks performed by plugin users.

Figure 1 .
Figure 1.The main tasks performed by plugin users.

Figure 5 .
Figure 5. Selection of tourist area.

Figure 5 .
Figure 5. Selection of tourist area.

Figure 5 .
Figure 5. Selection of tourist area.

Figure 6 .
Figure 6.Sustainability assessment of the tourist area.

Figure 6 .
Figure 6.Sustainability assessment of the tourist area.

Figure 6 .
Figure 6.Sustainability assessment of the tourist area.

Figure 8 .
Figure 8. Overall sustainability index of the Medina of Tangier.

Figure 8 .
Figure 8. Overall sustainability index of the Medina of Tangier.

Figure 9 .
Figure 9.The composite indicator of the economic figure of the Medina of Tangier.

Figure 10 .
Figure 10.Composite environmental indicator of the Medina of Tangier.

Figure 9 .
Figure 9.The composite indicator of the economic figure of the Medina of Tangier.

Figure 9 .
Figure 9.The composite indicator of the economic figure of the Medina of Tangier.

Figure 10 .
Figure 10.Composite environmental indicator of the Medina of Tangier.Figure 10.Composite environmental indicator of the Medina of Tangier.

Figure 10 .Figure 11 .
Figure 10.Composite environmental indicator of the Medina of Tangier.Figure 10.Composite environmental indicator of the Medina of Tangier.Tour.Hosp.2024, 5, FOR PEER REVIEW 14

Figure 11 .
Figure 11.Composite social indicator of the Medina of Tangier.Figure 11.Composite social indicator of the Medina of Tangier.

Figure 11 .
Figure 11.Composite social indicator of the Medina of Tangier.

Figure 12 .
Figure 12.Adjustments of deficient indicators in the Medina of Tangier.

Figure 12 .
Figure 12.Adjustments of deficient indicators in the Medina of Tangier.

Table 1 .
List of indicators in 2018.