The rapid development of urbanization, industry, agriculture, and environmental pollution from potentially toxic elements (PTEs) in advanced countries has attracted widespread attention. The PTEs refers to metals that are toxic and cause environmental or biological hazards, like As, Cd, Cr, Cu, Ni, Pb, and Zn (Liu et al. 2020a, b). The anthropogenic activities, including mining, smelting, coal combustion, vehicular emission and agrochemical, are major sources of PTEs released to atmosphere, soil, or water (Laidlaw et al. 2018). PTEs risk assessment in soil is an important part of human health risk assessment because of its absorption by plants and enter food chain which have ultimately affected human (Asgari et al. 2019). PTEs are accumulated in important organs of human body which have seriously enhanced occurrence of lung cancer, renal insufficiency, bronchitis, neurological or other diseases.

The vast majority of countries have emphasized environmental pollution in industrial reclamation areas over the last thirty years, but have underestimated the soil issues in the green landscape of cities, especially the green space with interaction of people (Mohammadi et al. 2020). There is growing concern of safety problem due to popularity of community gardens (Egendorf et al. 2018). Several studies have only targeted the degree of pollution and pollution sources of single metal, which have not explored correlation and pollution sources, nor have analyzed the impact of PTEs in soil on human health (Rouillon et al. 2017; Rai et al. 2019). This study is based on the content of As, Cd, Cr, Cu, Ni, Pb and Zn in the soil samples of community gardens of Lin’an district, Hangzhou. The main objectives of this study were: (1) Analysis of pollution characteristics of heavy metals, with Principal component analysis (PCA) to qualitatively predict the potential pollution sources, and Positive matrix factorization (PMF) to identify pollution sources of heavy metals and to quantify their relative contribution; (2) Evaluation of exposure to PTEs in community garden soil and determination of health risks faced by residents.

Materials and Methods

The community garden in Lin’ an District, with latitudes of 30°13′20″ N–30°13′30″ N and longitudes of 119°43′0″ E and 119°43′15″ E in the northwest of Zhejiang, China was selected as research site (Fig. 1). The typical community selected for this study was established in 2005. The residents mainly migrated from reconstruction of Jinxi Village. The residents of the village still retain their farming habits. The community garden has a history of 15 years. The terrain of Jincheng streets is relatively low in south of the city road and river, where traffic pollution and surface runoff pollution are easy to accumulate. The residents have retained the habit of burning coal for fire. Therefore, it is of special research value to analyze the spatial variability of soil heavy metals in this community garden. The research was conducted in November 2020. The 28 samples were collected from research site. The latitude and longitude of the samples were recorded with GPS toolbox software (China). The specific sampling distribution is presented in Fig. 1.The soil samples were sieved from 10 to 100 mesh (China) after grinding for further process.

Fig. 1
figure 1

Distribution map of location and sample points in study area

The soil pH was determined with pH meter (China) at the soil–water ratio of 1:2.5. The organic matter was determined by wet oxidation at 180℃ in a mixture of potassium dichromate (China) and sulphuric acid (China), and titrated with 0.2 mol L−1 ferrous sulfate solution (China). The soil samples were analyzed in triplicate to ensure accuracy of the experiment. Total heavy metal contents (mixed acid digestion with concentrated HNO3 and HCl = 3:1) were analyzed with inductively coupled plasma optical emission spectroscopy (ICP-OES, Optima 2000, Perkin Elmer Co, USA). The blank solution was measured for 11 consecutive times. The detection limit concentration was defined as quantitative line according to EPASW-846 of the United States. The instrument limit of detection of Cu, Zn, Pb, Cd, Cr, Ni and As were 0.005, 0.05, 0.07, 0.009, 0.012, 0.024 and 0.019 mg kg−1, respectively. The limits of quantity were 0.016, 0.167, 0.221, 0.03, 0.04, 0.08 and 0.06 mg kg−1, respectively.

The reliability of experimental results was improved with Certified Reference Material (CRM) GBW 07405 (GSS-5). The blank control group (each experiment was repeated three times) were used as QA/QC procedures for analysis of total soil heavy metals. The relative standard deviations of determination results of heavy metal elements were all less than 5%, which met the quality control requirements.

