Introduction

In 2015, it was estimated that 71.16% of worldwide population used safely managed drinking water services (United Nations International Children’s Emergency Fund and World Health Organization 2015). Yet, prior studies have proven that improved water sources do not always secure safe drinking water since contamination still occurs in water at high percentage even from improved rural piped systems (Shaheed et al. 2014). Of various origins, particularly anthropogenic such as from nitrogen-based fertilizers, intensive agriculture practice, animal and human waste from farmhouse and on-site sanitation facilities, nitrate is one of the most common contaminants found in groundwater. Methemoglobinemia is the critical health effect from ingestion of nitrate-contaminated water (Agency for Toxic Substances and Disease Registry 2017) and is particularly alarming for infants. This led to several studies on the assessment and origin of nitrate in groundwater to help mitigate its effect through appropriate measures. In the assessment of nitrate concentration in groundwater in Saudi Arabia, it was found that 203 out of 1060 well waters have nitrate concentration exceeding the WHO maximum admissible value as results of agriculture and residential activities (Abdulrahman et al. 2010). In Malaysia, a cross-sectional study on nitrate contamination of groundwater showed that nitrate concentration in agricultural area exceeds the local maximum acceptable value and is twice higher than in the non-agricultural area (Shamsuddin et al. 2016).

In low-income countries, where improved sanitation is hardly affordable for most of the population, basic pit latrines are still extensively used as sanitation facilities. The high concentration of nitrogen in human waste and its downside effect on human health have made nitrate the most investigated chemical contaminant in groundwater from pit latrines (Graham and Polizzotto 2013).

Principal component analysis (PCA) is a widespread supplementary tool to assess groundwater geochemistry and nitrate contamination in groundwater, in particular. Multivariate analysis showed that three factors accounted for the groundwater chemistry in the Cameroon volcanic line areas (Ako Ako et al. 2014): geogenic factor, nitrate contamination factor and ionic enrichment factor. In the India Ganga basin, the use of multivariate analysis helped identify the relationship between variables that were difficult to decipher at first, and the shallow aquifer hydrochemistry was better understood (Ali Khan 2011). From PCA results, it was suggested that anthropogenic source from agrogenic and domestic sewage partly defines the groundwater quality in central Bangladesh (Bodrud-Doza et al. 2016). Assessment of the water quality and occurrence of high nitrate concentration in shallow groundwater of Imerimandroso area, Analamanga region-Madagascar using multivariate analysis indicated an anthropogenic source of nitrate from on-site sanitation use (Rasolofonirina et al. 2018a; b).

In Antananarivo, the capital city of Madagascar, also located in the Analamanga region, more than 1 million out of 2.6 million people lack proper water facilities (Malagasy Electricity and Water Service 2017). Hitherto, safe drinking water is not a guarantee for the remaining 1 million people. Protected dug wells, which are classified improved water sources, are still largely used by many households in the urban area of Antananarivo. However, water quality from such private supplies is rarely known by the users as studies did not take place before installation and almost inexistent during the course of utilization.

Ambohidrapeto is one of the most populated areas of the capital city Antananarivo. Apart from spring waters, which occur at high rate in some locations, dug wells are intensively used as water supply facility. On-site sanitation is dominant in the area and was randomly installed regardless of its effect on the groundwater quality.

The objective of this study is to assess the groundwater nitrate contamination in Ambohidrapeto–Antananarivo, Madagascar and its impact on the shallow groundwater and spring water mineralization process. Groundwater geochemistry and principal component analysis are used for this purpose.

Site description

Geographical location

Madagascar is an island nation, located in the southeastern part of the African continent, from which it is separated by the Mozambique Channel in its western part (Fig. 1). It is the fourth biggest island in the world. The study area is located in the township of Ambohidrapeto in the Analamanga region, at about 5 km from downtown Antananarivo, the capital city of Madagascar. It is entirely surrounded by paddy field on the eastern side, partly by agglomeration of houses and paddy field on the western side (Fig. 1).

Fig. 1
figure 1

Source: Google Earth, georeferenced and digitized using QGIS 2.14 Essen

