Assessing inequalities in urban water security through geospatial analysis

Water security, which is key for sustainable development, has been broadly investigated through different spatial scales, time frames and perspectives, as a multi-dimensional concept. Fast growth and the diversity of the urban environment add to the challenges of reaching good levels of water security in cities. Yet, few studies have focused on evaluating the heterogeneous distribution of water security in urban areas, which is a key step to highlight where inequalities in large cities are present and how to best guide interventions. The objec-tive of this research is to investigate the spatial heterogeneity of urban water security as well as quantifying inequalities using the new assessment presented in this paper. A holistic indi-cator-based evaluation framework to intra-urban sectors of the city of Campinas in Brazil is applied, followed by an inequality analysis to describe the distribution of water security aspects. A spatial correlation analysis is then carried out to identify patterns for high inequality indicators. Results show that even though Campinas has established good overall water security conditions, spatial heterogeneity is still noticeable in the urban area. Quantification of inequality by the Theil index highlighted aspects, such as vegetation cover, social green areas, and wastewater collection, that are inequitably distributed in the urban area


Introduction
Urban areas around the world are facing increasing water security challenges associated with rapid growth and climate change.In 2022, we saw cities around the globe experience extreme weather, particularly severe droughts [1] with significant impacts on water availability affecting food and energy production and human well-being [2].Additionally, urban areas are an intricate system of water and other infrastructures that coexist and interact in heterogeneous spaces.This heterogeneity and complexity increase with the size of cities, alongside pressures on the water system and resources.These conditions reinforce the need to investigate urban water security especially from a multi-dimensional perspective, considering the different aspects involved but also its dependence on space and time.
With several definitions, perspectives, approaches and assessment methodologies, water security is acknowledged as a broad concept and has been object of interest of scholars for decades [3][4][5][6][7].The UN considers water security as the "capacity of a population to safeguard sustainable access to adequate quantities of acceptable quality water for sustaining livelihoods, human well-being, and socio-economic development, for ensuring protection against waterborne pollution and water-related disasters, and for preserving ecosystems in a climate of peace and political stability" [8].This all-encompassing and well-accepted definition [7] provides an interpretation that includes not only supply and accessibility but also environmental, hazard, economic, social and well-being elements.
In the urban context, rapid growth and governance issues may lead to opportunities, infrastructure and services to be unevenly distributed in the urban area [9].As a consequence, the benefits of city life may not be equally available for all, leading to varying water security experiences for its inhabitants.The marginalisation of people in informal settlements and slums, inequality, insufficiency and urban poverty compromise water security [10,11].Therefore, in an urban environment, certain areas and communities can be more vulnerable to waterrelated issues [6].It is thus very important to develop policies that consider the spatial heterogeneity of the urban area.Being spatially explicit allows the identification of city districts or areas that require strategies for increasing water security.Incorporating a spatial approach to urban water security evaluation can help identify inequalities and provide information to identify areas at risk, helping to establish effective policies to protect the most vulnerable people, making sure that no one is left behind [12].
Previous studies have been interested in the question water security for whom?[13,14] through investigation of the spatial distribution of different water-related aspects.At a global level, Gain et al. [15] highlighted the importance of spatial and temporal assessment of performances to identify specific needs and persistent problems in different countries.Doeffinger and Hall [14] worked on evaluating water security across states and counties in the United States, showing evidence of how spatial analysis can reveal the heterogeneity across the country.The work by Stuart et al. [16] discovered geographical patterns and the spatial heterogeneity of water insecurity in rural Uganda as well as their implications for community water interventions.In terms of urban water security, the study by Tholiya and Chaudhary [17] provides a geospatial assessment of water supply services in Pune in India.While the investigation highlights the differences that were found within the city boundary, the evaluation focuses on water supply performance indicators.Other water security related aspects such as water infrastructure inequalities [18], ecological security [19], alternative water supply [20] and domestic water consumption [21] have also been spatially investigated in the literature, showing the importance of looking within the traditional boundaries as a way to capture disparities.
Although the importance of studying a smaller scale has been highlighted by different authors [11,14,20,22], few works in the literature have assessed urban water security holistically at intra-city level.The study by Mukherjee et al. [22] provided an evaluation at micro-level for 16 administrative regions in Kolkata, India focusing on availability, accessibility quality and risks as components of an urban water security index.Assefa et al. [23] developed a domestic water security framework applied to the city of Addis Ababa in Ethiopia, subdivided into ten administrative regions.The authors included water supply, sanitation and hygiene indicators in their assessment and the analysis showed considerable disparities in domestic water security within the city, indicating opportunities for local development.However, these studies tend to focus on the drinking water safety aspects of urban water security and lack the explicit incorporation of a spatial approach to their analysis.An in-depth and holistic evaluation of urban water security accounting for spatial patterns and inequality measure is not found in the literature.
In this study we present an urban water security assessment that explicitly accounts for the spatial distribution and patterns of water security elements.The main contributions are twofold: (1) we explore the spatial variability of water security from an intra-urban perspective following a framework that includes not only water supply and accessibility but also environmental, hazards, economic, social and well-being elements and (2) we further explore the heterogeneity of urban water security by including an inequality measure in the analysis.
In this way we investigate the diversity of the urban area by downscaling the assessment to urban districts and neighbourhoods, and visualising how the results are distributed in the area.This provides a more detailed vision of the city and allows the investigation of where inequalities lie.We investigate the 'what' and 'where' of the water security challenges in the urban area.This could lead to important information to help establish priorities for either monitoring or acting upon local issues, potentially leading to more equality and inclusiveness for water security in a city.We offer an exploratory analysis of such approach by using the city of Campinas in Brazil as a case study.
The paper is structured as follows: the next section describes the methods used in the development of the assessment framework, including the dimensions considered and the corresponding indicators, as well as the context of the city of Campinas and how data was obtained for the case study.We also present the data processing and analysis methods that are used in the framework.This is followed by a section presenting the results of the application of the framework to the city of Campinas, where we discuss the findings and highlight how inequalities emerge from the qualitative and quantitative analysis of spatial variation.Finally, we provide some perspectives on the approach and end with concluding remarks.

