Possibilities for Assessment and Geovisualization of Spatial and Temporal Water Quality Data Using a WebGIS Application

The provision of webGIS-based water quality data services has become a priority area for both the public and administrative sectors in the context of the pandemic emergency associated with the global spread of COVID-19. Current geographic, monitoring and decision supporting systems, typically based on web-based geospatial information, greatly facilitate the sharing of spatial and temporal data from environmental databases and real-time analyses. In the present study, different water quality indices are determined, compared and geovisualized, during which the changes in the quality of the shallow groundwater resources of a settlement are examined in the period (2011– 2019) in an eastern Hungarian settlement. Another objective of the research is to determine three water quality indices (Water Quality Index, CCME Water Quality Index, Contamination degree) and categorize water samples based on the same input spatial and temporal data using selfdeveloped freely available geovisualization tools. Groundwater quality was assessed by using different water quality indices. Significant pollution of the groundwater in the time period before the installation of a sewage network was shown. Regarding water quality, significant positive changes were shown based on all three water quality indices in the years after installing a sewage network (2015–2019). The presence of pollution apart from the positive changes suggests that the purification processes will last for a long time.


Introduction
The deterioration of groundwater quality is a global problem, making it a hot issue of environmental research [1]. International studies show that communal sewage is one of the most significant sources of pollution in addition to industrial and agricultural activities, the treatment and purification of which is often unresolved for developed and developing countries [2][3][4][5][6]. Several studies specified that the lack of sewage treatment systems in rural areas causes sewage to enter groundwater, resulting in a severe degradation in groundwater quality in these areas [7][8][9][10]. Having reviewed the international literature, we found that although publications have been published regarding the environmental problems caused by sewage generated in settlements, a comprehensive investigation that would present the water quality before and after the construction of the sewerage network covering an entire town has not yet been carried out. In addition, knowledge of the baseline condition is necessary to assess the water quality changes, but most municipalities do not have such a settlement-wide spatial and temporal water quality data or geodatabase thus making comparative analysis impossible. One of the aims of our study is to fill this scientific gap [11].
A number of methodological approaches have been taken to categorize groundwater between good and poor quality [12,13]. As water quality status can be described by a number of physical, chemical and biological parameters, large amounts of data make evaluation and comparison increasingly difficult [14]. To solve this problem, Horton (1965) proposed the introduction of the first water quality index based on 10 important water chemical parameters [15]. The most important advantage of the various pollution indices is the pooling of chemical, physical and biological parameters into a single number, which makes information on water quality comprehensible to the public and policymakers as well [16,17].
The Water Quality Index (WQI), developed by Brown et al. (1970) based on weighted averaging, has been amended several times in recent decades [18]. Based on the WQI, the US National Sanitation Foundation Water Quality Index (NSFWQI) and the Canadian Water Quality Index (Canadian Council of Ministers of the Environment (CCME)) were created [19].
Thematic maps, based on water quality indices, give a comprehensive picture of the environmental problem and are easy to understand for people outside the scientific field [20]. Thus, the use of water quality indices in the description of the quality of both surface water and groundwater has become standard practice [21][22][23][24]. In the following decades, a number of methods were developed to aggregate monitoring data into a single water quality indicator [25][26][27][28][29] and to visualize water quality indices in Geographical Information Systems (GIS) [30][31][32].
In the epidemiological emergency of the COVID-19 pandemic, the provision of webGIS-based data services on water quality has become a priority area for both the state and public administration sectors. Currently, geographical, monitoring and decision support systems, typically based on web-based geoinformatic technology, greatly help to share and analyze spatial and temporal data of environmental databases in real time. The publication of geographic environmental data on the web is largely shifted to infocommunication platforms; therefore, criteria such as up-to-dateness, platform independence or an easy-to-use and accessible "map-based" communication interface must be met. Since the "geoinformatic revolution" named by Schütze in 2007, webGIS development tools and frameworks have unwittingly set out a development direction in the sharing and geovisualization of geographic information [33]. In parallel with the spread of web-based spatial information systems, the environment in which users interpret and handle spatial data has also changed. In the age of digitalization, the need for information associated with a geographic location to be communicated using geovisualization tools [34][35][36][37][38][39] emerged. The range of users has been further expanded, which has been supplemented by civil users after professional data providers supporting industrial-research use. The possibilities of publishing spatial data on the web have been greatly facilitated by the fact that the best-known map providers (Google Maps, OSM, Yahoo! Maps, Bing Maps, MapQuest, etc.) provide a custom tool system (e.g. Leaflet, OSM, Google Maps API, Azure Maps API) free of charge to display the data [40][41][42][43]. As digitalization accelerated, the ability to navigate in the digital space and on the digital map also became important in the information society, which were gradually included among digital competences, confirmed by numerous multidisciplinary research projects [44][45][46][47][48]. Of course, the geovisualization procedures found in scientific publications are not limited to spatial data or databases alone, as these techniques aim to develop visualization techniques via the use of maps, enabling them to effectively serve different disciplines involving a number of other data sources [49][50][51][52][53].
The novelty of our study is based, among other things, on the fact that although the use of various web-based geovisualization tools is widespread in earth sciences, the geospatial processing and complex online representation of municipal environmental data has not been the focus of research to date. Furthermore, we aimed to answer the question as to whether the web publication of the spatial data generated by the developed tool could provide the end-user with additional information about the water quality status of the study area by using his/her own cognitive perception.
In the present study, with help of a WebGIS tool, three water quality indices (Water Quality Index, CCME Water Quality Index, Contamination degree) were determined, compared and geovisualized, in the course of which changes in the quality of the groundwater resources of a settlement in eastern Hungary are examined in the studied period (2011-2019) after the construction of a sewerage network in 2014. Based on the above, our purpose is to publish and demonstrate the spatial visualization and processing of temporal environmental data of a Hungarian settlement, and also highlight the power of geo-visualization.
The specific objectives of the study were the following:  To develop an analytical web tool to determine and geovisualize water quality indices,  To map water quality and the degree of contamination across the settlement by using exported and calculated water quality data,  To assess the spatial and temporal water quality changes for the period 2011-2019,  To determine how different indices, categorize water samples based on the same input data.