Study area location, at regional and local scale. Details of the cluster houses, where the samples were collected are shown using satellite imagery. Sampling sites are also displayed.

Climate

Located almost in downtown Antananarivo, the study area has a subtropical highland climate with two distinct seasons: hot and rainy from October to March, called summer; cool and dry from May to September, called winter. On average, for a period of 37 years (1982-2019), Antananarivo receives 1390 mm of precipitation annually, with a maximum temperature of 21.9 °C and minimum temperature of 14.7 °C (Climate data 2020; Tutiempo 2020). The annual distribution is an average of 1309 mm from October to March; and an average of 81 mm from April to August, for the above given period. Within the rainy season, November until February are the most rainy months, consisting of heavy summer rains and tropical cyclone rains. The latter type of rain occurs mainly during the months of January and February.

Geological settings

Two-third of the geology of Madagascar is made up of rocks of Precambrian age, occurring in the central and eastern part of the country, from north to south (Fig. 2). The crystalline basement is composed of a collage of accreted terranes ranging in age from Archaean to Neoproterozoic (Schofield et al. 2010). The Archaean and Proterozoic rocks age range from ~ 550 to 2500 Ma (Kroner et al. 2000). The geology of Antananarivo, where the study area is located, is of two different types:

Fig. 2
figure 2

Source: GEOL500 database-Africa Groundwater Atlas

Extract of the geology and hydrogeology of Antananarivo. Synthesis map.

  • magmatic and metamorphic rocks from the lateritic hilly area, of Precambrian age, and

  • alluviums made up of clay, peats and sandy clays from the alluvial plain (WSUP Madagascar 2010), of Quaternary Period.

The Antananarivo block forms the basement of much of central Madagascar and is dominated by a big swath of migmatites, orthogneisses and granite that crop out in a broad north–south band across the island (Besairie 1968-1971). The rocks in this block have undergone amphibolite to granulite facies metamorphism (Nédélec et al. 2000). The metamorphism of felsic and mafic intrusive rocks led to felsic gneisses and mafic gneisses; respectively (Handke et al. 1999). Paragneissic series such as biotite gneiss, graphite gneiss, pyroxene gneiss, as well as quartzites, granite migmatite and migmate granite also characterize the area (CREAM 2013).

Alluvium gradually filled up the horsts detached from the ancient massif for the Itaosy-Ambohidrapeto ramp. In addition, the plain surrounded and invaded the ramp (Isnard 1955). From top to bottom, the alluvial plain is made up of thin clayey silt, which is the substratum of paddy rice fields, grey or yellow clay, more or less mixed with peat, and sand (Rasolomanana et al. 2011).

Hydrogeological settings

Under the lateritic hills, unconfined aquifer in kaolinic sandy clays and semi-confined aquifer in phaneritic and micaceous arena occur from top to bottom (WSUP Madagascar 2010). In this metamorphic basement, groundwater flows through a network of fractures. In some areas, where metamorphic rocks form the base level of the outcropping geologic formations, the aquifer is discontinued and recharge occurs through the overlaying arena. These rocks form a local, low productivity aquifer, where weathering and fracturing have increased their permeability and storage capacity. The typical thickness of the weathered aquifer is less than 20 m, and the aquifer is usually unconfined (Dochartaigh and Brighid 2019). Typical specific capacity values are 0.8 to 1.4 l/s/m (Rakotondrainibe 1996). In these areas, the residual term, which has not undergone the evapotranspiration process, joins the underlying aquifer, which is also recharged by the surface hydrographic network (Rakoto et al. 2017).

Under the Antananarivo plain, covering the unaltered basement is arena of mica-enriched sandy clay materials, kaolinic feldspars and ferromagnesian minerals covered with a layer of clay and constitute a confined aquifer (Dussarrat and Ralaimaro 1993; WSUP Madagascar 2010). The groundwater recharge mechanism in the floodplain is composed of three complementary processes: vertical infiltration of precipitation, lateral infiltration through the fracture network and rock alteration and vertical drainage of the superficial hydrographic network (Dussarrat and Ralaimaro 1993; Dussarrat 1992). The confined groudwater of the alluvial plain is in load and the groundwater level is very close to the surface, to which it may emerge during the rainy season (WSUP Madagascar 2010).