The inverse distance weighted (IDW) in ArcGIS 10.2 was applied to create spatial distribution of PTEs in soil and weighted by distance between interpolated points and adjacent sample points. The sum of weights of all sample points was 1 (Liu et al. 2020a, b).

The probability of soil pollutants harmful to human health was analyzed through different exposure pathways, and health risk index of pollutants to human body was calculated. Three ways were considered: ingestion, inhalation, and dermal contact of soil particulate matter (Huang et al. 2021). The comprehensive numerical reference was: Regional Screening Levels (RSLs)-Generic Tables for Resident Soil from United States Environmental Protection Agency (USEPA 2020) Table B and Table G of Technical Guidelines for Risk Assessment of Soil Contamination of Land for Construction (trial) (HJ 25.3-2019).

The lifelong health hazard effects in adults and children of carcinogenic contaminants was considered. The average time of carcinogenic effect (\({\mathrm{AT}}_{\text{ca}}\)) was adjusted to average time of non-carcinogenic effect (\({\mathrm{AT}}_{\text{nc}}\)). The formula of soil exposure was adopted:

$$OISER_{ca} = \left( {\frac{{OSIR_{c} \times ED_{c} \times EF_{c} }}{{BW_{c} \times AT_{ca} }} + \frac{{OSIR_{a} \times ED_{a} \times EF_{a} }}{{BW_{a} \times AT_{ca} }}} \right) \times ABS_{{\text{o}}} \times 10^{ - 6}$$
(1)
$$DCSER_{ca} = \left( {\frac{{SAE_{c} \times SSAR_{c} \times EF_{c} \times ED_{c} }}{{BW_{c} \times AT_{ca} }} + \frac{{SAE_{a} \times SSAR_{a} \times EF_{a} \times ED_{a} }}{{BW_{a} \times AT_{ca} }}} \right) \times E_{v} \times ABS_{d} \times 10^{ - 6}$$
(2)
$$\begin{aligned} PISER_{{{\text{ca}}}} = & \frac{{PM_{10} \times DAIR_{c} \times ED_{c} \times PIAF \times \left( {fspo \times EFO_{c} + fspi \times EFI_{c} } \right)}}{{BW_{{\text{c}}} \times AT_{{{\text{ca}}}} }} \times 10^{ - 6} \\ & + \frac{{PM_{10} \times DAIR_{{\text{a}}} \times ED_{a} \times PIAF \times \left( {fspo \times EFO_{a} + fspi \times EFI_{a} } \right)}}{{BW_{{\text{a}}} \times AT_{{{\text{ca}}}} }} \times 10^{ - 6} \\ \end{aligned}$$
(3)

where \({\mathrm{OISER}}_{\text{ca}}\), \({\mathrm{DCSER}}_{\text{ca}}\), \({\mathrm{PISER}}_{\text{ca}}\) are doses of soil exposure (carcinogenic effect) during ingestion, inhalation, and dermal contact of soil particulate matter. The kg (soil) kg−1 (weight) day−1; \({\mathrm{OSIR}}_{\mathrm{a}}\) and \({\mathrm{OSIR}}_{\mathrm{c}}\) are daily air breathing in adults and children, m3 day−1; \({\mathrm{ED}}_{\mathrm{a}}\) and \({\mathrm{ED}}_{\mathrm{c}}\) are duration of adult and child exposure, a; \({\mathrm{EF}}_{\mathrm{a}}\) and \({\mathrm{EF}}_{\mathrm{c}}\) are exposure frequency of adults and children, da−1; \({\mathrm{BW}}_{\mathrm{a}}\) and \({\mathrm{BW}}_{\mathrm{c}}\) are daily air breathing in adults and children, kg; \({\mathrm{ABS}}_{\mathrm{o}}\), \({\mathrm{ABS}}_{\mathrm{d}}\) are ingestion and dermal contact absorption efficiency factor; \({\mathrm{AT}}_{\text{ca}}\) is average time for carcinogenic effects, d; \({\mathrm{SAE}}_{\mathrm{a}}\) and \({\mathrm{SAE}}_{\mathrm{c}}\) are skin surface area for adults and children respectively, cm2; \({\mathrm{SSAR}}_{\mathrm{a}}\) and \({\mathrm{SSAR}}_{\mathrm{c}}\) are soil adhesion coefficient on skin surface of adults and children, mg cm−2; \({\mathrm{PM}}_{10}\) is airborne particulate matter content, mg m−3; \({\mathrm{DAIR}}_{\mathrm{a}}\) and \({\mathrm{DAIR}}_{\mathrm{c}}\) are daily air breathing in adults and children, m3 day−1; \(\mathrm{PIAF}\) is retention rate of particles in the soil; \(\mathrm{fspi}\) and \(\mathrm{fspo}\) is outdoor and indoor exposure frequency for air from soil particulate matter; \({\mathrm{EFI}}_{\mathrm{a}}\) and \({\mathrm{EFI}}_{\mathrm{c}}\) is indoor exposure frequency of adults and children, da−1; \({\mathrm{EFO}}_{\mathrm{a}}\) and \({\mathrm{EFO}}_{\mathrm{c}}\) are outdoor exposure frequency of adults and children, da−1.

