1 Introduction

The world's population relies on groundwater as a significant source of freshwater supply for household, industrial, and agricultural uses [1,2,3,4]. Almost 20% of the global population use groundwater for drinking purposes [5]. Depletion in the quality and quantity of groundwater puts pressure on the entire ecosystem [6] by posing major pollution concerns and consequent health hazards [7]. Therefore, a healthy and sustainable supply of drinkable groundwater is critical driver of a nation’s sustainable development and must be secured [3, 4].

In many Nigerian cities, including Ibadan, the demand for groundwater has greatly increased due to rapid population growth, urbanization, agricultural production, and industrialization, leading to a magnified reliance on groundwater [8]. Thus, this has triggered significant alteration and deterioration of both regional and local ecosystems including the hydrological cycles thereby posing threat to groundwater quality [9]. Specifically, studies have shown that dependence on groundwater, rapid urbanization, population growth, and unregulated domestic and industrial waste disposal practices have increasingly threatened the quality of groundwater of Ibadan [10, 11]. Municipal dumpsites, industrial effluents, and septic systems contribute to the contamination risks, making routine water quality monitoring essential to safeguard public health and ensure the sustainable use of this vital resource [12]. In light of these challenges, regular water quality assessments are necessary to identify contamination sources, manage pollution risks, and guide policy interventions aimed at improving groundwater management in Ibadan.

Regular monitoring of groundwater quality is critical to avoiding potential risks to human health. Furthermore, identifying unsafe water sources plays crucial role in rationalising water quality evaluation and monitoring strategies [13]. Notably, similar studies have assisted decision-makers in understanding protection of groundwater resources and have provided an excellent opportunity for researchers to gain a better understanding of the characteristics of our aquifers and how they formed.

This current research focuses on Ibadan metropolis in southwestern Nigeria, a major city that was long growing in the absence of a planning strategy [14]. Recent studies have shown that the quality of groundwater in this area is at risk due to anthropogenic [15,16,17,18,19,20,21,22] and geogenic [23, 24] contaminations. The majority of the studies revealed that groundwater quality ranged from ‘good quality status’ to ‘unsuitable for drinking’, with most of the water categorised as unfit for consumption. These discoveries are worrisome, and we believe that the situation requires further investigation. As a result, it is preferable to use other state-of-the-art index of assessment and inform the public about the gravity of the situation.

For years, various studies on assessment of groundwater quality have been undertaken. The traditional Water Quality Index (WQI) groundwater assessment method is the most popular. WQI makes it simple to evaluate important variables that influence the quality of groundwater [25,26,27]. The WQI method is easy to use, produces consistent results, enables the comparison of water quality over time and geographic dimensions, and assesses water quality using multiple parameters [28,29,30,31], however some of its limitations such as inability to reflect the complexity of water quality, subjective interpretation, inapplicability to all type of water body, low sensitivity in detecting subtle changes in the quality of water among others [28, 30, 31] has necessitated the need for more advanced methods for water quality evaluation.

As a result, the quests for better quality water have brought about the use of state-of-the-art water quality assessment approaches like mathematical algorithm and Geographical Information System (GIS) models, systemic entropy and ionic spatial distribution GIS analyses [1, 2, 4, 9, 32,33,34,35,36]. In Nigeria, scientists have employed various approaches to assess groundwater quality for domestic use, such as the WQI system [37,38,39,40,41,42,43], GIS modelling [44,45,46,47,48,49], and statistical multivariate analysis [6, 39, 50,51,52,53].

According to the 2006 National Population Census, Ibadan is Nigeria's third most populated city [54]. Previous studies have revealed that much of the groundwater in the area is of poor quality. Those studies have shown that there are contaminations from both geogenic [23, 24] and anthropogenic [15,16,17,18,19,20,21,22] routes. This poses a significant risk to public health, as many residents rely on this water source for all their needs, often without any form of purification [16]. Therefore, it is critical to understand the specific parameters responsible for deteriorating water quality as well as their origins. It is vital to ascertain whether implementing environmentally friendly measures will make the condition better or if drastic remedial practices must be implemented. For this current study, the entropy weighted water quality index (EWQI), a more sophisticated water quality assessment approach will be employed. The development of the EWQI entailed a meticulous procedure that included many enhancements and modifications to include entropy weighting thereby improving on the traditional WQI’s limitations [55]. The EWQI considers interactions among parameters, addresses data uncertainties, increases evaluation accuracy, allows flexibility, enhances impartiality and permits the inclusion of local conditions which enables the adaptation of the assessment tool therefore enhancing the overall reliability of the EWQI [12, 55,56,57].