Methodology

Field works

Sampling sites were targeted during preliminary field visit based on the presence of potential pollution sources. The sampling campaign was carried out in August 2014, during the cool and dry season, and consisted of collecting water samples and carrying out in situ measurements of physical parameters (pH, temperature, electrical conductivity, Dissolved Oxygen-DO and Eh). The latter parameters were measured with a HACH Multimeter HdQ40. Calibration of the Multimeter was performed in the laboratory before the sampling campaign, according to the HACH manual procedures. Alkalinity was also measured in the field by titration with either 0.16 or 1.6 N sulfuric acid, depending on the electrical conductivity of the sample, after addition of Bromocresol Green-Methyl red powder pillow in the absence of phenolphthalein alkalinity. All information (date and hour of sampling, sampler’s name, geographical position, water table, existence or not of potential pollution source, type of potential pollution source, water supply use) and the physical parameters measured about the samples were registered in a ready to use Log Book. Twenty water samples were collected from 17 traditional dug wells, and 3 springs. The water table in the dug wells varies from 3.5 to 18.5 m. The dug well waters can be considered shallow groundwater. All samples were filtered in the field using Whatman nitrocellulose membrane filters, of 0.45 μm pore size and 47 mm diameter. Samples were collected in 50 mL polyethylene bottles, which were rinsed several times with the samples prior to filling the bottles (Khuhawar et al. 2019). For each site, different bottle was used to collect water sample for anion analysis and for cation analysis. For cation measurement, three drops of concentrated nitric acid were added to the samples (Khuhawar et al. 2019; Belkhiri and Mouni 2012) to prevent cation adsorption onto the sampling bottle internal surfaces. The samples were collected only when the pH value measured in three sample tests was stable (Mazor 2004; Mook 2000). Samples were preserved at cool temperature ~ 4 °C (Kebbekus and Mitra 2017) and were analyzed in the laboratory for major ions (Ca2+, Mg2+, K+, Na+, HCO3, SO42−, Cl, NO3).

Laboratory works

The major ions analyses were performed by Ion Chromatography (IC) Dionex-120, at the National Institute for Nuclear Science and Technology, Antananarivo-Madagascar. Cations and anions were measured separately on two different Dionex DX-120 IC systems. Cations were measured using IonPac CS12A column, and 20 mM Methanesulfonic Acid as eluent. Anions were measured using IonPac AS14A column, and 8.0 mM Na2CO3/1.0 mM NaHCO3 as eluent. Both systems are in suppressed conductivity detection mode, to minimize the effect of temperature on the conductivity of the solution. The equipment accuracy and precision is of 5%. The method detection limit for each major ion is given in supplementary materials. The samples were analyzed according to the following sequence for one measurement run: calibration standards (maximum five points calibration for calibration curves development) in duplicate each—three different control samples in duplicate each—unknown samples in triplicate each—the same control samples—unknown samples in triplicate each. The unknown samples were measured in two different runs, with the same sequence. The calibration standards are standard solutions from Dionex. The control samples are samples of known concentration obtained in the framework of the SADCMET regional intercomparison exercises and are used as internal reference materials, for quality assurance and quality control purposes. For the anion and the cation analyses, the raw data are processed by Chromeleon 7 and PeakNet, respectively. For each analyte, the calibration curves were adjusted if necessary, by eliminitating outlier in order to have the coefficients of determination r2 close to 0.99. Each analyte is identified by its specific retention time while eluting through the column and further quantified in the flow-through conductivity cell, which measures the electrical conductance of the analyte as it passes through the cell (Thermo Fisher Scientific Inc. 2012).

Analytical quality control and quality assurance were further checked by calculating the ionic balance of each unknown sample measured. Analytical results are reliable for ± 5% of ionic balance.

Principal component analysis