$$CR_{ois} = OISER_{ca} \times C_{{s{\text{ur}}}} \times SF_{o}$$
(4)
$$CR_{dcs} = DCSER_{ca} \times C_{{s{\text{ur}}}} \times \frac{{SF_{{\text{o}}} }}{{ABS_{{{\text{gi}}}} }}$$
(5)
$$CR_{{{\text{pi}}s}} = PISER_{ca} \times C_{{s{\text{ur}}}} \times \frac{{IUR \times BW_{{\text{a}}} }}{{DAIR_{{\text{a}}} }}$$
(6)
$$CR_{n} = CR_{ois} + CR_{dcs} + CR_{pis}$$
(7)

where \({\mathrm{CR}}_{\text{ois}}\), \({\mathrm{CR}}_{\text{dcs}}\), \({\mathrm{CR}}_{\text{pis}}\) are carcinogenic risk of the way of ingestion, inhalation, and dermal contact of soil particulate matter, respectively; \({\mathrm{C}}_{\text{sur}}\) is soil pollutant concentration, mg kg−1; \({\mathrm{SF}}_{\mathrm{o}}\) is cancer slope factor for ingestion, mg (pollutant) kg−1 (weight) day−1; \({\mathrm{ABS}}_{\text{gi}}\) is absorption efficiency factor of digestive tract; \(\mathrm{IUR}\) is inhaled unit carcinogen factor, m3 mg−1; \({\mathrm{CR}}_{\mathrm{n}}\) is total carcinogenic risk of a single contaminant in the soil through all exposure.

$$HQ_{{{\text{ois}}}} = \frac{{OISER_{nc} \times C_{{{\text{sur}}}} }}{{R{\text{fD}}_{{\text{o}}} \times SAF}}$$
(8)
$$HQ_{{{\text{dcs}}}} = \frac{{DCSER_{nc} \times C_{{{\text{sur}}}} }}{{R{\text{fD}}_{{\text{o}}} \times ABS_{{{\text{gi}}}} \times SAF}}$$
(9)
$$HQ_{{{\text{pis}}}} = \frac{{PISER_{nc} \times C_{{{\text{sur}}}} }}{{\frac{{R{\text{fC}} \times DAIR_{{\text{a}}} }}{{BW_{{\text{a}}} }} \times SAF}}$$
(10)
$$HQ_{{\text{n}}} = HQ_{{{\text{ois}}}} + HQ_{{{\text{dcs}}}} + HQ_{{{\text{pis}}}}$$
(11)