Development of Geovisualization Tool
The geovisualization tool was developed using different technologies and programming languages. The geovisualization of the webmap and spatial data was implemented using Google Maps application programming interface (API) v3, Keyhole Markup Language (KML) and Chart.js tools [54][55][56]. The determination of water quality indices was performed by a Javascript code by utilizing the formulas described in the previous section. A filled-up Excel template should be uploaded to the index page of the website so that the determination and geovisualization can be implemented ( Figure 1). In order to create the portal, the BootStrap front-end framework created by the developer of Twitter and the interactive interface of Sufee Admin were used [57,58].
The code base was implemented following a procedural (imperative) programming paradigm. The server side part of the web application was developed using PHP [59,60]. The PHP language was chosen because it is a simple and widely used scripting language, easy to install locally on the server and capable of generating views using the PHP template. On the server side, the "app" component controls the execution, and requests are submitted into this app as well. In addition, the corresponding application logic is implemented here using collections of helper functions outsourced according to the target functionality ( Figure 2). The view that generates the response is also defined here. The implementation is done using the template-generating capabilities of the PHP language. The basic structure of the HTML page is defined in the template, and the alternative control structure of the PHP language is used to dynamically generate the parts depending on the variable data volume and values. Afterwards, the server sends back to the client page the corresponding HTML page displayed to the user. The calculations are performed after the input data is received and the results are stored on the server in the user session. In this way, it is not necessary to perform the calculation tasks (export, view change) again for each request.
Basic validation is performed on the data received from the user side (e.g., whether a given field has a value, whether the value is within a given range, etc.). This kind of validation of incoming data allows us to prevent invalid data reaching calculation algorithms that would likely cause errors on the server side. In case of an error, the user is notified about the result in the form of an error message on the interface [61].