PCA is a method of reducing the dimensionality of a data set having a large number of interrelated variables, into a new set of uncorrelated variables, called principal components, while keeping the utmost variation (Jolliffe and Cadima 2016). The first principal component explains the most variability in the data and each consecutive component must be orthogonal to the previous one while describing in turn the maximum amount of the remaining variability (Davis 2002). PCA is one of the most prevailing multivariate statistical techniques since it allows reducing the number of variables while as much as the original information is retained.

For the present study, PCA was performed using SPSS v.19 with Kaiser–Meyer–Olkin–KMO (Kaiser and Rice 1974), Bartlett’s Test of Sphericity (Bartlett 1950) and correlation matrix as sampling adequacy assessment and suitability of PCA use. The eigenvalue greater than one rule (Kaiser 1960) is used as criterion for the number of principal components to rotate, and Cattell’s scree plot method as mean of verification. Rotation was performed using varimax rotation to associate each variable with one principal component at most and thus simplify the PCA interpretation.

Results and discussion

Physical parameters

Dug well waters

All physical parameters lie within a wide range, except the temperature. The median rather best represents the data set than the mean and the median value is given for each parameter (except the temperature). Detailed information, as well as the statistical summary of the physical parameters is given in supplementary materials.

Temperature ranges from 19.9 to 22.7 °C, with a mean value of 21.5 °C. This value is higher than the mean air temperature of the sampling period, which is of 16.1 °C (Tutiempo.net 2018). This indicates lower water table due to seasonal fluctuations, making air temperature no more prevalent at certain depth. The shallow groundwater is acidic with pH ranging from 4.02 to 5.76, with a median value of 4.75. The higher values (5–5.76) reflect pH value of rainwater and refer to most of the groundwater samples collected at shallower depth. The very low pH values could also be an indication of groundwater acidification, which may originate from natural and/or anthropogenic input of acidic salts (Knutsson 1994). Low water pH value is moreover linked to nitrate pollution as pH decreases while nitrate concentration increases (Dadgar and Payandeh 2017). Yet, the electrical conductivity is generally low and varies from 137 to 1073 μS/cm, with a median value of 401 μS/cm. For TDS, the minimum and maximum values are 70 mg/L and 581 mg/L, respectively, with a median value of 202 mg/L. Therefore, the shallow groundwater can be considered as fresh in terms of salinity according to Freeze and Cherry (1979). Eh values lie within + 59.30 mV and + 155.70 mV, with a median value of + 116.60 mV, thus inferring an oxidizing environment. These values are much lower than well-oxygenated waters, which have Eh values ranging between 300 mV and 500 MV (Søndergaard 2009), indicating partial oxygen consumption and the occurrence of pollution. DO ranges from 2.05 to 4.87 mg/L, with a median value of 3.25 mg/L. According to the United States Environmental Protection Agency-USEPA (2016); DO values < 3 mg/L are of concern for the water quality and values < 1 mg/L are considered hypoxic. While referring to typical DO values for freshwater at the water samples temperatures, which range from 8.6 to 9.1 mg/L (CWT 2004), it entails that oxygen consumption by bacteriological contamination may occur, although not depleting the oxygen completely.

Spring water

Similarities are observed between the physical parameters of the dug well waters and the spring waters:

  • Similarities of the mean temperature values. For the three spring water samples, the temperature values are 18.0 °C, 21.0 °C and 21.1 °C, leading to a mean value of 21 °C. For the dug well waters, the mean value is 21.5 °C. The lowest temperature of 18.0 °C is close to the mean ambient air temperature during the sampling period, indicating that groundwater level is close to the surface and is consistent with the characteristic of the confined aquifer in the alluvial plain.

  • Similarities of the pH values (for SP1 and SP2, with values of 5.6 and 4.5 for, respectively). SP3 has slightly higher pH with a value of 6.1

  • Similarities of the redox potential, which are all also positive for the spring waters although the values are generally lower (+ 67.4 mV for SP1, + 74.2 mV for SP2 and + 41 mV for SP3). More impervious soil type texture, at origin of the occurrence of spring, would be the reason of the lower Eh values. Oxygen diffusion in soil is greatly influenced by various factors, including soil texture and structure (Neira et al. 2015).

  • Similarities of the DO values (for SP2 and SP3). SP1 has higher DO value with 7.39 mg/L, which can be attributed to temperature effect (SP1 has the lowest temperature)

  • Similarities of the EC values with some EC values of the dug well waters. Although not statistically comparable regarding the sample size, the spring waters have noticeably more homogeneous EC values (384 μS/cm, 424 μS/cm and 381 μS/cm for SP1, SP2 and SP3, respectively) than the dug well waters, suggesting that the spring waters have the same chemical characteristics.