As a result, the aim of this study is to characterize groundwater quality in Ibadan metropolis, Southwestern Nigeria, using entropy weighted water quality index. This is done to improve understanding of the pollution status and drinking quality of the water in the study area. Furthermore, biological examination will be undertaken to assess the possible health consequences of poor water consumption in the study area. The findings of this study will help to improve understanding of water quality in the Ibadan metropolis, allowing for sustainable water resources protection and management.

2 Materials and methods

2.1 Study area

Ibadan is in the southwestern part of Nigeria. The study area lies between latitudes 7°20ʹ N and 7°29ʹ N and longitudes 03°52ʹ E and 03°56ʹ E (Fig. 1). Three rivers with numerous tributaries naturally drain the area (Fig. 2): River Ona flows through the North and West; River Ogunpa through the centre and River Ogbere towards East. Ibadan is part of Tropical rainforest climatic belt of southwestern Nigeria. The wet season lasts from April to October while the dry season lasts from November to March.

Fig. 1
figure 1

Map of the study area showing the sampling points

Fig. 2
figure 2

Geological Map of the study area updated after Okunlola et al., (2009)

The study area is underlain by the basement complex rock of Southwest Nigeria (Fig. 2). These rocks are mostly metamorphic rocks of Precambrian age. The area is dominated by quartzite/quartz schist, migmatite and banded gneiss. Minor rock types include amphibolites and pegmatites.

Hydrogeologically, the textural and mineralogical attributes of unaltered basement complex rocks lead to low porosity and permeability of the rocks. However, the groundwater potential is dependent on the presence of thick weathered and/or deep fractured zones [19, 58, 59]. The weathered aquifers are generally discontinuous and exist in unconfined to semi-confined conditions, as in most crystalline bedrock settings [58].

2.2 Sampling design and analytical techniques

Seventy-five (75) groundwater samples were collected based on availability from bore wells and hand pump wells in February 2021. The sampling locations (Fig. 1) were recorded using a GARMIN GPSMAP 64 s portable Global Positioning System. Water samples were collected and preserved in accordance with the standard procedures recommended by the United States Environmental Protection Agency (USEPA) [60] using high-quality polyethylene sample bottles of 25 cL and 50 cL capacities for chemical analysis; and 20 mL sterile universal bottle for microbial analysis. The polyethylene bottles were prepared for sample collection by washing with deionized water and were then washed 3 to 4 times using source water to be sampled at each location. Samples from boreholes were collected only after the water had been flushed for 10–15 min to get out the stagnant water. The water sample in 25 cL polyethylene bottle was acidified with two drops of 20% ultrapure nitric acid (to a pH < 2) to preserve it and prevent metal precipitation or adsorption onto the bottle walls following guidelines [60]. All the groundwater samples obtained were carefully labelled with prefix “A” for 25 cL polyethylene bottle, “B” for 50 cL bottle, and “C” for universal bottles. To avoid any activity in the samples collected, they were promptly sent to the laboratory. The physical parameters (pH, TDS and EC) were tested in-situ with Hanna HI 9811–5 pH/EC/TD portable meter.