Water Quality Index (WQI)
Calculation of the WQI was carried out following the 'weighted arithmetic index method' using the equation [18] where Qn is the quality rating of the n th water quality parameter, Wn is the unit weight of the nth water quality parameter. The quality rating Qn is calculated using the equation: where Vn is the actual amount of the n th parameter present, Vi is the ideal value of the parameter [Vi = 0, except for pH (Vi = 7)] and Vs is the standard permissible value for the nth water quality parameter. The unit weight (Wn) is calculated using the formula: where k is the constant of proportionality and is calculated using the equation:

CCME Water Quality Index (CCMEwqi)
This is a rating system developed by the Canadian Council of Ministers of the Environment in 2001 [19]. The ranking system is based on a combination of three factors: F1: Number of parameters tested that exceed the contamination limit (Scope). After calculating all the three factors, the WQI can be determined by the following equation: The factor value of 1.732 is introduced to a scale index ranging from 0 to 100, where 0 is the "worst", and 100 is the "best" WQI value.

Contamination degree (Cd)
The calculation of the contamination degree, Cd, is made separately for each sample of water analyzed, as a sum of the contamination factors of individual components exceeding the upper permissible value. Hence, the contamination index summarizes the combined effects of several quality parameters considered harmful to household water.
The scheme for the calculation of Cd is the following [ The evaluation of the WQS, CCME WQS and Cd statuses are shown in Table 1.

Description of Study Area
Significant progress was made in the collection and purification of municipal sewage in Hungary in the last decade. The difference in the proportion of dwellings connected to the water network and the sewerage network decreased from 31.5% in 2004 to 13.3% in 2018; thus, the secondary utility difference is expected to fall below 10% within a few years [62]. As a result of the investments made, the amount of municipal sewage entering the groundwater system is significantly reduced, the impact of which extends over the entire municipal environment. In order to be able to accurately determine the extent, intensity and duration of these changes, it is essential to survey the pre-investment conditions apart from continuous groundwater monitoring.
Báránd settlement is located in the eastern part of the Great Hungarian Plain ( Figure  3). It has a population of 2611 [62]. Construction of the sewerage network in the settlement was completed in 2014. By 2017, more than 95% of households had joined the network. According to our calculations, 30-40% of the domestic wastewater generated (appr. 120,000 m 3 each year) could have seeped into the soil and groundwater over the past few decades. This significant pollution discharge has caused heavy contamination in the settlement. Because of this contamination, the wells are monitored every year to detect potentially contaminated areas [63].

Water Sampling and Laboratory Measurements
In our research, 15 groundwater wells were investigated in the period 2011-2019. Water samples were collected from the upper 1 m water column of each well. The pH and EC were measured with a WTW 315i handheld meter and the NH4 + , NO2 -, NO3 -, PO4 3content of the collected water samples were determined using appropriate procedures according to the Hungarian Standards [64][65][66]. The Chemical Oxygen Demand COD was determined using the KMnO4 method, and Na + was determined by using a Perkin Elmer 3110 AAS.

Statistical Analysis
The software IBM SPSS 26 was used to perform statistical processing of the data series and to represent the results. The normality of the series was examined using the Shapiro-Wilk test. In addition to the calculation of the basic statistical values, mean, lower and upper quartile, mode, median and standard deviation boxplot diagrams were used for plotting the interquartile range, median, highest and lowest values.
Based on our hypothesis, the establishment of the sewerage system affects the quality of the groundwater; therefore, it was expected that the water quality would improve significantly after the construction of the sewerage network. To test our hypothesis, statistical tests were performed. Since, on the basis of the Shapiro-Wilk test, the data sets do not show normal distribution, evaluations of any positive or negative changes in the data sets are performed using the nonparametric Wilcoxon signed-ranks test [67]. Wilcoxon signed-ranks test is widely used to determine whether there is an average difference between two paired data, when the normality assumption is doubtful. If the value of Asymp. Sig. (2-tailed) is smaller than <0.05, then Ha is accepted. Conversely, if the value of Asymp. Sig. (2-tailed) is greater than >0.05, then Ha is rejected.

Description of Geovisualization Tool
A geovisualization web tool was developed which can be used to determine and geovisualize groundwater quality based on the input spatial and temporal water quality data. The work process can be divided into three main parts. During the first part, the study area should be selected, the wells located in the area should be identified and their geographic positions should be recorded. During the second part, following the completion of a template, the document can be uploaded to the webserver where, after the validation of the given parameters is performed, water quality and degree of contamination indices of temporal data are determined and geovisualized. The validation of parameters and limit values includes quality assurance methods which make it easier to identify and correct the errors of the input data -whether it was recorded in the field or added later as measured laboratory data. This means that during the determination of water quality, the user will not receive a misleading result because of the incorrectly recorded parameters, thereby improving the accuracy of the water quality determination process. If any of the parameters provided by the user are incorrect, the server sends a message to the users informing them about the incorrect parameters or limit values which should be corrected before upload and analysis [61].
Native JavaScript has been used to manage user interactions. The user interface is supported by components developed in the Bootstrap CSS framework, which provides the most intuitive and comfortable environment for the user in terms of "user experience". On the home page, the user has the possibility to specify the exact location of the Microsoft Excel file on his/her computer containing the parameters on which the calculations are based. The default values for other parameters relevant to the processing are also provided here and can be modified as required.
The results are displayed on a new page after the appropriate calculations have been made. The user can view the calculation results in a summary view or see details in both tabular and geovisualised forms (Figure 4). Data visualization and geovisualization for faster and more efficient cognitive interpretation and easier overview are implemented using Google Maps map and Chart.js chart drawing library. In terms of use, the input data are obtained from a standard Microsoft Excel file and the calculation results can be exported from the application in the same format ( Figure 4).
The spatial data of the investigated wells are converted into KML format. This provides a standard format that can be used in external systems. This is achieved by uploading a KML template, based on an own designed logic. Additionally, a customized JavaScript-based KML parser was implemented for the generated format, which is the basis for the visualization on the map. Geolocation on the map is performed using the Google Maps JavaScript API. These KML management tools have been developed in an application-independent and reusable way.
The geovisualization of water quality indices and water quality statuses are provided by the interactive user interface which represent the ratio of the values of each water quality indices and the ratio of their potential usage based on the water quality of groundwater wells. The data to be visualized on the webmap are represented by KML layer. The KML layer contains the results of indices determined based on the groundwater quality parameters of the uploaded wells, where information bubbles near the placemark show the investigated wells based on the degree of contamination, using unique symbols (Figures 5-6).   The main advantages of using 2D geo-and data visualization with a web application are that the geospatial pre-processing (data structure creation, database management, styling, layer management, water quality index definition, analysis) and publication of time series spatially referenced environmental data imported into the system can be done in one interface; therefore, no additional platform or software environment is required for post-processing. An additional advantage is that after exporting the KML, it can be interpreted by many other geographic information systems apart from Google Earth and Google Maps, and can perform conversions between systems, allowing users to visualize complex spatial analyses without programming knowledge. As users do not need their own server to share the data on the web, the results are available to anyone after processing. However, due to the upload limit, visualization of larger databases is not enabled in the current version of this application. Another drawback in terms of geovisualization is that the size of the input data reduces the speed of data loading as well.

Spatial and Temporal Distribution of Groundwater Quality
In order to explore and analyze the spatial and temporal distribution of exported water quality data, the values for each well were also plotted on thematic maps. The results were performed with ArcGIS 10.4.1 software. After categorising the water quality of the wells, pollution maps of the settlement considering the different indices and sampling years were prepared. Regarding the spatial changes of the degree of contamination, it was found that in the period before the establishment of the sewerage network, the central and south-eastern areas of the settlement can be regarded the most polluted, where the majority of the wells were classified category 5 regarding water quality in the case of all three indices (Figure 7, Figure 8, Figure 9).
Following the transition period of 2015-2016, the proportion of wells marked with a red color code decreased spectacularly during the period of 2017-2019. In the central areas of the settlement, the degree of contamination decreased by 1-2 categories for almost all wells. For all three indices, the water quality status "Good" appeared in the central and southern areas of the settlement in the case of Cd and CCMEwqi (Figure 7, Figure 8, Figure  9).
Based on the changes revealed, it can be stated that the purification processes in the area have begun, but our results show that pollutants entering the environment remain in the system for a long time. Further long-term groundwater monitoring is necessary to track changes of the contamination in both time and space.

Assesment of Spatial and Temporal Changes of Water Quality
The index values (WQI) determined on the basis of input data are plotted on boxplot diagrams by year, indicating the category related to the value. The index values were then classified into 5 pollution categories (WQS), where the first was the best and the fifth was the worst quality ( Figure 10, Table 2).
In the case of Brown's WQI, it can be clearly seen that in the years before the establishment of the sewerage network (2011-2014) the majority of wells were classified "Unsuitable" or "Very poor" and after a two-year transition period (2017-2019), both the upper and lower quartiles showed a clear decrease ( Figure 10). According to WQS, the number of category 5 (Unsuitable) wells decreased by 40% in the years following the establishment of the sewerage network ( Figure 10, Table 3). While the median values ranged within the "Unsuitable" category until 2015, they were in the "Poor" or "Very Poor" categories from 2016. The positive changes are also illustrated by the fact that five years after the establishment of the sewerage network, 40% of the wells were in the categories 2 and 3 (Good, Poor), while in the years before the establishment of the sewerage network this proportion was around 0-26% ( Figure 10, Table 3).
Purification processes can be detected based on the Cd index as well. In the period before the establishment of the sewerage network, both the lower and upper quartiles were in the worst "Very high" category. However, after establishment of the sewerage network, the lower quartiles shifted into the category "Medium" or "High". The values of the upper quartiles also decreased significantly, from 13.58 before the establishment of the sewerage network to 8.27. The average value of the pre-sewerage period (8.61) decreased to 5.29. In the case of WQS, the number of wells in the most polluted category typically decreased by 40% ( Figure 10, Table 2).
Considering CCME WQI, higher index values mean better water quality. The average value of 43.86 in the pre-sewerage period increased by nearly 30% to 59.56 in the period between 2016 and 2019. The lower quartile rose from 29.3 to 41.9, while the upper quartile rose from 53 to 77.1 in the post-sewerage period. Thus, while the values of the upper quartile were in the "Marginal" category in the pre-sewerage period, they were in the one higher "Fair" category each year from 2016 onwards after the sewerage network was established. The number of wells in the worst category showed the most significant decrease in the case of this index. In the post-sewerage years, it typically decreased by 30-50% compared to the pre-sewerage years ( Figure 10).    Date N  R1  R2  R3  R4  R5  R1  R2  R3  R4  R5  R1  R2  R3  R4  R5   2011 14  0  1  3  0  10  0  1  0  3  Of course, the effects of sewerage on water quality do not occur immediately, and there is also a natural change in each year. Therefore, in order to better illustrate the effects of sewerage on index values by eliminating fluctuations in each year, the data series was broken down into 3 periods: 1/ the period before the establishment of the sewerage network between 2011 and 2014; 2/ the transition period of 2015-2016; and 3/ the period after the establishment of the sewerage network between 2017 and 2019 ( Figure 11). Although positive changes can be seen during the two-year transition period, these values are still more closely related to the data series of the pre-sewerage period. Data for the period 2017-2019 are clearly separate from the data for the pre-sewerage period ( Figure  11). The positive changes are supported by further statistical analyses as well. Studying the pre-sewerage (2011-2014) and post-sewerage (2017-2019) data series using Wilcoxon's signed-ranks test significant differences were shown for all three indices, which is clearly explained by the effects of the sewerage network ( Figure 11). The strongest significance (p=0.001) was found in the case of the CCCMEwqi, where the Z value was -3.279. For Cd and WQI nearly identical values were obtained, which significantly indicate the positive effects of sewerage albeit to a lesser extent (Table 4).

Discussion
According to the aims given by [35], "geovisualization is both a process for leveraging the data resources to meet scientific and social needs and a research field that develops visual methods and tools to support a wide array of geospatial data applications. To support real-world knowledge construction and decision making, some of the most important challenges involve distributed geovisualization-that is, enabling geovisualization across software components, devices, people, and places." This specific field has already become widely known in many fields of environmental science, as is proved by several scientific papers containing sections which also highlight the geovisualization aspects of their results [34][35]45,47].
The validity of our study has been supported by other case studies that focus on the design, development and analysis of user-centered, novel collaborative geovisualization tools [68][69][70]. Studies are consistent in that an easy-to-use graphical user interface, decision support based on spatial data and the integration of data into other platforms are essential for efficient geovisualization [69,70]. However, it should be underlined that while innovative geovisualization web applications published on the basis of current trends are supported by a wide range of standards, development tools and frameworks, the inclusion of the latest IT technologies (Big Data, Cloud, Artificial Intelligence) offers an interesting research challenge.
Based on the results of geovisualization, our study showed a high level of contamination of the groundwater resources of the settlement in the period without sewerage, which is in accordance with similar studies carried out in municipal environment [23,26,28]. Data from studies on groundwater quality change following the construction of the sewerage network showed positive changes in groundwater quality, similar to our own results [11]. At the same time, it is important to mention that literature on improved water quality after sewerage is limited, which is one of the reasons why our long-term monitoring results can be important additions to the literature and may draw widespread interest.