The analogies between the physical parameters of the dug well waters and the spring waters may be an indication of hydrogeological interconnection between the shallow groundwater and the springs.

Hydrochemistry

Dug well waters

Statistical summary of the hydrochemical data set is given in Table 1 and the detailed hydrochemical data are given in supplementary materials. The mean and the median values are different for all the major ions. This implies an asymmetric distribution of the data set. The standard deviations are particularly high, except for Ca2+, Mg2+ and SO42−. Indeed, for Na+, K+, HCO3, NO3, Cl, the concentration values are spread out over a wide range and are farther away from the mean values. For nitrate in particular, which has the highest standard deviation, the difference between the minimum and the maxiumum value is significant. Although ten out of seventeen of the data set have nitrate concentrations ranging from 122 mg/L to 189 mg/L, and the mean value of the data set is 191 mg/L, it still suggests that different levels of nitrate contamination occurs in the study area. The 5 percentile data indicate that only 5% of the data set has nitrate concentration below 114.05 mg/L, or equivalently 95% is above 114.05 mg/L. This value is more than two times the WHO permissible value of 50 mg/L (WHO 2017).

Table 1 Statistical summary of the hydrochemical data of the dug well waters and the spring waters in the study area

Because most of the major ions have high standard deviation, the mean is skewed by disproportionate share of low and high values, thus the median would better represent the typical concentration of each ion.

Major cations concentrations are on the average low, except sodium, which is the dominant cation with values ranging from 11.2 to 108.3 mg/L, and a median value of 48.90 mg/L. For major anions, bicarbonate is relatively low, with a maximum value of 40.6 mg/L while sulfate does not exceed 3.5 mg/L.

Spring waters

As with the dug well waters, the mean and the median values are also different for all the major ions (Table 1). There are, however, more approximate values of the mean and median (with Ca2+, Mg2+, K+ and Cl) for the spring waters than the dug well waters (only with Ca2+). This can be explained by the much lower sample size of the spring waters compared to the dug well waters’. On the other hand, it may indicate interconnection and/or the occurrence of the same geochemical reactions in the spring waters. Spring waters SP1 and SP3 have particularly very similar major ions concentrations (see supplementary materials), while to some extent, SP2 stands off from the two samples. SP2 was collected on the verge of paddy field and mixing with different water type may explain the difference. As results, Na+, HCO3 and NO3 have particularly high standard deviations. The spring waters also have as high nitrate concentrations as the dug well waters. The two types of water have a very approximate mean values. However, in view of the high standard deviations, the median values are considered more prevalent as for the dug well waters.

Sodium is also the dominant cation and chloride the second dominant anion after nitrate for the spring waters. Low HCO3 concentration, extremely low SO42− concentration and high nitrate content also characterize the spring waters.

Discussion

Similarities between the major ions concentrations of the dug well waters and the spring waters seem to indicate that the same geochemical reactions occur in the shallow groundwater and in the spring.