where \({\mathrm{HQ}}_{\text{ois}}\), \({\mathrm{HQ}}_{\text{dcs}}\), \({\mathrm{HQ}}_{\text{pis}}\) are hazard of the way of ingestion, inhalation, and dermal contact of soil particulate matter, respectively; \(\mathrm{R}{\text{f}}{\text{D}}_{\mathrm{o}}\) is cancer slope factor for ingestion, mg (pollutant) kg−1 (weight) day−1; \(\mathrm{R}{\text{fC}}\) is absorption efficiency factor of digestive tract, mg m−3; \(\mathrm{SAF}\) is reference dose allocation coefficient for soil exposure; \({\mathrm{HQ}}_{\mathrm{n}}\) is total non-carcinogenic risk of a single contaminant in the soil through all exposure.

Correlation analysis refers to analysis of two or more variables with correlation, so as to measure the degree of correlation between two variable factors (Wang et al. 2022). Correlation analysis of different heavy metals is helpful to identify the sources of heavy metals. The heavy metals with significant positive correlation have similar sources or enrichment and migration behaviors. If there is a significant negative correlation, it indicates that the sources are different (Ming et al. 2021). In order to know whether the sources of seven heavy metals in community garden soil are consistent, the correlation between heavy metals and pH and organic matter was analyzed.

The source analysis was conducted with PCA and PMF. PCA is a multivariate statistical method that uses dimensionality reduction to form a small number of component factors and usually analyze sources of heavy metal pollution (Li et al. 2013). The rotation factor was obtained by maximum variance rotation. The rotation method was Kaiser normalized orthogonal rotation method, the rotation converged after eight iterations. The data in the study were appropriate for main component analysis, When Bartlett sphericity test was less than 0.05%, and the KMO (Kaiser Meyer-Olkin) measurement test statistics were > 0.5.

The PMF is an improved factor analysis receptor model for source allocation proposed by Paatero et al. (1994). The principle is to decompose heavy metal element content matrix into factor contribution matrix and factor residual matrix, and to determine the contribution rate of different factors based on the characteristics of each heavy metal pollution source. According to the USEPA PMF 5.0 user guide, the formula is as follows:

$$X_{{{\text{ij}}}} = \sum\limits_{k = 1}^{p} ( g_{{{\text{ik}}}} f_{kj} + e_{ij} )$$
(12)

where \({X}_{ij}\) is the corresponding element in matrix of heavy metal content of the sample; \({g}_{ik}\) contributes corresponding elements to pollution source matrix; \({f}_{kj}\) is corresponding element of factor fingerprint spectrum matrix; \({e}_{ij}\) is the corresponding element of residual matrix.

The PMF model minimizes the objective function \(\mathrm{Q}\) to obtain the optimal content matrix and source profile:

$$Q = \sum\limits_{{{\text{i}} = 1}}^{{\text{n}}} {\sum\limits_{j = 1}^{{\text{m}}} {\left( {\frac{{x_{ij} - \sum\limits_{k = 1}^{p} {g_{ik} f_{kj} } }}{{u_{ij} }}} \right)} }^{2} = \sum\limits_{i = 1}^{n} {\sum\limits_{j = 1}^{m} {\left( {\frac{{e_{ij} }}{{u_{ij} }}} \right)} }$$
(13)

where \({u}_{ij}\) is the uncertainty of the \(\mathrm{j}\) chemical for the \(\mathrm{i}\) sample.When the heavy metal content is lower than or equal to the detection limit of the corresponding method, \({u}_{ij}\) is calculated as:

$$u_{ij} = \frac{5}{6}MDL$$
(14)

When the heavy metal content exceeds the corresponding \(\mathrm{MDL}\), \({u}_{ij}\) can be calculated as:

$$u_{ij} = \sqrt {(\sigma \times c)^{2} + (0.5 \times MDL)^{2} }$$
(15)

where \(\upsigma\) is the error score, and \(\mathrm{c}\) is the content of each heavy metal element.

The data of heavy metal content was analyzed and processed with Excel 2010. The average, minimum, maximum, coefficient of variation and other descriptive results of each heavy metal element as well as potential ecological risk index of heavy metals were calculated. The Spearman correlation analysis and PCA was conducted with SPSS 22.0. The weighted average values of the measured points near the unmeasured points were interpolated with IDW method of GIS 10.2. The source analysis of soil heavy metals was completed by USEPA PMF 5.0.