The chemical analysis of major anions, cations, and the heavy metal Fe in the groundwater followed standard techniques. F⁻, Cl⁻, SO₄2⁻, HCO₃⁻, and NO₃⁻ were analysed using a JENWAY Aqua nova spectrophotometer, following colorimetric reactions that involve measuring the intensity of the colour produced in each reaction to determine the concentration of the analyte. The absorbance at specific wavelengths was measured using the JENWAY Aqua nova spectrophotometer. Na⁺ and K⁺ were measured using a Corning 410 Flame Photometer. Ca2⁺, Mg2⁺, and Fe were determined using a Model 210 VGP Bulk Scientific Atomic Absorption Spectrophotometer (AAS), which employed a hollow cathode lamp as the light source and an air-acetylene flame for atomization, with a specified wavelength for each analyte. For these techniques, a calibration curve was prepared using standard solutions of known concentrations for each analyte, followed by the measurement of the absorbance values of the samples. These values were then compared to the calibration curve to determine the concentrations of the analytes in the samples. Analytical quality control was ensured through the measurement of blank solutions, standards, and by taking replicate measurements of the samples to verify reproducibility. The accuracy of the analytical techniques was affirmed by computing the ion balance error (IBE) using the equation below:\(IBE=\frac{\left[\sum cations-\sum anions\right]}{\left[\sum cations+\sum anions\right]}\times 100\)

Before computation with this IBE equation, the concentrations of all the ions were converted to meq/L. The calculated IBE in this study ranged from − 1.39% to 9.39%, and an average of 4.19%, which was within the allowable limit of ± 10%.

Microbial analysis of the groundwater samples was carried using the heterotrophic plate count to determine total coliform. The term “heterotrophic plate count” refers to the process of distributing a water sample on plated medium. With the aid of a micropipette, 10 µl of the sample was placed on the MacConkey agar media and spread out by streaking using a sterilized wire loop. The culture media were then incubated overnight at 37 °C. Plated media were prepared in triplicate for each sample, and the average value of the discrete colony count was used to calculate the total heterotrophic count. Several of the biochemical identification systems, as well as morphological traits such as colonial appearance and gramme staining reaction, were used to identify the colonies produced.

2.3 Hydrogeochemical analyses

The groundwater types and evolution were analysed based on concentrations of the ions in the groundwater samples through Piper diagram, Gibbs plots and ion ratio binary plots. The Piper diagram was illustrated by Geochemical Workbench (edition. 15.0). Gibbs plots and ion ratio binary plots were plotted by Geochemical ToolKit (edition.4.1). Piper [61] proposed a diagram to characterize groundwater types based on its constituents’ ions. This diagram is helpful to understand the sources of dissolved constituent salts in water in terms of cation and anion composition. Piper diagram consists of a diamond- shaped field constructed by projecting the positions in the basal triangular fields. The concentrations of these ions were expressed in meq/L in order to produce the diagram.

Gibbs [62] published two semi-log diagrams that are often used to examine the link between groundwater chemical composition and lithological/aquifer condition. Although, these diagrams do not depict anthropogenic activities on hydrochemical components, they are useful in understanding the natural processes that drive hydrogeochemistry [2]. Three controlling processes identified [62] model are represented by evaporation dominance, rock dominance and precipitation dominance fields on the diagrams. TDS against Cl/(Cl + HCO3) and TDS against Na+/(Na+ + Ca2+) were plotted to represent Gibbs’ model diagrams.

Analyses of relationship between ions can be used to examine the nature of rock weathering that influenced hydrogeochemistry [4, 63, 64]. Concentrations of Na+ against Cl; (Ca2+ + Mg+) against (HCO3 + SO42−); and (Na+ + K+) against Total cations were plotted as binary diagrams to understand the influence of rock weathering. Concentrations of ions utilized to plot these diagrams were expressed in meq/L.

2.4 Correlation coefficient matrix and principal component analysis

Correlation is among the important tests for determining the connection between independent parameters of water [65]. The Pearson correlation matrixes for the physicochemical parameters of the groundwater of the Ibadan metropolis were computed by using the Statistical Package for Social Sciences IBM Corp SPSS for windows (version 22.0 Armonk. NY). Principal Components Analysis (PCA) is one of the earliest multivariate statistical analytical techniques which “identifies variables that are highly correlated with each other and combines these to construct a reduced set of new variables that still describes the differences among samples” [66]. The data of physicochemical and microbial parameters were utilised for the principal component analysis by the use of SPSS software. The Kaiser–Meyer–Olkin measure, which is required to assess appropriateness of the data for PCA [67], was determined. This was used with eigen value greater than 1.