The low bicarbonate concentration is consistent with the low pH (Cole and Prairie 2009) and is an indication that nitrification occurred (USEPA 2002). This is in agreement with the high nitrate concentrations measured in all the water samples. The minimum value for nitrate is 79.3 mg/L-NO3 and the maximum value is 394.5 mg/L-NO3, with a median value of 166.76 mg/L. The probable cause of the high nitrate concentration is the presence of pit latrines in the dug wells‘surroundings as mostly observed in many developing countries (Templeton et al. 2015). Higher nitrate concentration is probably related to relatively close distance between pit latrines and dug wells (Kiptum and Ndambuki 2012; Adejuwon and Adeniyi 2001) in view of the absence of correlation between nitrate concentration and water table (Fig. 3). Diffuse recharge from precipitation would not be the process of nitrate discharge to groundwater in the study area, as an increased nitrate concentration with depth may be an indication that the source is from the surface and/or atmosphere (Sajil Kumar et al. 2014). Nitrate leaches to groundwater from the point sources (pit latrines) and moves along the groundwater flow, contaminating nearby dug well waters. Hydrogeological connection between the shallow groundwater and the springs through lateral flow may explain the high nitrate concentration measured in the spring waters (Fig. 3). Nitrate reduction is absent up to depth > 15 m despite the clayey soils types of the area, which would have allowed denitrification to occur by their anaerobic nature. The probable explanation for this inoccurence is the soil dryness during the dry season, allowing oxygen to be present. Denitrification proceeds more readily in waterlogged soil, where oxygen supply is more restrained (IPNI 2016). High concentration of nitrate had been found in different regions of Madagascar. In a small neighborhood, in downtown of Antananarivo city-Madagascar, 15 out of 19 groundwater samples had nitrate concentration above the WHO permissible value, with a maximum concentration of 352 mg/L-NO3 (Randrianomenjanahary 2017). Similar case was found in the Mahitsy Commune, Central Highland of Madagascar, where nitrate concentration as high as 580 mg/L-NO3 was measured in groundwater samples. Eleven out of fifteen samples had nitrate concentration above the WHO permissible value (Rasolofonirina et al. 2018a, b). In both cases, the high concentration was attributed to the presence of pit latrines around the water points. In an assessment study of the variables that contribute to nitrate pollution in groundwater at the African scale by statistical modeling, Ouedraogo and Vanclooster (2016) compiled a literature database of nitrate concentration in groundwater from around 250 studies. The authors used digital maps of physical attributes such as soil, geology, climate, hydrogeology and anthropogenic data and found that nitrate contamination could be attributed to four variables: depth to groundwater (shallow groundwater, typically < 50 m), recharge rate, aquifer type and population density, which is a proxy for anthropogenic pollution pressure. The latter variable would contribute to the groundwater nitrate contamination, not only in the study area but in Madagascar as cities are overpopulated and pit latrines are used in an inappropriate way.

Fig. 3
figure 3

NO3 versus water table of the water samples in the study area

Opposite to nitrate, sulfate concentrations are extremely low, with a maximum value of 3.25 mg/L. Sulfate reduction is unlikely probable in this oxidizing environment although sulfate reducing bacteria, which are commonly anaerobic, can be found in microhabitats of aerobic environments (Chapelle 1993). Besides, the occurrence of high nitrate concentration has been shown to inhibit sulfate reduction activity (He et al. 2010). Since denitrification did not occur, sulfate reduction would not be at origin of the low sulfate concentration as sulfate is reduced at much lower redox potential than nitrate according to the terminal electron acceptor processes-TEAPs (McGuire et al. 2002).

Such low sulfate concentration had been measured in shallow groundwater in different regions of Analamanga (Rasolofonirina et al. 2018a, b; Ramaroson et al. 2018) and can be attributed to aquifer background or of rainwater origin.

After nitrate, chloride is the second chemical of interest in groundwater contamination studies from pit latrines because of its high concentration in human waste and its relative mobility in the subsurface (Graham and Polizzotto 2013). In the study area, chloride concentrations are relatively high, with a maximum value of 127.92 mg/L for the shallow groundwater. The spring waters and the dug well waters have approximately the same median values, with 41.12 mg/L and 41.75 mg/L, respectively.

From the Piper diagram (Fig. 4), there are three hyrochemical facies: Na–Mg–Cl, which represents the main water chemistry with 40% of the water samples, followed by Na–Mg–Ca–Cl, with 25%, and Na–Mg–Cl–HCO3 with 20%. Magnesium is dominant in two samples having Mg–Na–Cl as hydrochemical facies. The spring waters and some of the dug well waters share the hydrochemical facies Na–Mg–Cl and Na–Mg–Ca–Cl, confirming the hydrogeological connection and the same aquifer.