Results and Discussion

Table1 reveals descriptive statistics of PTEs content and physicochemical properties (pH and SOM) of the garden soil in the neighborhood and communities. The pH range of communities soil of research site ranged from 5.89 to 8.89, with an average value of 7.17 which was weakly alkaline. The average content of SOM was 46.7 g kg−1, which was higher than average level of 15.3 g kg−1 in Zhejiang Province. The spatial variability was 32.9%.

Table 1 Descriptive statistics of PTE sconcentration (mg kg−1) and selected soil properties (g kg−1 for SOM) in study areas

The content ranges of PTEs Cu, Zn, Pb, Cd, Cr, Ni and As in the soil were 18.8–62.1, 77.4–301, 8.49–53.9, 0.02–0.57, 33.3–182, 28.7–87.1, and 2.76–29.4 mg kg−1 respectively. The average content of Cu, Zn, Cd, Cr, Ni and As have exceeded background value of the soil environment in Hangzhou compared with screening value and control value of soil pollution risk of Soil Geochemical Background in Zhejiang (Beijing, China). The over-standard rates were 43.6%, 41.9%, 19.4%, 40.3%, 46.8%, and 41.9%, respectively. The PTEs were lower than national limit value except Cr. The soil samples were mainly contaminated by Cu, Zn, Cr, Ni and As. The variation coefficient of PTEs in the soil was in descending order: Cd > Pb > As > Zn > Cr > Cu > Ni. All heavy metals have large spatial variability.

The IDW interpolation technology in Arc GIS was used to draw spatial distribution map of PTEs and soil physical and chemical properties of study area (Fig. 2).The spatial distribution of PTEs has directly represented heavily polluted areas and has contributed to analysis of the causes of PTEs in soil (Cai et al. 2019).The results showed that pH was lower in south of the study area, and spatial distribution of SOM was basically contrary to soil pH value. The soil pH was negatively correlated with Pb and Cr. The SOM was positively correlated with Cu, Cd, Zn and Ni.

Fig. 2
figure 2

Spatial distribution maps of PTEs concentration in study areas by GIS

The Cu, Cd, Zn and Ni were parallel in spatial distribution, and its concentration was improved gradually from southwest to northeast. High content of four PTEs in southern part of the land was mainly planted with edible plants, and high amount of fertilizer was applied in the site. The study revealed that application of high doses of fertilizer has not only indicated reduced soil pH, but has improved contents of SOM and PTEs (Hu et al. 2018). The widespread application of chemical fertilizers, pesticides and herbicides of agricultural activities may be the major cause for high content of PTEs in the soil (Wang et al. 2021; Jin et al. 2019). The concentration of PTEs such as Pb and Cr were comparable in most areas. Although concentration of Pb and Cr were different in some areas. The concentration of Pb and Cr were higher in southern part of the soil. This may be related to frequent traffic activities in south of the study area, which was in close proximity to urban roads, releasing huge amount of PTEs to environment (Nawrot et al. 2020). The spatial distribution of As indicates that PTEs concentration was higher in northwest and southeast of the study area, which was not quite identical to other elements and may have special sources of contamination.

The analysis of soil heavy metals (Spearman coefficient) revealed that (Table 2) soil organic matter (SOM) was significantly correlated with Pb, soil pH was not significantly correlated with elements, and Cu was significantly and positively correlated with Zn, Ni and Cd. In addition, there was a positive correlation between Cr and Pb, but correlation between As and other heavy metals was small. Elements with strong correlations may have homology. These results indicate that Cu, Zn, Ni and Cd may have similar sources. The Cr and Pb may have the identical sources, and As may have other sources.

Table 2 Correlation analysis of soil PTEs content and physical and chemical properties in study area (Spearman coefficient)