2.5 Computation of EWQI

EWQI is a reliable approach that integrates the data of all physicochemical parameters to provide a representative value which reflects the general groundwater quality for ingestion [4, 8, 13, 33, 36, 63]. The following steps [33, 35] are the algorithms needed to compute the EWQI.

  1. 1.

    Estimation of eigen value matrix “X” which is related to all physicochemical parameters following Eq. (1):

    $$X=\left|\begin{array}{ccc}{x}_{11}& {x}_{12}& {...x}_{1n}\\ {x}_{21}& {x}_{22}& {...x}_{2n}\\ {x}_{m1}& {x}_{m2}& {...x}_{mn}\end{array}\right|$$
    (1)

    Where, m (1,2,3, …, m) indicates each water sample; n (1,2,3, …, m) represents number of variables analysed for each water sample.

  2. 2.

    Estimation of standardized matrix “Yij” following Eq. (2)

    $${Y}_{ij}=\frac{{X}_{ij}-\left({X}_{ij}\right)min}{\left({X}_{ij}\right)max-\left({X}_{ij}\right)min}$$
    (2)

    where, Xij represents the primary matrix; (Xij)min represents the minimum value of the physiochemical parameter of interest obtained for the samples; and (Xij)max represents the maximum value of the physiochemical parameter of interest obtained from the samples;

  3. 3.

    Estimation of standard assessment matrix “Y” following Eq. (3)

    $$Y=\left|\begin{array}{ccc}{y}_{11}& {y}_{12}& ...{y}_{1n}\\ {y}_{21}& {y}_{22}& ...{y}_{2n}\\ {y}_{m1}& {y}_{m2}& {...y}_{mn}\end{array}\right|$$
    (3)
  4. 4.

    Computation of the information entropy “ej” following Eqs. (4) and (5)

    $${P}_{ij}=\frac{{Y}_{ij}}{\sum_{i=1}^{m}{Y}_{ij}}$$
    (4)
    $${e}_{j}=-\frac{1}{lnm}{\sum }_{i=1}^{m}{P}_{ij}ln{P}_{ij}$$
    (5)
  5. 5.

    Computation of entropy weight “wj” following Eq. (6). Entropy weight “wj” is often related to “m” sample whereas each sample has a "n" parameter.

    $${w}_{j}=\frac{(1-{e}_{j})}{{\sum }_{j=1}^{n}\left(1-{e}_{j}\right)}$$
    (6)
  6. 6.

    Calculation of qualitative rating scale “qj” of parameter “j” using Eq. (7)

    $${q}_{j}=\frac{{C}_{j}}{{S}_{j}}\times 100$$
    (7)

    Where, Cj denotes the concentration of parameter j (in mg/L) in each groundwater sample; Sj denotes quality standards of the drinking water for parameter j (in mg/L). In this study, either the Standard Organization of Nigeria (SON) or World Health Organization (WHO) standard was employed as Sj.

  7. 7.

    Lastly, calculation of EWQI following Eq. (8)

    $$EWQI=\sum_{j=1}^{n}{w}_{j}{q}_{j}$$
    (8)

The groundwater quality based on EWQI has five ranking classifications ranging from rank I to rank V, as outlined in Table 1.

Table 1 EWQI ranks and their equivalent groundwater quality [33]

2.6 Spatial distribution map

The results obtained from physiochemical parameter measurements, microbial analysis and EWQI analyses were utilised to prepare the distribution maps of the area of study. ArcGIS software was used to produce the maps. The purpose is to understand the spatial variation of each of the parameters in the groundwater of the area.

3 Results

3.1 General properties of groundwater in the area of study