Fig. 4
figure 4

Piper diagram of the water samples in the study area

Except for sample W11, Na/Cl ratios are greater than unity and may indicate silicate weathering as source of the sodium (Hounslow 1995). Magnesium could originate from mineral dissolution of the underlying metamorphic rocks. The ratio between Mg2+ and (Ca2++Mg2+), which is greater than unity for all the water samples, would suggest ferromagnesian minerals dissolution (Hounslow 1995). The large shift of the data from the 1:1 mineral dissolution line in the graph between alkalinity and total cation (Fig. 5) likely results from the substantial decrease in the alkalinity by other chemical processes, namely nitrification, which leads to pH and alkalinity reduction (USEPA 2002). Additional source of sodium from ion exchange process may also explain the upward shift. Both the Piper diagram (Fig. 4) and the graph between Na+ and C2+ (Fig. 6) indicate the occurrence of the latter process. There is a decrease in calcium while sodium increases and magnesium remains relatively constant.

Fig. 5
figure 5

Total cation versus alkalinity of the water samples in the study area

Fig. 6
figure 6

Na+ versus Ca2+ of the water samples in the study area

In the graph of Na/Cl versus EC (Fig. 7), the observed decreasing trend for the dug well water is an indication of the minor role played by evaporation in the shallow groundwater chemistry (Kumar Sajil and James 2013). Unlikely, Na/Cl ratio increases with EC for the spring waters. Regarding the chloride and sodium concentrations of the spring waters, chloride is almost constant while sodium differs between the three samples. This suggests that the spring waters have undergone more significant ion exchange process than the dug well waters. Considering that chloride dominant water type is uncommon in crystalline basement aquifer and evaporation is unlikely the source of chloride in the shallow groundwater chemistry, the graph between Cl and NO3 (Fig. 8), which shows an increasing trend (despite the low R2 value) infers that the two anions originate from the same source, probably from anthropogenic activities (Sajil Kumar et al. 2014).

Fig. 7
figure 7

Na+/Cl versus EC of the water samples in the study area

Fig. 8
figure 8

Cl versus NO3of the water samples in the study area

Correlation matrix

According to Moore et al. (2013); a strong positive correlation is defined by r2 > 0.7 while the correlation is moderate with 0.5 < r2 < 0.7. The strong positive correlations between TDS with both magnesium and chloride (r2 = 0.876 and r2 = 0.925 at p < 0.01 level, respectively) on the one hand and between the two ions (r2 = 0.847 at p < 0.01 level) on the other hand as shown in Table 2 are indications that they both contribute significantly to the water mineralization and may have the same origin.

Table 2 Correlation matrix of the physical and chemical parameters of the water samples

Strong positive correlations are also observed between TDS and all the major ions, except calcium, bicarbonate and sulfate. The moderate correlation between TDS and calcium justifies the occurrence of ion exchange, increasing the sodium concentration in the water at the expense of calcium. The high correlation coefficients between TDS and nitrate point out the dominance of anthropogenic activities. Nitrate is also highly correlated with Na, Ca, K, Cl, Mg in order of decreasing correlation coefficient (Table 2), denoting that most of the major ions contribution is of anthropogenic origin and from the same source. According to Rose et al. (2015), human feces may contain inorganic compounds such as Na, Ca, Mg, K and P. The correlation matrix of the chemical parameters shows that many variables are positively correlated. The Chi-square test statistic is 188.378 for a degree of freedom of 45 and the corresponding p value is less than 0.0001. The measure of sampling adequacy led to a Kaiser–Meyer–Olkin (KMO) value of 0.620. The data set is thus suitable for PCA, which is therefore useful for the data (Taherdoost et al. 2014).

Principal component analysis