PCA can explain majority of variables in the data set with fewer variables. In this study, Bartlett sphericity test was less than 0.05%, and KMO measurement test statistics were 0.778 > 0.5. The data are applicable to PCA. The PCA analysis of soil are presented in Table 3. The maximum variance rotation method was adopted to extract three factors. The characteristic values were all greater than one, with cumulative contribution rate of 85.45%, which indicated that all information of the original data set could be well summarized. The PC1 accounted for 53.99% of the total variance, and main components were Cu, Zn, Cd and Ni. The variance contribution rate of PC2 was 21.00%, and Pb and Cr loads in this factor were very high. The PC3 accounted for 10.46% of the total variance, and As was accounted for a larger load element. The results of pollution source analysis showed that Cu, Zn, Ni and Cd may be polluted by chemical fertilizer and herbicide, mainly from agricultural activities. Combined with traffic conditions and sampling sites, Cr and Pb are mainly from traffic pollution sources. Heavy metal (As) is mainly affected by the activities of surrounding residents. These results are parallel to results of correlation analysis, which indicated that diverse heavy metals may be correlated because of identical sources.

Table 3 Principal component analysis of PTEs in surface soil

The PMF quantitative source analysis of heavy metals was conducted for elucidation of exact source of heavy metals due to uncertainty of PCA on the source of heavy metal elements. The PMF model can identify and quantify the sources of heavy metals in the soil of the study area. The analysis of pollution sources of heavy metals in the soil was conducted with USEPA PMF 5.0 software. The signal-to-noise ratio (S/N) of seven heavy metals were all greater than 1, which was set as “Strong”. The total content index was set as “Total Variable (Defaults to Weak)”. The number of iterations was adjusted to 20, and different factor numbers were set to 2, 3, 4 and 5 for calculation of PMF model respectively. The variation between \({\mathrm{Q}}_{\mathrm{Robust}}\) and \({\mathrm{Q}}_{\mathrm{True}}\) was smallest, when the number of factors was 3 and most residuals between − 3 and 3 followed normal distribution. The coefficient between observed concentration and predicted concentration data of seven heavy metal elements between 0.70 and 0.99, indicated that PMF model has good fitting effect. The PMF model analysis showed that there were three main sources of soil heavy metals in this region. The contribution rates of three pollution factors to each heavy metal element were 42.9%, 20.9% and36.2% respectively (Fig. 3).

Fig. 3
figure 3

Source contribution ratios of soil heavy metals in study area

Factor 1 has high load of Cd (53.1%), Zn (52.9%), Ni (44.2%) and Cu (43%), and factor load was similar to that of PC1. Li’s team reported that Cd was usually available in phosphorous ores, along with fertilizer especially phosphate, which was introduced in farm soils (Li et al. 2020). Qiu’steam concluded that fertilizers (mineral fertilizers, organic fertilizers, etc.) may have contributed to accumulation of Cd in the soil during long-term farming activities in community gardens (Qiu et al. 2020).The fertilizer and pesticide sprayed on the soil of community gardens consist of PTEs such as Ni, which cannot be easily degraded and has a long retention time, resulting in increase of Ni element in the soil (Jia et al. 2010). In addition, Cu and Zn were widely used as additives in animal feed, but their utilization rate in animals was very low. The majority of PTEs were discharged with feces from animals, and these PTEs were accumulated in the soil through fertilization and other activities (Belon et al. 2012).Therefore, Factor 1 was mainly influenced by agricultural activities.

Factor 2 was mainly loaded on As (68.3%), and the factor load observed was consistent with PC3. The field investigation revealed that residents have burned coal on the site. The burning of fossil fuels have produced huge amount of fly ash to enter the air, while As in fly ash was settled on the soil surface (Raja et al. 2014). Studies conducted by Lee and Matarrita (2019) revealed that domestic sewage irrigation, waste and medical drugs have included some quantity of As in community gardens. The As has strong biological accumulation and is non-degradable (Chary et al. 2008). The random disposal of these substances may have enhanced accumulation of As in the soil to a definite extent (Gong et al. 2020). The Factor 2 was mainly affected by the source of life.