The summary statistics of groundwater physicochemical parameter is provided in Table 2. pH is an important parameter of groundwater because it influences its biological and chemical properties [68]. The values of pH of groundwater in the study area ranged from 6.52 to 7.43 with an average value of 7.09 (Table 2) indicating slightly acidic to slightly alkaline. The WHO established a safe pH range of 6.5–8.5 [69]. This, thus, means that the pH range of the groundwater samples in this study are well within the permissible limits. Electrical Conductivity, EC, values are between 30 and 560 μS/cm while its mean value is 240.8 μS/cm. Based on the EC of these samples, it is possible to conclude that the groundwater in this area of study is fresh in nature [65]. The TDS concentrations ranged from 20 to 375 mg/L, and with a mean value of 162.0 mg/L. All these groundwater samples are desirable and permissible (TDS < 500 mg/L) for drinking [70]. Excessive TDS in water can cause kidney stones, stomach annoyance and heart sickness [71]. Total Hardness (TH) varied from 10 to 66 mg/L with a mean value of 34.12 mg/L. All samples have TH within the safe limit of 150 mg/L for potable water [69, 70] and fell within the soft fresh water on TDS vs TH plot [64] (Fig. 3). TDS and TH are important parameters that may be used to evaluate the quality characteristics of groundwater because they can infer the mineralogical composition and overall potability of the water. High levels of TDS can indicate the presence of harmful contaminants, while TH measures the concentration of calcium and magnesium, which affect water hardness and can influence both health and the suitability of water for domestic use [63].

Table 2 Descriptive statistics of groundwater samples (n = 75) collected from basement complex metropolis of Ibadan, Southwest Nigeria
Fig. 3
figure 3

Plot of Total Dissolved Solids (TDS) vs Total Hardness for groundwater samples collected from the Ibadan metropolis after Liu et al., (2020)

Statistical analysis of the hydrogeochemical parameters revealed the abundance of cations as Na+ > K+ > Ca2+ > Mg2+. On the other hand, anion concentrations were in the order of Cl > HCO3 > SO42− > NO3 > F. Na+ is the most abundant cation, while Mg2+ is the least abundant. Cl is the most abundant anion, while F is the least dominant.

The basement complex rocks contain felspars at different location [72]. This suggests that Na+, the most abundant alkali metal group member in the groundwater studied, could be introduced from decomposition of Na bearing silicate minerals in the area. Na+ concentration ranges from 0.01 to 162.2 mg/L in the metropolis with the highest recorded in a sample obtained around Beere-Mapo (Fig. 4f), a densely populated area in the centre of Ibadan Metropolis classified as slum area [15]. This, however, suggests that high concentrations of Na+ in the groundwater may be because of anthropogenic practices like poor sanitation habits, which aligns with the findings of [73], who identified septic effluent, animal waste, and landfill leachate as potential sources of Na⁺ contamination. One major health effect of high concentration of Na⁺ is hypertension [74]. Interestingly, none of the samples, however, exceeds recommended standard limits [69, 70].

Fig. 4
figure 4figure 4figure 4

Map of (a) pH; (b) EC; (c) Hardness; (d) Turbidity; (e) Ca2+; (f) Na+; (g) K+; (h) Fe; (i) Cl; (j) SO42−; (k) NO3; (l) HCO3 in the study area

K+ concentrations ranged from 0.01 to 155.80 mg/L, with a mean value of 23.16 mg/L. The lower concentration of K+ compared to that of Na+ could be because K-bearing silicates are less susceptible to weathering compared to Na-bearing silicates. Compared to guideline value of K+ in groundwater (10 mg/L), only 40% of the samples in this investigation are appropriate for human consumption with respect to K. Unfit samples are limited to the southern part of the study area located at the core part of Ibadan City (Fig. 4g). This indicates that, in addition to the weathering of K-bearing silicates (e.g., microcline and orthoclase), anthropogenic activities such as breakdown of waste products also influence the concentration of K+ in groundwater. Skowron et al. [75] observed that K+ concentrations in surface waters were affected by local sewage treatment plants, emphasising the impact of both natural processes and anthropogenic activities on K+ levels. High value of potassium in drinking water may induce nervous and digestive disorder [4].

The maximum concentration of Ca2+ (19.8 mg/L) is lower than the upper range (75 mg/L) of the element suggested by WHO [69]. This indicates that all the groundwater samples were within the allowable level. The source of Ca2+ in the samples could be due to weathering of calcium plagioclase. Its low concentration in the water samples may be due to short residence time.