PCA was applied using ten variables, namely total dissolved solids, dissolved oxygen, calcium, magnesium, sodium, potassium, chloride, nitrate, sulfate and bicarbonate. Those variables gave the best KMO value, given earlier, explaining the absence of pH and Eh in the variables set. The scree plot of the eigenvalue of each component (Fig. 9) shows that the first three components having eigenvalues > 1 are the most significant and account for 82.36% of the dataset total variance. The scree plot confirms the number of components extracted, with the eigenvalue decreasing below 1 after the third component. The total variance explained by the three PCs, their respective loadings and eigenvalues after varimax rotation are shown in Table 3. PC1 explained 52.88% of the total variance and shows strong positive loadings on TDS, NO3, Cl, Mg2+, Na+, K+ and Ca2+, confirming the common pattern for those variables (Zhang et al. 2014). NO3 and Cl have almost identical loadings, denoting their common source. The similarity between TDS, NO3 and Cl loadings specifies that the groundwater mineralization is dominantly governed by anthropogenic sources. Mg2+, Na+, K+ have lower loadings, yet approximate values with TDS, NO3, Cl loadings, pointing to mixture of different sources of these ions: a natural origin by dissolution of silicate minerals and an anthropogenic origin by the presence of pit latrines. The latter process would be dominant since nitrate has the highest loading. The lower component loading for calcium compared to that of sodium is an indication of ion exchange process as suggested by hydrochemistry. PC2 accounts for 15.33% of the total variance and has high loadings for bicarbonate and mainly sulfate. This component may represent the chemical reaction between atmospheric CO2 and water as origin of bicarbonate and the aquifer background reflected by the very low sulfate concentration. The eigenvalue of 1.533 for PC2 compared to that of PC1 (5.289) denotes a much lesser explanatory strength of this component. PC3 accounts for 14.02% of the total variance and has high loading for dissolved oxygen, reflecting the water quality aspect.

Fig. 9
figure 9

Scree plot of the eigenvalues

Table 3 Component loadings, eigenvalues and total variance of the two extracted components after varimax rotation

Figure 10 shows that PC1 characterizes W1, W7, W11, W14 and W15 chemistry. This is mostly governed by anthropogenic activities leading to very high nitrate concentration. Dug well water samples W3, W4, W5, W6, W9, W12, W10, W16 and W17 chemistry is less impacted by anthropogenic activities, although nitrate concentrations still exceed the WHO admissible value of 50 mg/L. PC1 singled out spring water samples SP1, SP3 and to a lesser extent SP2, and also dug well waters W5 and W8. PC2 sets apart W3, W12, W16 and W17 as shown in Figs. 10 and 11, and highlights the contribution of natural process at a greater degree in those samples. PC3 separated SP1 from SP2 and SP3, probably due to temperature dependent DO value as earlier suggested. PC3 particularly characterizes W8, W10 and W4, which have the highest DO values as an indication of less polluted water.

Fig. 10
figure 10

Second versus first principal component scores

Fig. 11
figure 11

Third versus second principal component scores

Conclusion

Hydrochemistry and principal component analysis applied to the study the groundwater mineralization process in dug well waters and spring waters in the Ambohidrapeto area, Antananarivo showed a water mineralization process dominated by anthropogenic activities, namely from pit latrines. Principal component analysis led to three extracted components, which accounted for 82.36% of the dataset total variance. PC1 explained 52.88% of the total variance and showed the strongest positive loadings on TDS, NO3, and Cl, with very close loading values and slightly lower loadings on Mg2+, Na+, K+ and Ca2+. PC2 and PC1 account for 15.33% and 14.02% of the total variance, respectively. Despite the anthropogenic leading, which mostly contributes to the NO3, Cl, Mg2+, Na+, K+ and Ca2+ concentrations, natural chemical process occur through mineral dissolution and silicate weathering as shown by the ionic ratios, contributing to magnesium and sodium concentrations. The latter ion concentrations further increased through ion exchange with calcium, as clearly shown by the correlation graphs between Na+and Ca+ and the Piper diagram, moreover, it is more pronounced for spring waters than for dug well waters.

The mixed use of hydrochemistry and principal component analysis proved to be a prevailing tool in understanding the hydro (geo) chemical processes, which control groundwater mineralization in Ambohidrapeto–Antananarivo. In areas of high anthropogenic activities leading to high nitrate concentration in groundwater, principal component analysis singled out the dominance of such processes over natural phenomena.