Factors 3 were mainly Pb (83.9%) and Cr (63.2%).Studies have reported that lead pollutants in community garden soil were mainly affected by traffic pollution. In the research study of Dao et al. (2014), the wear of engine and automobile tires and exhaust emissions may lead to Pb entering community gardens in the form of air dust, which is consistent with results of this study. The metal Pb can rarely be degraded by its own migration or microbial degradation, which is the cause of Pb accumulation in the soil of community gardens (Wang et al. 2019). The results reported by Wu et al. (2018) revealed that Cr was main component of stainless steel, with long-term wear of vehicle mechanical parts, and PTE particles containing Cr were introduced and enriched in the soil. Therefore, Factor 3 was consistent with PC2, which was mainly from transportation emissions.

The PCA and PMF source analysis in this study are basically consistent and are mutually verified. The mining or smelting activities were not identified in the field investigation, which indicated that PTEs accumulation was associated with other anthropogenic activities. The heavy metal pollution sources of community garden soil were mainly from agricultural production activities, transportation sources and residents’ living sources.

The \({\mathrm{HQ}}_{\mathrm{n}}\)>1 reveals that significant non-cancer risk may occur; while \({\mathrm{HQ}}_{\mathrm{n}}\)<1, showed that individuals were less likely to be at risk of non-cancer (Huang et al. 2021). Mean non-carcinogenic risk of Cd (6.67E−2), Cu (1.73E−2), Zn (1.10E−2) were below value of 1, which indicated no potential non-cancer risk (Fig. 4). There are significant risks because As (5.39), Cr (3.53) and Ni (2.07) were over the value of 1. The ranking of risk levels is As > Cr > Ni. The research studies reported that As has greatest contribution to non-carcinogenic risk in all PTEs (Shams et al. 2020). The non-carcinogenic risk index of the mixture as a whole was 11.08. The sequence of hazards in different exposure pathways was inhalation (9.33) > ingestion (1.65) > dermal contact (0.09) in all metals which showed that respiratory intake was the main pathway of non-carcinogenic risk.

Fig. 4
figure 4

Non-carcinogenic health risk index of Cu, Zn, Cr, Cd, Ni, As

The carcinogenic risk of PTEs was mainly considered hazard of four metals through oral intake (As, Cr), dermal contact (As) and inhalation (As, Cd, Cr, Ni). Figure 5 reveals sequence of mean human risk of cancer as follows: Cr(5.74E−05) > As(3.37E−05) > Ni(1.63E−08) > Cd(3.72E−10). Total \(\mathrm{CR}\) from all studied metals through three exposure routes for adults and children was 9.12E−05, out of which children were 5.16E−05, and adults were 3.96E−05. This is parallel to findings of Karimi et al. (2020) which revealed that due to PTEs in agricultural soils, the risk of cancer in children was higher than adults. The top two oncogenic risk elements were Cr and As. The mean values of oral (Children 3E−05; Adult1.87E−05) and adult soil intake (7.74E−06) of Cr, oral soil (Children 1.89E−05; Adult 1.18E−05) and skin contact (Children 1.62E−06; Adult 1.33E−06) of As both exceeded acceptable threshold of 1E−06. The Cr pollution in one site has exceeded maximum threshold. There was no significant carcinogenic risk, however, prevention of PTEs, especially As and Cr, must be observed by community managers.

Fig. 5
figure 5

Carcinogenic health risk index of Cr, Cd, Ni, As

The popularity of community gardens has exposed people to PTEs of soil pollution in gardens. The Risk assessment of PTEs in garden soil is essential for establishment of healthy and safe community gardens. The PTEs (As, Cd, Cr, Cu, Zn,) detected in the soil of community gardens have exceeded background value in this study. The high values of Cd, Cu, Zn and Ni were consistent, and spatial distribution of Cr and Pb was equivalent. The PCA and PMF analysis revealed that soil heavy metals in the study area were affected by agricultural activities (Cu, Zn, Cd, Ni), transportation (Pb, Cr) and residential life (As), and relative contribution rates of sources were 42.9%, 36.2%, 20.9%, respectively. The PTEs associated non-cancer risks were high in study area. The carcinogenic risk of As and Cr on the site exceeded safe value, especially children were at high risk of cancer. This study has not only revealed characteristics of PTEs in soil of community gardens, but has also established a reference for policy makers, managers and users for proper management and safe use of community garden soil.