Conclusions
In the course of our research, changes in groundwater quality in a settlement after the establishment of a sewerage network were evaluated using three different water quality indices. Based on input data for the pre-sewerage (2011-2014), transitional (2015-2016) and post-sewerage (2017-2019) periods, significant positive changes for all three indices were found. For index values, both the lower and upper quartiles shifted towards better water quality. While in the pre-sewerage period the majority of wells were classified as highly contaminated, contaminated (Rank 4-5), in the post-sewerage period, the number of wells with low or medium contamination (Rank 2-3) increased significantly for all three indices.
Assessing the spatial changes of the contamination, it was found that the inner and south-eastern areas of the settlement were the most polluted in the period before the sewerage network was established. In the period following the establishment of the sewerage network, the degree of contamination in the inner areas of the settlement decreased by 1-2 categories in almost all wells. For all three indices, the water quality status "Good" (rank 2) appeared in the central and southern areas of the settlement. However, in addition to significant positive changes, the level of contamination remains high in many cases, which highlights that, although the purification processes have started, they will last for a long time to come. Further long-term groundwater monitoring is necessary to track the changes of contamination in both time and space.
The complexity of the term geovisualization closely reflects its interdisciplinary or multidisciplinary characteristics, since acquiring information by observing geovisualized spatial and temporal water quality data can support different cognitive processes. The key factor is demonstrated in the process of geovisualization, during which uploaded data of monitoring wells were transformed into a special form enhancing the co-evolvement of cognitive processes with WebGIS tool:  The most important advantage of developed geovisualization tools is the visualized spatial environmental data, which makes valuable information understandable for both the public and decisionmakers.  Revealing relationships between the investigated wells and the location became easier after geovisualization.  Geovisualization facilitates the capturing of the spatial pattern of the distribution of different water quality indices at different times.  The general cognitive perception of digital data is supported. The more parameters are used, a greater need can be identified for supporting the appropriate interpretation of the data.