The Mg2+ content ranged from 0.02 to 6.11 mg/L. Just as observed for Na+ and Ca2+, Mg2+ contents in the samples did not exceed the standard permissible level (20 mg/L) indicated by SON [70] for drinking water. Natural source of Mg2+ in groundwater is as a result of the occurrence of mafic minerals such as amphiboles and biotite in the Basement complex rocks underlining the groundwater.

The concentration of Cl ranged from 1.09 to 206.97 mg/L with a mean value of 59.48 mg/L. None of groundwater was unsuitable for direct drinking, owing to the ionic levels of the anion (< 250 mg/L). NO3 ranged from 0.01 to 54 mg/L. The desirable limit of this anion is < 45 mg/L (WHO, 2004). Concentrations of NO3 are above 45 mg/L at Agbowo, Beere-Mapo and Bodija. High population density of Agbowo is due to its nearness to the University of Ibadan. Because of this location, the area has become extremely populous as a result of increasing development of rental apartments for a lot of junior employees and students who are unable to secure housing accommodation within the campus [15]. There is an international market within Bodija area with its many poor environmental management activities which can explain the possibility for high NO3concentrations in the area. This denotes that the sources of this anion in the area are from anthropogenic activities such as leakages of septic tanks, household effluents and animal wastes [4, 9]. At concentration above 45 mg/L in drinking water, nitrate could pose high risks to health such as methemoglobinemia in infants, oesophageal and/or gastric cancer [1, 8].

The observed concentrations of HCO3and SO42− ranged from 4.00 to 168.00 mg/L and 2.00 to 112.00 mg/L, mean values of 57.27 mg/L and 30.19 mg/L, respectively. The permissible concentration of HCO3 is 150 mg/L [69]. High concentrations were measured in slum areas at the city centre (Fig. 4l). The hand-dug wells in these areas are likely prone to overexploitation of groundwater for domestic use because of high population density; hence, their over reliance on the water source. HCO3 could result from dissolution of albitic plagioclase, as well as from anthropogenic sources including effluents from sewage systems. The SO42− contents are below WHO [69] permissible limit. This indicates that the groundwater is safe with respect to SO42−. Low concentrations of SO42−in groundwater could suggest that bacterial sulfate reduction has occurred [76].

F average concentration in the groundwater samples is 0.02 mg/L. The concentrations of this anion are not within the allowable range (0.6–1.5 mg/L) [69] for human health. Consumption of water having concentrations of F below 0.6 mg/L may be concerning to the health as it can lead to inadequate fluoride intake, which is essential for dental health and the prevention of dental caries [77]. Insufficient fluoride levels can result in increased vulnerability to dental issues. On other hand, values of F above 1.6 mg/L may poise high health risk including skeletal and dental fluorosis [3].

Figure 4 depicts spatial pattern maps of these parameters. The maps reveal some similarities in trends, which likely reflect the influence of ionic strength on water chemistry. For instance, changes in hardness and EC are very similar, indicating that variations in ionic concentrations and the presence of dissolved minerals are related. This similarity suggests that factors affecting ionic strength, such as water–rock interactions or anthropogenic influences, impact both EC and hardness in a similar manner.

Microbiological analysis of the groundwater was conducted, and the spatial distribution maps of the isolates are shown in Fig. 5. The coliform test results suggest that 32.2% of the water samples are safe to drink, while the remaining 67.8% have high coliform levels and are therefore unsafe to drink. Total heterotrophic bacteria count was found to be as well very significant in the water samples of the study area with dominance of pathogenic bacteria of four different bacteria species. Staphylococcus aureus was discovered to be the most prevalent organism, with a 48.7% prevalence rate. This was followed by Escherichia coli having a prevalence rate of 32.6%. The high prevalence rate of Escherichia coli further confirmed that groundwater quality of the study area was compromised with fecal samples [78]. The presence of Escherichia coli in drinking water may pose high health risks which include serious gastroenteritis disorder, haemorrhagic colitis, and/or uremic syndrome [78]. Pseudomonas aeruginosa have a prevalence rate of 10.3%, whereas, Klebsiella pneumonia reveal a prevalence rate of 8.3 in the study area. Slum areas (e.g. Beere, Oja-Oba and Agbowo) were found to be more contaminated (Fig. 5).