Assessment framework
Based on the analysis of gaps in existing water security assessment frameworks reported in literature [11,[24][25][26][27], an indicator based framework was created to evaluate urban water security.The choice and classification of indicators was guided by the United Nations definition [28] of water security-considered as an interdisciplinary, holistic and well-accepted view of the concept [7,24,29].Indicators were divided into different hierarchical levels: first the four dimensions, following the UN water security infographic [8], then categories characterised by one or more indicators.The aspects included in the framework are presented in the Table 1 that also provide references of works adopting similar variables to the assessment of water security.Dimension A: Drinking water and human well-being encompasses some of the fundamental aspects of water security such as having enough water in terms of quantity and quality available for basic needs.We also include in this dimension measures to indicate access to basic urban water services such as piped drinking water and wastewater collection at the  [32,33] Ratio between the average flow of renewable freshwater resources and population (in m 3 /cap/year) A1.3 Diversity of sources [25,34,35] Shannon Index accounting for the proportion of water coming from different sources household, as well as measures of how reliable these services are in the urban area.Finally, we consider the safeguard of health and well-being [8] in the city by including indicators of the incidence of water-borne diseases and access to social green spaces.The status of water resources, pollution-related aspects (including wastewater treatment), vegetation cover, efficiency of resource use and solid waste management are grouped under dimension B: Ecosystems.Dimension C: Water related hazards and climate change includes water hazards, resilience and protection infrastructure as well as indicators related to changing climate.Finally, social, economic and governance aspects of water use are included under dimension D: Economic and social development.
Once populated, since originally expressed in different units, the indicators were normalised between 0 and 1 following thresholds based on references from the literature and regional values [23,47].Detailed information on the measures for each indicator and the normalisation procedure is presented as supplementary material (see S1 File).Scores range from 1 to 0, with desirable characteristics given '1' and undesirable values, '0'.In order to calculate sub-indexes, the indicators are aggregated first by category and then by dimension, using the arithmetic mean of the indicators' scores.

Study area
The framework was applied to the city of Campinas in Brazil (see Fig 1A), the third most populous municipality in São Paulo state with an estimated population in 2020 of 1,213,792 people in a territory of 794,571 km 2 [64].One of the richest cities in Brazil, Campinas has gone through an accelerated urbanisation process in the last decade.Campinas, as many other cities in Brazil, is challenged by fast growth and urbanisation-between 1990 and 2018, the population of Campinas grew by 70% [64] and the urban area increased by 72% [65].It has nonetheless resources to monitor its infrastructure and potential to improve its urban water security.In addition, Campinas has five water treatment plants and, located at the meeting of three river basins, it has a collection system divided into 15 sewer catchments relying on over 20 wastewater treatment plants to serve the urban area [66], which makes this city an interesting case study for geospatial analysis of water security.The municipality recognises 77 territorial units within the urban perimeter and eight in the rural area [70].These territorial units are defined by the city's development plan [70,71] as the smallest territorial divisions (Fig 1B) that configure portions of the urban space that maintain a significant degree of homogeneity in terms of patterns or use of land and socio-economic characteristics [71].Already used by the local government, considering these sectors would facilitate communication with stakeholders, therefore, we adopted these as spatial units for application of the framework and study of urban security distribution in the urban area.

Data collection and processing
To quantify the indicator variables, secondary data were collected from reliable official databases, government agencies and organisations.Sources such as activity reports from the local water utility [72], surveys from the Brazilian National Institute of Statistics [64], municipal diagnostic reports [66], etc, were used for data collection.The use of public data renders the process transparent and reproducible by other parties.The data used in the application ranged between 2010 and 2014 as a consequence of availability.We have chosen to take a snapshot in time to have a consistent relationship between indicators.Using too large a time range could lead to an inconsistent view of the situation.The data sources and time frame can be found in the supplementary material (see S1 File), along with further details on data collection and normalisation.Data were collected for the city scale and when possible, to sectors within the city.Nonetheless, data were not always available at the scale of the sectors.In these cases, data were gathered at the smallest possible intra-urban scale and then transformed to the scale of the territorial units for the calculation of the sub-indexes (level of categories and dimensions).This transformation to the required sector scale was carried out using free and open-source software QGIS (version 3.16).Data analysis, normalisation, aggregation, and visualisation was carried out using GeoPandas (version 0.10.2) package for Python.To deal with missing data, a spatial interpolation using the k-nearest neighbours' method was carried out using the Scikit-learn (version 1.1.1)Python machine learning library.Once the data for all the indicators have been represented in the same scale, sub-indexes were calculated and urban water security maps for each category and dimensions were created to convey their spatial variability.

Data analysis
The number of divisions inside the city boundaries for the original data scale was considered as the sample size (n) for that measure.For example, an indicator where only one measure was available for the entire city boundary had a sample size of 1, while indicators for which data were available at a small scale, and specific measurements were available for all territorial units had a sample size of 77.The sample size was important to study the distribution of data.A minimum of five points was required for inequality analysis.
The Theil entropy index [73], a measure of regional disparities, was adopted as an inequality measure and calculated for the indicators across the sectors.This index measures an entropic distance between groups and an ideal state of equality, where all regions would have the same income, for example.It ranges between 0 (for ideal equality) and 1, with higher values indicating higher inequality.Usually adopted to measure economic inequality-used by the OECD to evaluate inequality in terms of productivity (GDP per worker at place of work) and GDP per capita for instance [74]-the Theil index can be employed to measure any variable of interest, from income inequality, to carbon intensity disparities across countries [75] and inequality in access to improved water source [76].It is calculated according to Eq 1.
with N as the sample size, y i the indicator (variable of interest) in the sector and μ the mean across the regions.The analysis of inequality is carried out at the indicator level in order to investigate what causes the observed variation in each dimension, but only when a sample size equal or larger than 5 is available.Indicators with higher levels of inequality were selected for an analysis of spatial autocorrelation.This allows us to evaluate how the score of an indicator in a sector correlates with neighbouring observations and to investigate the existence of patterns in the geographical distribution of the indicators.The global spatial correlation is a measure of aggregation of an attribute in the entire study area.Derived from the Pearson correlation coefficient, the statistic used is Moran's I [77].The null hypothesis tested is that a certain attribute is randomly distributed in the study area and the computation of an empirical p-value allows us to reject or accept the null hypothesis.A statistically significant p-value (we adopt p = 0.05) indicates a spatial distribution of the variable more spatially clustered than expected if the values were randomly allocated.Similar to correlation coefficients, the Moran's I can be positive or negative, between -1 to 1, with the higher correlation strength to values closest to 1 in absolute value.The positive spatial correlation indicates tendency to clustering of similar values while a negative coefficient, the clustering of dissimilar values.The global Moran's I statistic is given by Eq 2.
with n the number of observations (spatial units, indexed by i and j), z i the standardised value of the variable of interest at location i, and w ij the spatial weight (i-th row and j-th column).Following the analysis of global spatial correlation, a further spatial analysis of local correlation was carried out.Using local Moran's I (or LISA-Local Indicators of Spatial Association), we can identify clusters where unusual values are concentrated in space.Areas where values are above or below the mean are clustered and four situations can be identified: two when regions with high/low indicators are surrounded by regions with similar values (High/High and Low/Low, HH and LL respectively) and two when regions with high/low indicators are close to regions with opposite values (High/Low and Low/High, HL and LH, respectively) [78].Derived from Moran's I, the local Moran's I i is given by Eq 3: with n the number of units, z i the standardised value of the variable of interest at location i, and w ij the spatial weight (i-th row and j-th column).The spatial correlation analysis was carried out using PySAL: Python Spatial Analysis Library (version 2.6.0).The code used for the data analysis and result figures presented in this paper is available at: https://github.com/J-Marcal/WSF_IneqAnalysis.

Inclusivity in global research
Additional information regarding the ethical, cultural, and scientific considerations specific to inclusivity in global research is included in the supporting information (see S2 File).

Urban water security evaluation
The task of populating the list of indicators revealed different levels of data availability and granularity for the city of Campinas.Several indicators only had values for the entire city, especially for water quantity, climate change and governance.This process allowed us to audit the accessibility of free data for this case study and to note the impacts on the following assessment.Data at a small scale may be further available within stakeholders' organisations, however, for transparency reasons only freely accessible data were used in this study.
Most the of granular data available issued from a decennial national survey carried out by the Brazilian Institute of Geography and Statistics [64].Incorporating small scale monitoring to the local agenda and making that information available is important to better investigate certain aspects, especially in terms of governance and risks and climate change.Information such as temperature differences in the urban space can provide insights on urban heat island fluctuations for instance.These have been found to be related to urbanisation pattern and having influence on public health [79], therefore, detailed information on spatial distribution of temperature in urban areas can prompt public action and help improve different dimensions of water security.Nevertheless, small-scale free information from the state or municipality was difficult to find.Data for some indicators, such as diversity of sources (A1.3),metering level (A4.3) and water loss (A4.4) (Dimension A), were only available for the city scale, therefore, all the sectors received the same score and a study of inequality in the city was not possible.This was also the case for several aspects of dimensions C and D, for which data at a small scale was less available.This hinders the assessment on the urban water security heterogeneity since it is difficult to conclude if this is related to homogeneity of the urban area or if there was not enough data to translate the existing variability.
The results of the assessment at city and sector scales are presented to each of the four dimensions in Figs 2-5.These show the scores attributed for the city as bars and the scores calculated for sectors as circular markers.The size of the circular marker indicates the population living in each sector.The scores range from 1 to 0, with desirable characteristics given '1' and undesirable values, '0'.This visualisation shows the interest of our framework since it highlights the dispersion existent within the studied area for high scoring indicators, such is the case of affordability (A3.3) and access to wastewater collection (A3.2).
When aggregating the categories for the four dimensions for the sectors in the city, the spatial distribution of the results can be visualised, as seen in Fig 6 .Different scores are visibly distributed in the urban area, given an indication of existing spatial inequalities of water security.These results show less differentiation for dimensions C and D, for which granular data was less available.Nonetheless, even with the challenge of data availability, adding the spatial dimension to water security assessment allowed us to show, for all four dimensions considered, some variability in the aggregated scores.The results support the need to investigate inequality within the city boundary rather than considering the average value for the entire urban area.
The (A1) was found to be the most concerning category for the case study, with the lowest scores in the dimension, and water stress (A1.5) being the main challenge for the city (see Fig 2).The high concentration of people and economic activities in the region, associated with decreasing water availability over the years results in constant pressure in the basin's water resources and a low score for the city.The region has faced water crises in 2014 and 2016, while the available water quantity is a continuous concern of local organisations [80].
Regarding accessibility to services (A3), Campinas has been able to establish very good conditions in the urban area.Yet, it is possible to see markers with low score, representing sectors where challenges are still present as shown in Fig 2 .Data on sewage coverage (A3.2) for instance, showed some deficiency in the infrastructure of certain sectors in the outskirts of the city.For the last decade a plan to achieve universal sanitation has been implemented by the water utility [66]: for the time scale of this study, 83% of the population had access to sewage collation, a percentage that increased to 94% in 2020 [72].According to the Sustainable Cities Program, Campinas has achieved the goals for water supply and sewage collection and treatment from the SDG 6 but still faces challenges regarding water loss [81].
In terms of reliability of services (infrastructure reliability (A4)), measures of non-scheduled maintenance services (service reliability (A4.2)) were found for the different sewage collection systems, allowing visualisation of some variability between the sectors, especially highlighting low scores in the outskirts and south of the municipality.As for public health and well-being (A5), with little incidence of gastrointestinal infections (incidence of water-borne diseases (A5.1)) throughout the territory, the main component leading to diversity in this category was accessibility to green social areas (recreational opportunities (A5.2)).A very dispersed set of results showed an unequal distribution of scores, with districts in the centre having good access to parks and gardens and therefore high scores while sectors at the outskirts of the city received low scores.
The heterogeneity of scores was more prominent for the dimension Ecosystems (B)(see Fig 6B ) that also had the lower score, ranging between 0.34 and 0.74 for the urban sectors.Investigation of the categories of this dimension showed that indicators related to green coverage and environmental diseases, from the Environment (B1) category, presented relative low average scores and high dispersion within the city boundary (Fig 3).Campinas, as many other urban areas in tropical and subtropical regions, faces challenges with environmental safety (B1.2)-orwater-vectored-diseases, such as dengue fever.These are related to high population density, irregular supply, waste management, etc [82,83].The results also demonstrate challenges regarding green coverage (green areas (B1.1)).These are common to the urban context, due to the urbanisation process and high urbanisation rate in the city (in Campinas, of about 98%) [64].
In terms of the pollution control (B2) category, intra-city granular data for groundwater and surface water quality (B2.1 and B2.2) were not available, and therefore, little differentiation was observed for these aspects.As for wastewater treatment rate (B2.3), data from wastewater collection systems allowed us to verify diversity within the city.For the time scale analysed, improvement was required in some sectors, especially in the south of the city.However, substantial investment has taken place in the last decade which improves the score for this indicator.The wastewater treatment rate in the city increased from 72% in 2010 to 89% in 2020, with the water utility goal expected to be reaching 100% by 2025 [72].
A reuse water station, using membrane bioreactor (MBR) technology, is installed and in operation since 2012 in the south of the city.For this area, high removal efficiency is accompanied by high energy consumption, leading in some sectors to relatively low scores for the energy usage efficiency (B3.1) indicator [72] (Fig 3).Other districts that have their wastewater treated by energy demanding activated sludge and aerated ponds technology, also had lower scores for this indicator.As to wastewater reuse (B3.2), the practice is still limited due to legislation restrictions, resulting in a very low score overall.However, with a second water reuse station inaugurated in 2021, there is great potential to improve usage efficiency in the city of Campinas for the next decade [72].
As for dimension C: Water related hazards and climate change, in terms of water hazards (C1), Campinas did not face any drought during the decade preceding the evaluation date [84], and, although it has faced several flood events, the proportion of flood prone areas varies considerably in the sectors (see Fig 4).As for preparedness (C2), a wide distribution of drainage infrastructure and people living in hazardous areas was found.Nonetheless, due to lack of available granular data for other indicators in the dimension, possible existing spatial variation was attenuated and rendered virtually invisible in the final visualisation map (see Fig 6C).
Related to the SDG 13-urgent action to combat climate change and its impacts [85], the scores of dimension C are supported by the results found in the Sustainable Cities Program of which Campinas has taken part since 2012 [81].This program monitors participant cities in Brazil and evaluates them in terms of the Sustainable Development Index, adopting SDG indicators.According to their results, Campinas scores highly in terms of climate change performance, which also included greenhouse gas emissions and strategies for risk management and prevention of natural disasters.
For dimension D-Economic and social development, the spatial distribution of the aggregated score was similar to dimension C. It is less noticeable but still exists (see Figs 5 and 6D).This is expected in view of data collection challenges and low sample sizes obtained for some indicators in these dimensions: the lack of data granularity prevents the grasp of urban inequalities.Governance (D1) aspects in particular were only feasible at the city scale and therefore, no distinction is made for the sectors.Granularity was available for social aspects (D2) indicators and therefore, it was possible to observe a distribution of scores in the city for this category (see Fig 5).Gender equality (D2.6) results showed low scores throughout the municipality with only few sectors with a scores above 0.5.This was confirmed by the a similar low score received by the city of Campinas in the Sustainable Cities Program [81] for the SDG 5-Achieve gender equality and empower all women and girls, considering participation of women in decision making positions, wage inequality among others, major challenges were identified in order to achieve this specific goal.Interestingly, the score for income inequality (D2.3) was smaller for the city than for the sectors, an indication that the sectors are somewhat homogeneous, but differences can be found between them.This is supported by the results of average income (D2.4) that show a great dispersion of results (see Fig 5).As for economic development (D3) indicators, data were available only for the city scale, and translated the favourable economic position of the city-Campinas is a relatively wealthy city with one of the highest GDPs of the state [64].
The use of granular data and spatial visualisation clearly highlights the intra-urban variability for the different water security aspects.Similar to the results of Tholiya and Chaudhary [17] on the performance water supply services and Doeffinger and Hall [14] on sub-national water security assessment, the geospatial visualisation demonstrates the heterogeneity of the studied area.This helps to expose vulnerable regions, and therefore, could inform and support effective decision making.

Assessing inequality
The inequality of the water security indicators is measured in terms of the Theil entropy index.Results are presented in Fig 7.This figure shows the results of the inequality index against the scores for the sectors, with the ideal setting being high scores and low inequality index (0 would be ideal equality)-the bottom right quadrant, where most indicators are placed for Campinas.
Among the indicators from dimension A, data for recreational opportunities (A5.2) show a high inequality score (see Fig 7).Recreational green areas are important for well-being and life quality in urban spaces, nevertheless, intense urbanisation can often neglect this aspect.Campinas, in 2010, had 23 parks and other public green spaces for a population of 1,080,113 people [64], nonetheless, these were concentrated in certain areas and according to the local Environmental Office, 70% of the districts had no local social green area [86].In our study we consider the proximity of people to these areas, but we still find almost 20% of districts with no public green area within a 30-minute walk.Considering the distance to these local areas also has an effect on the distribution of the results.Even so, the presence of a range of scores shows inequality and consequently different levels of well-being resulting from the access to green areas.The disparity is being addressed by the local government-a municipal Green Plan, established in 2016, targets the deficit of social green areas and aims to implement linear parks in the city [86].
For the accessibility to services category (A3), very high scores were obtained overall, with water supply coverage (A3.1) specially clustered with low inequality index (see Fig 7) associated with high scores, indicating a very favourable situation for the city-99.5% of the urban population is connected to the drinking water supply network [66].The results for wastewater collection coverage (A3.2), on the other hand, show a higher dispersion and larger range of scores.Over 80% of the urban population had access to sewage collection in 2010 [72], and a Sanitation Program is in place aiming to provide the entire city with this service [66].Nonetheless, the data set in this study shows areas, especially at the urban edges, where the population still lacks sewage connection, relying on individual solutions [66].
Data are especially unequal for green areas (B1.1) and environmental safety (B1.2), for which data on the occurrence of environmental safety diseases are not only scattered but also tending to low scores, resulting in the highest inequality index of the dimension.In 2010, Campinas faced a large dengue fever epidemic with the majority of cases in health centres in the Northwest area of the city [87].In this study, low scores were attributed to several districts based on data from 61 local health centres, which, overall contributed to the resulting low and disperse score of the indicator and, therefore, of dimension B. Despite that, Campinas has resources to carry out prevention and warning actions and in 2015 the municipal government established a committee for combating arbovirus infections (such as dengue, yellow and Zika fevers) and coordinate prevention and response actions between different stakeholders [88].
Also a concerning aspect for the dimension B, the overall percentage of green areas (B1.1) to the total area is low in Campinas and in addition, the data show an unequal distribution regarding vegetation coverage, with specially low percentage in the city centre.This is closely related to the urbanisation process, high urbanisation rate (about 98%) [64] and population density [86].Since 2013, the municipality has worked on the recovery of green areas by planting trees and improving the inspection to promote natural regeneration [86].In contrast, solid waste collection (B4.1) presented a very clustered and high score result, with lower inequality index (see Fig 7).
As for dimension C, flood-prone areas (C1.3) and presence of storm drains (urban drainage (C2.2)) presented average scores and the highest inequality results for the dimension.The flood-prone areas (C1.3) are often related to insufficient drainage systems, increase of impermeable areas and occupation of valleys [66].In terms of urban drainage (C2.2), data show that only 57% of the public roads have underground storm drains in the urban area [89].Even if one argues that not all roads need storm water drains due to the geography of the watersheds, the results still show an important variation in the urban zone that can increase the vulnerability of certain areas.The other indicators analysed for this dimension (paved streets (C2.3) and people living in hazardous zones (C1.4)) are located at the bottom right quadrant, showing an overall good score and low inequality measure.This is compatible with the situation in Campinas, where a total of 2% of the of the households living at risk according to the municipal civil defence [89] and the majority of the streets in the urban area are paved (95% [66]).
Concerning social aspects (D2), literacy rate (D2.1) presented the highest overall score amongst the analysed indicators of dimension D. Literacy is crucial for the understanding of water issues and therefore the success of collective action.With a very clustered data set (low inequality index, as seen in Fig 7), the analysis shows a very favourable and consistent situation for Campinas, yet, when considering the large number of inhabitants of the city, in 2010 the number of people above 15 years old who were not able to read and write was over 28 thousand people [64].Since 2014 a campaign to end illiteracy has been carried out by the municipality, showing great progress in the last decade: the illiteracy rate dropped 46% by 2019 [90].
In terms of income, analysis of the Gini Coefficient (inequality (D2.3)) showed that income inequality inside the districts (comparing incomes inside the same sector) resulted in a rather clustered data set.Interestingly, the results for average income (D2.4) in the city showed a more spread-out behaviour with higher inequality index.This indicates that, while inside the sectors a more homogeneous situation in terms of income may be found, different sectors are living different realities: results showed an average income ranging between 2.5 and 35 minimum wages [64].The lowest average incomes were found to be in the south, southwest and north edges of the city, somewhat coinciding with areas where deficit of infrastructure was observed in the other dimensions.
The population living in informal settlements (informal dwellings (D2.5)), considered in the assessment of SDG 11-Make cities and human settlements inclusive, safe, resilient and sustainable, is identified by the Sustainable Cities Program as a big challenge for Campinas [81].The results in this study showed a generally clustered data set for this indicator (D2.5).This is due to the vast majority of districts having no or a small percentage of people living in such settings and therefore, high scores for this indicator.Nonetheless, the outliers in this case are significant: a few districts, especially in the south of the city, have higher proportions with up to 80% of the residents living in informal settlements [64].These areas are classified as highly vulnerable by the São Paulo Social Vulnerability Index, an assessment tool to identify areas most vulnerable to poverty [91].
Another social aspect that deserves attention is gender equality (D2.6), with low scores across the city (see Fig 7).Related to SDG 5-Achieve gender equality and empower all women and girls, this indicator shows great challenges for the city of Campinas (SDG 5 in Campinas received the lowest score in the Sustainable Cities Program evaluation [81]), translating the inequality of incomes in households headed by women and men.The present analysis placed this indicator in the bottom left quadrant of Fig 7 indicating a deficient and considerably uniform situation with low scores and low dispersion and inequality measures.
The quantification of inequality for water security indicators provides a valuable tool for decision making.It raises flags on which indicators show a wide, non-uniform distribution in the urban area.In addition, including this aspect allows us to quantitatively consider water security equity in the city, informing decision makers on aspects that require action to tackle inequalities.
Spatial variation.Dimension A, on drinking water and human well-being showed important variability for certain aspects such as access to recreational areas (A5.2) and wastewater collection (A3.2).The results from the spatial analysis showed some overlay between the low scoring regions for these indicators (Fig 8).
Wastewater collection (Sewage coverage(A3.2))scores showed a significant positive spatial correlation, with a Moran's I value of 0.522 and p-value of 0.001.This indicates a tendency of similar values being clustered in space.The results for local spatial correlation analysis showed the spatial association around each individual sector.For (A3.2), sectors with high scores for wastewater collection, near neighbourhoods that also have a high score (high/high score), are located in the city centre as seen in Fig 8A .This area is therefore composed of a group of sectors that have a very good infrastructure in terms of wastewater collection, while a cluster of low scoring areas near other low areas (LL) are found in the northern and southern outskirts of the city (see Fig 8A).The deficient areas (Low/low association, or cold spots) identified make up 8% of the urban area analysed and take in 4% of the population of Campinas.These results are in agreement with the diagnostics obtained in the Municipal Sanitation Plan of 2013 [66], particularly with respect to the neighbourhoods that lack sewage collection infrastructure.The cluster in the south of the city encompasses vulnerable neighbourhoods characterised by high population density, low income, and informal settings.The north cluster units do not include informal settlements and, although not as socially vulnerable as the ones in the south cluster, consist of isolated urban patches across the rural area.This entails certain infrastructure shortcomings such as households relying on individual solutions for wastewater management.
A similar trend is found for recreational opportunities (A5.2) (see Fig 8B), for which low/ low areas (cold spots) are situated on the suburbs (covering 8.9% of the urban area and near 5% of the population) while more central areas appear as a high scoring cluster.The development of green social areas was found to be associated with public or private interests during the urbanisation process of the city [92].That led to parks and other social green areas being located in more developed areas, where there was interest of capital, contributing to the observed inequalities.For this indicator, a negative local association is observed: a unit with low score, that is, a sector with little access to green social areas but surrounded by districts with accessible parks and other recreational opportunities.Despite that, overall, the indicator shows a positive global spatial correlation (similar regions tending to cluster) with Moran's I of 0.659 and p-value of 0.001.
Contrary to the trends observed with the indicators belonging to dimension A, areas with a low score for green areas (B1.1) appear clustered in the centre of the municipality (see Fig 9A).With a positive overall correlation (Moran's I of 0.303 and p-value of 0.002), the local analysis showed clusters of low/low association (cold spots) in the highly urbanised and dense city centre.The areas included in this cluster house 17% of the urban population and count for 8% of the area.This situation, connected to the urbanisation rate and process in the city, is closely related to the environmental pressures and the need to increase green areas in the city.The most recent municipal plans for conservation and recovery of native vegetation targets urban green areas as well as plans for the construction of several linear parks within the urban area have been announced [86].
In terms of environmental safety (B1.2),areas with low scores (high incidence of environmental related diseases, such as dengue fever) show tendency to gather (positive spatial Moran ´s I of 0.467, p-value of 0.001) in the northwest and south of the city (see Fig 9B).The contributing factors to the observed clustering pattern may be related to heterogeneity of infrastructure, land occupation or life habits [88].The clusters of low scores are consistent with the areas of high incidence of dengue fever identified by Johansen et al. [82] when analysing the relationship between social inequality and dengue fever incidence in Campinas.They emphasise the expansion of the peri-urban areas as a cause of spatial segregation and inequality in the access to urban resources and services.
The low values of dispersion and inequality observed for dimension C is also translated to the analysis of spatial autocorrelation.The indicator on the presence of storm drains (urban drainage (C2.2)) presents a data set with a low tendency to cluster with Moran´s I of 0.193 (pvalue of 0.015).A small area of cold spots is observable in the northern outskirts of the city in a small area corresponding to 2.3% of the urban area housing a little over 0.33% of the urban population (see Fig 10A).The region is also an area of low/low scores association for wastewater collection (A3.2) and recreational opportunities (A5.2), indicating a set of challenges in the area.
As for dimension D, income (D2.4)showed higher values of dispersion and Theil index.Presenting a positive tendency to cluster (Moran´s I of 0.575, p-value of 0.001), a large cold spot (low/low) is found in the southwest of the city (see Fig 10B), covering 25% of the area and 23% of the urban population.The area in the south of the city is also part of the identified low/ low scoring association clusters for wastewater collection (A3.2) and recreational opportunities (A5.2).This is a region where informal settings (D2.5) are predominant and communities are highly social vulnerable according to the São Paulo Social Vulnerability Index [91].It is also noticeable that the identified cluster of high income areas (high/high score association) presents some overlap with high scoring areas for access to recreational areas (A5.2) (as seen in Fig 8B).These overlays and regional disparities identified show that areas rarely face one specific water security challenge.As the dimensions of water security are interconnected, so are the challenges and advantages brought by infrastructure, policies, and management strategies.Therefore, a holistic and in-depth water security evaluation is crucial for sustainable urban water management.

Perspectives on the approach
We applied a holistic framework to assess water security in the city of Campinas, Brazil, and investigate the heterogeneity of its aspects in the urban context.This was done by incorporating inequality and spatial analysis to the assessment in order to reveal what the challenges are and how they are distributed in the urban area.This study was also presented to experts and water professionals in the field that have provided valuable feedback and perspectives on this approach.
Although data availability is viewed as a challenge to such detailed analysis, the potential of this downscaled assessment lies in the visual component which enables identifying what and where the urban water security problems are.This is considered to be an important asset to communication with policymakers.A follow up on possible solutions for local issues and their costs could then lead to regenerative actions.This type of approach can help raise 'red flags' in terms of what areas are being overlooked and realities that are getting lost in averages.
There is also potential in learning from within the city: sharing experiences and successes between different sectors or neighbourhoods on local initiatives, as well between stakeholders from different areas, equivalent to city-to-city learning [93].
The work for such detailed analysis is more labour-intensive than traditional water security assessment frameworks, but the involvement of stakeholders, when applying such approach can help obtain data and determine priorities.It is also important to consider the flexibility in terms of choice of indicators: this approach can be carried out for any indicator, depending on local issues and data availability.This flexibility should still be guided by the concept of water security and the different dimensions and aspects involved.Certain indicators adopted in this study, especially the inclusion of solid waste management, drew attention to its importance in water management within urban areas.
Including the inequality index as an extra measure and the spatial analysis to assess water security is therefore an asset to reveal hidden issues and tackle inequality in a local and targeted manner.

Conclusions
Including spatial and inequality analysis deepens the assessment of water security in the urban context.Downscaling the water security assessment presents both an opportunity and a challenge.Increasing the granularity of the evaluation allows incorporating the spatial dimension in the assessment and therefore investigating inequalities within urban boundaries.On the other hand, large data availability is required for evaluation.
In general, adding the spatial component to water security assessment enriches the evaluation allowing identification of spatial inequalities.The hierarchical approach allows each level to be uncovered to investigate where the differences lay.Challenges can then be pinpointed, and solutions proposed.For that, information at a smaller scale is key.Downscaling water security assessment is therefore a way to also audit the accessibility of data.Since large scale data can mask variability, downscaled assessment has the potential to encourage small-scale monitoring in urban areas, which, in turn, can promote the analysis of water security inequalities.Including measures of inequality in the urban water security assessment helps to identify aspects for which the city has reached an overall positive situation and where important differences still linger.This will then create incentives and opportunities to leave no-one behind.
The presented case study analysis allowed identification of local challenges for Campinas.While infrastructure challenges still remain in sectors in the north and south of the city, the highly urbanised centre lacks green coverage.Despite being a rich city, income inequality is present and the connection between economic and social vulnerability with other aspects of water security was identified.There is potential to achieve a more sustainable water cycle, especially in terms of wastewater reuse.Actions by the municipality, such as the Sanitation Program, show great effort to ensure equitable water services in the city.The assessment for Campinas represents a snapshot in time, with more recent data having been delayed due to the COVID-19 pandemic.Incorporating the temporal aspect in the analysis would allow comparison of the progress of the city in each water security dimension.This would be a valuable contribution for future work.
Ultimately, the proposed assessment delivers a visual tool to communicate regional disparities and challenges in the urban area.This can help facilitate communication with different stakeholders by including what and where in the outcomes of the urban water security assessment.

Fig 6 .
Fig 6.Spatial distribution of water security.Aggregated results for (A): Drinking water and human well-being (B): Ecosystems (C): Water related hazards and climate change and (D): Economic and social development.Labels on the maps show the highest and lowest scores found for each dimension.Territorial units basemap source: Campinas geospatial database from the Campinas Municipal Council https://informacao-didc.campinas.sp.gov.br/metadados.php[69], freely available to use.https://doi.org/10.1371/journal.pwat.0000213.g006