Fig. 5
figure 5

Spatial Distribution Map of a Escherichia coli; b Klebsiella pneumonia; c Pseudomonas aeruginosa; and d Staphylococcus aureus in the study area

3.2 Hydrogeochemical processes

3.2.1 Piper diagram

By using Piper diagram (Fig. 6), the groundwater type in the area is categorised as follows: (I) NaCl type, (II) Mixed CaNaHCO3 type, and (III) CaHCO3 type. On Piper diagram, Na+ and K+ are considered as alkalis while Ca2+ and Mg2+ are designated as alkaline earth. SO42⁻and Cl⁻ are treated as strong acid and HCO3⁻ is weak. The Piper plot clearly shows that the groundwater under study is composed mainly of Na+, Cl⁻ and HCO3⁻. These ions may indicate that dissolution of silicate minerals which release Na+, Cl⁻ and HCO3⁻ is a key hydrogeochemical process in the area. Higher concentrations of these ions, however, are also indicative of anthropogenic activities such as municipal contamination [73]. According to Piper, there is no dominance of mixed CaNaHCO3 and CaHCO3 in the groundwater samples. This observation could be attributed to the predominance of sodium chloride processes over Ca2+ and HCO3⁻ influences in the groundwater chemistry. The spatial distribution, as depicted in the maps from Fig. 4, explains this observation, showing extensive areas with elevated Na+ and Cl concentrations. It seems possible that this distribution pattern suggests that geological and potential anthropogenic factors, such as contamination, impact the groundwater composition.

Fig. 6
figure 6

Piper trilinear diagram depicting hydrogeochemical types in Ibadan Metropolis, Southwest Nigeria. CaHCO3; 2- NaCl; 3-Mixed CaNaHCO3; 4- Mixed CaMgCl; 5- CaCl; 6- NaHCO3; A Ca2+; B No dominant; C Mg2+; D Na+; E HCO3⁻; F SO42; and G Cltypes

3.2.2 Gibbs diagrams

Figure 7 showed that the breaking down or dissolving of rocks and minerals on Earth’s surface via the process of weathering is the primary natural factor driving the hydrogeochemistry of all the samples while precipitation is the secondary factor. Rock and precipitation dominance activities have been reported in previous studies [79, 80]. Dissolution of rock forming minerals through chemical weathering seems to control major ions chemistry in groundwater [63, 64, 67]. Rock-water interaction mainly occurs in areas covered by basement complex rocks [4].

Fig. 7
figure 7

Gibbs diagrams displaying the nature of hydrogeochemical processes

3.2.3 Ions and relationship between them

The relationship between Na+ and Clin Fig. 8a shows that the groundwater samples fall above the line of Na: Cl = 1:1 as a result of excess Na+ over Cl. Such deviation is attributed to the contribution of silicate weathering like the dissolution of Albite which might be contributing to the increase in Na+ in the groundwater. The samples fall below the line of 1:1 on Fig. 8b and Fig. 8c which further confirm silicate dissolution.

Fig. 8
figure 8

Relationship between ions. a Na+ and Cl, b Ca2+ + Mg2+ and SO42− + HCO3. c Na+ + K+ and Total cation

3.3 Correlation and principal components analysis (PCA)

The Pearson correlation matrices for physicochemical parameters of the groundwater of the Ibadan metropolis were calculated and shown in Table 3. The pH shows no significant correlation with all other parameters. The EC and TDS reflect strong positive correlation with all parameters except Fe, pH and Turbidity. The strong positive association between the TDS and each of these ions is an important indicator for the influence of human activities [63]. Weak positive association between Ca2+ and F could indicate that dissolution of F-containing minerals has little influence.

Table 3 Correlation coefficients of hydrogeochemical parameters measured in groundwater from basement complex metropolis of Ibadan, Southwest Nigeria

Table 4 displays the results of the principal components analysis. The variables have yielded four principal components (PCs). As a result, just four clusters, which contribute 77.949% of the variance, are required to group the water samples (Fig. 9).

Table 4 Principal components and their loadings (high loadings are bolded) of groundwater parameters of Ibadan metropolis
Fig. 9
figure 9

Scree plot for the component of water samples

The PC1 is responsible for 53.403% of the total variance with significant positive loadings of EC (0.870), TDS (0.869), Hardness (0.727), Alkalinity (0.918), HCO3 (0.896), SO42− (0.874), Cl (0.921), NO3 (0.898), F (0.794), Na+ (0.919), Ca2+ (0.637), Mg2+ (0.618), and K+ (0.837). The HCO3, Na+, Mg2+, K+ and Ca2+ represent rock-water interaction and dissolution of silicate rock [4]. Cl− represents geogenic influence through rock weathering, as well as, anthropogenic activity such as the possible addition of Cl based water treatment chemicals. NO3 and SO42− stand for influence of municipal contamination. This factor was derived primarily from the localised geology and partly from anthropogenic activities such as municipal contamination and breakdown of waste products [67].

The PC2 is responsible for 10.551% of total variance and has high positive loadings for Turbidity (0.827) and Fe (0. 835). The Turbidity represents dissolved solids in the water due to rock dissolution and microbial growth. The Fe represents breakdown of ferromagnesian minerals. The PC3 is responsible for 7.596% and it is concerned with pH (0.592) signifying the slight acidic to neutral nature of groundwater system. The PC4 accounts for 6.4% with no high positive loading for any variable.

3.4 EWQI assessment

Table 5 presents the results of EWQI for groundwater in the study area. Figure 10 shows a plot of EWQI for groundwater samples along with their corresponding quality ratings, and Fig. 11 presents the spatial distribution map of the water quality using EWQI. When the EWQI of groundwater result is greater than 100, the water is generally unsafe for human consumption [4]. In this investigation, the EWQI scores ranged from 2.2 to 143.6 with an average of 32.8. These results reveal that none of the sample was classed as having severely low water quality (rank-V). Furthermore, only one sample obtained from a dug well in the city centre, Beere, categorised as poor (rank-IV), rendering it unsafe for drinking. Around 20% of the samples were rated as medium quality (rank-III), indicating that they are only marginally fit for consumption. Water of medium quality should be treated before they can be utilized for domestic consumption. 31% of the samples were classed as good quality while 49% rated as excellent quality.

Table 5 EWQI rates for the groundwater data of Ibadan metropolis
Fig. 10
figure 10

Plot of EWQI values per groundwater samples and their equivalent quality ratings

Fig. 11
figure 11

Spatial distribution map of entropy weight water quality

4 Conclusion

The average concentrations of cations in the groundwater of Ibadan metropolis, southwestern Nigeria were presented in order Na+ > K+ > Ca2+ > Mg2+ while that of anions presented in order Cl > HCO3 > SO42− > NO3 > F. The bacteria identified from the investigated groundwater samples are comparable to those published by Laniyan et al. [21] for major marketplaces in southwest, Nigeria. The total bacteria count in 67.8% of the groundwater samples exceed the drinking water permissible value of 0.5 × 102 cfu/ml [70]. The primary source of the bacterial contamination may include poor environmental practices such as improper waste disposal and sewage contamination of water. The origin of groundwater quality and its deterioration in the Ibadan metropolis, southwestern Nigeria were influenced by the local geology and anthropogenic activities.

Piper trilinear diagram and Gibbs diagrams indicate that the chemistry of groundwater of investigated area is primarily controlled by rock weathering and municipal contamination also influence the water quality. By relationships between ions, geochemical and geological processes of rock and mineral weathering are the primary controlling processes. Correlation and PCA indicated that the quality of groundwater was impacted by geogenic processes and household pollution.

As par the EWQI classification, about 1.3%, 18.7%, 30.7% and 49.3% of the total samples are under Poor, Medium, Good and Excellent water quality, respectively, for human consumption. In the study area, the primary sources of water for home use are hand-dug wells and boreholes, thus, it is important to ensure good water quality to prevent numerous health issues. Therefore, the application of the entropy water quality (EWQI) assessment tool, which has never been employed, in this area will help the concerned authorities to provide improved and sustainable water quality.