Introduction

Urban areas with ~3% of Earth’s land surface accommodate more than half of the global population1,2. Making cities and human settlements inclusive, safe, resilient, and sustainable is a critical goal in the Sustainable Development Goals (SDGs) adopted by the United Nations in 20153. However, rapid urban expansion exacerbates various environmental challenges, such as heat stress, habitat loss, air pollution, and water shortage4,5,6,7,8,9. To address these issues and achieve SDGs, city planners and policymakers should pay more attention to the way they build and manage urban space10.

Vegetation is an essential component of urban nature and plays an indispensable role in mitigating climate changes, improving air and water quality, fostering urban biodiversity, and promoting human well-being11,12,13,14,15,16. As societal awareness regarding the significance of the natural environment continues to grow, evidence-based studies reveal that there was an upward trend in urban vegetation growth, giving rise to urban greening in the past decades17,18,19,20. Nonetheless, a recent study identified a considerable disparity in greenspace exposure between cities in the Global South and the Global North, with the former experiencing nearly twice the level of inequality21. By 2030, providing universal access to inclusive greenspace, especially for less developed countries in the Global South, remains challenging. Moreover, whether the widespread urban greening could help mitigate the inequality in urban dwellers exposure to vegetation remains an open question.

Urban greenspace is commonly examined as a holistic concept when assessing human exposure to urban nature21,22. However, it is essential to acknowledge that urban green infrastructure comprises two distinct categories: tree and nontree vegetation, each with unique ecological characteristics. Trees offer substantial cooling benefits and can reduce maximum surface temperatures by up to 5.7 °C in the summer14,23. Recent literature indicates particle pollutant levels are substantially higher in open treeless urban green areas than in adjacent tree-covered areas, and thus highlight the ability to improve the air quality of urban trees24,25. Moreover, urban forests excel in water retention and carbon sequestration compared to nontree vegetation26,27,28, making them valuable in promoting livability and resilience to climate change29. On the other hand, urban grasses also provide a habitat for a variety of animal species and various social and aesthetic benefits for local residents and environments30. Despite the difference between urban trees and treeless greenspaces, it remains unclear how urban tree and nontree vegetation would vary under the context of urban greening and whether there would be disparities in human exposure to the two greenspace types.

To address the above two major literature gaps, we conducted a global analysis to examine the variability and potential drivers of urban greenspace (in terms of tree and nontree vegetation) and their associated changes in human exposure to the two major components of greenspace over the past two decades. Utilizing the multiple satellite-derived vegetation and climate datasets, along with various socioeconomic datasets, we analyzed the spatiotemporal variability of global urban greenspace, its relationship with urban greenness, and the potential drivers of urban vegetation dynamics. Moreover, we examined the variation in human exposure to greenspace due to the changes in urban vegetation within the context of prevalent urban greening. The technical details can be found in Section Methods. This study has contributed a global perspective on urban greenspace dynamics and highlighted the implications for addressing inequality and promoting sustainable urban development under the context of climate change.

Results

We separately assessed the relationship between urban greenness and each of the two major components of vegetation (i.e., tree cover and nontree vegetation) across world cities. Approximately 90% of cities (1320 of 1464) showed a considerable upward trend in tree cover (Fig. 1a). In contrast, 48.8% of cities (467 out of 957) exhibited an ascending trend in nontree vegetation (p < 0.05, Supplementary Figure 1). Our findings indicate that urban tree cover consistently exhibited a stronger association with urban greenness as measured by EVI (Enhanced Vegetation Index) (Fig. 1b, Supplementary Figure 2). The strength of their relationships, close to those between UGS (Urban greenspace defined as the sum of tree and nontree cover) and EVI, was nearly twice as high as those between nontree vegetation and EVI (Supplementary Figure 2).

Fig. 1: Global patterns of urban tree cover trends.
figure 1

a Geographic distributions. b Relationships between urban tree cover and urban greenness across the globe. c Multi-year variations in the mean urban tree cover over the globe as well as the Global North and South. d The density of the slopes of the trends in urban tree cover. e Boxplots of the urban tree cover trends among the sub-continental regions. The shaded areas around the fitted line indicate 95% confidence intervals in Fig. 1c. Eastern Asia (E. Asia), South-Eastern Asia (SE. Asia), Southern Asia (S. Asia), Western Asia (W. Asia), Central Asia (C. Asia), Eastern Africa (E. Africa), Middle Africa (M. Africa), Northern Africa (N. Africa), Southern Africa (S. Africa), Western Africa (W. Africa), Western Europe (W. Europe), Northern Europe (N. Europe), Eastern Europe (E. Europe), Southern Europe (S. Europe), Australia and New Zealand (ANZ), Northern America (N. America), South America (S. America), Central America (C. America) (p < 0.05, N = 1464).

In the first two decades of the twenty-first century, there was a consistent and noteworthy growth in the average urban tree cover observed in both the Global North and South, contributing to an overall increase worldwide (Fig. 1c). In particular, a positive trend in tree cover was observed in the majority of cities situated in high-latitude areas of the Northern Hemisphere, notably Eastern Russia and Northern Europe (Fig. 1a). Conversely, cities located near the equator, primarily in Central America, Western Africa, and South-Eastern Asia, displayed a declining trend in urban tree cover. Furthermore, a considerable proportion of cities along the northern coast of the Black Sea, as well as Western Asia, also exhibited a decreasing trend (Fig. 1a, e).

By employing relative importance analysis and partial correlation analysis, we developed a generalized additive model (GAM) with four climatic and three socioeconomic drivers, providing insights into the factors influencing the presence and growth of global urban trees. The model accounted for approximately 70% of the variability observed in urban tree cover (Fig. 2, Supplementary Figure 3). Among the climatic drivers considered, thermal-hydrologic compound factors, such as climate water deficit and vapor pressure deficit, exhibited a stronger negative correlation with global urban tree cover compared to solely water-related indicators like precipitation and soil moisture (Supplementary Figure 3). In addition, we identified a significant and consistent relationship between downward surface shortwave radiation and the global urban trees (Fig. 2). Furthermore, our analysis revealed that urban tree cover tended to increase with annual mean maximum air temperature when it was below 15 °C but declined thereafter (Fig. 2). On the other hand, socioeconomic factors including human development index (HDI), population density, and urban development intensity (UDI) also exerted considerable influence on the presence of urban trees across world cities (R ranges from −0.41 to 0.3). When HDI reached 0.7, there was a considerable rise in tree cover along with the increased HDI (Fig. 2b). Population density and urban development intensity (UDI) negatively correlated with urban tree cover (Fig. 2b, Supplementary Figure 3).

Fig. 2: Response of urban tree cover to climate and socioeconomic drivers.
figure 2

a Climate factors, including climate water deficit, downward surface shortwave radiation, soil moisture, and mean maximum air temperature. b Socioeconomic factors, including human development index, population density, and urban development index. c Performance of the generalized additive model (GAM). GCV: generalized cross-validation. The shaded areas indicate 95% confidence intervals. The proportion null deviance explained (r2adj) and the significant level (p) of each variable are inserted.

In contrast to the steady growth observed in urban tree cover (Fig. 1c), our analysis reveals a concerning trend of declining mean human exposure to urban trees (HET) in the Global South, changing from 5.22% in 2000 to 4.13% in 2020 (Fig. 3). In comparison, HET in the Global North remained relatively stable, ranging from 15.3% to 15.4% over the past two decades (Fig. 3). A substantial proportion of cities, 57.8% in the Global North and 88% in the Global South, experienced a HET decline, especially for African cities with a notable reduction. Furthermore, the inequality in human exposure to urban trees as measured by Gini coefficient has intensified over the study period. In the Global North, the Gini coefficient for HET increased from 0.26 in 2000 to 0.29 in 2020, while in the Global South, it rose from 0.3 to 0.36 (Fig. 3). In contrast to the HET changes, human exposure to urban nontree vegetation (NTV exposure) remained relatively stable from 2000 to 2020 in both the Global North and South. The associated Gini index of NTV exposure witnessed only a marginal decrease during this period (Supplementary Figure 4).

Fig. 3: Changes in human exposure to urban trees and the corresponding inequality of the world’s cities.
figure 3

a Scatterplots of the human exposure to urban trees (HET) of the world’s cities in 2000 and 2020. The top and right panels refer to the histogram of HET in 2000 and 2020, respectively. b The region-wide mean HET over Global North and South from 2000 to 2020 as well as the corresponding Gini index (N = 1464).

Temporal variation in region-wide mean HET as well as the corresponding Gini coefficients at a sub-continental scale are shown in Fig. 4. Except Eastern Europe and Eastern Asia, all other regions experienced a decline in HET. Notably, Australia and New Zealand exhibited a slight decrease in the inequality metric, with the Gini coefficient of HET declining from 0.16 to 0.14 over the past two decades. However, in Asia and Africa, the Gini coefficients showed a notable increase, particularly reaching 0.6 in Western Asia. A closer examination of the three most populous countries nowadays, China, India, and the United States, revealed a consistent decrease in HET accompanied by an increase in inequality (Supplementary Table 1). In contrast, Russia exhibited an ascending trend in HET, albeit with a slight increase in the Gini coefficient (Supplementary Table 1).

Fig. 4: Global hotspots of degrading human exposure to urban trees.
figure 4

a, b The difference in HET of each urban cluster between 2000 and 2020 and the density plot for sub-continental regions. c Regional differences of the temporal variation in human exposure to urban trees from 2000 to 2020. Error bars refer to ±1 standard deviation. The red triangle indicates an increased Gini index and the green triangle indicates a decreased Gini index. Eastern Asia (E. Asia), South-Eastern Asia (SE. Asia), Southern Asia (S. Asia), Western Asia (W. Asia), Central Asia (C. Asia), Eastern Africa (E. Africa), Middle Africa (M. Africa), Northern Africa (N. Africa), Southern Africa (S. Africa), Western Africa (W. Africa), Western Europe (W. Europe), Northern Europe (N. Europe), Eastern Europe (E. Europe), Southern Europe (S. Europe), Australia and New Zealand (ANZ), Northern America (N. America), South America (S. America), Central America (C. America) (N = 1464).

Discussion

Previous studies documented widespread urban greening as a result of direct and indirect impacts of urbanization5,17,18. However, these studies have primarily relied on satellite-derived reflective greenness indicators which lack the ability to differentiate the specific contributions of different vegetation types within enhanced urban greenery5,18. In this study, we conducted a comprehensive assessment, examining the spatial distribution and temporal dynamics of the global urban tree and nontree vegetation separately. Our findings confirm a significant increase in urban greenness across the majority of cities worldwide over the past two decades, which has primarily been driven by the prevalent growth of urban trees with nearly 90% of cities exhibiting an upward trend.

Similar to the presence and growth of natural forests, urban trees are also constrained by climate and geographic factors shaping the hydrothermal environment, including precipitation, temperature, and solar radiation (Fig. 2, Supplementary Figure 3). The substantial expansion of urban tree cover, particularly in high-latitude areas of the Northern Hemisphere, can be attributed to a combination of depopulation and global warming. The negative correlation between urban tree cover and population density is evident as we observe a decline in population density in Eastern Russia and Northern Europe (Supplementary Figure 5), which has contributed, at least in part, to the proliferation of urban trees. Furthermore, in colder regions where the annual mean temperature is below 15 °C, increased temperatures have been found to considerably contribute to the expansion of urban tree cover (Fig. 3). Conversely, a warming climate can hinder the growth and functioning of urban forests in tropical and subtropical areas, leading to a slight ascending or even declining trend in tree cover within cities31. In addition, a notable increase in surface temperature, coupled with the intensification of urban heat island effects, results in a greater water deficit, which negatively impacts the growth of urban trees32,33. On the other side, anthropogenic factors also exert an important influence on urban tree growth, resulting from urbanization and various management practices, such as irrigation, pest control, and pruning34,35,36. The development of the economy and society is likewise instrumental in increasing urban tree cover, as it is positively correlated with a synthetical index (HDI) when it exceeds a threshold of 0.7 (Fig. 3). This result suggests that highly developed cities or regions with adequate financial support and effective management capabilities have the potential and prioritize the protection of natural environments through sustainable urbanization and urban renewal efforts.

While a considerable enhancement of urban tree cover did trigger widespread urban greening, our findings reveal that the disparities in human exposure (HET) between the Global North and South have intensified. Surprisingly, despite the mean level of greenspace exposure remaining relatively constant in the Global North, the corresponding inequality has substantially increased in both the Global North and South, indicating a greater uneven distribution of greenspace exposure globally. Recent studies have pointed out the contrasting differences in human exposure to urban greenspace at a regional and global scale21,22,37. By summing up the total coverage of urban vegetation, they have quantified greenspace exposure inequality and reported that Global South cities exhibit nearly double the inequality compared to Global North cities21. However, these analyses have primarily focused on total greenspace coverage without distinguishing between different vegetation types and their ecological functions, giving rise to a lack of understanding regarding the specific implications of exposure to tree and nontree vegetation for human well-being. Furthermore, the dynamics of greenspace exposure and the associated inequality under the context of prevalent urban greening in recent years remain largely unexplored. Our study fills these knowledge gaps by examining the temporal dynamic of human exposure to urban greenspace, specifically focusing on tree and nontree vegetation, over the past two decades. The ability to differentiate the specific contributions of different vegetation types within enhanced urban greenery represents a crucial contribution of our work. This study leverages a comprehensive data integration approach that allows us to achieve a finer spatial resolution and granularity compared to prior studies21,22,37. As a result, we were able to differentiate between tree and nontree vegetation at a much more localized level within urban areas and provide a more detailed and nuanced understanding of urban greenspace variability. We identified trends and patterns in the distribution and abundance of these two vegetation types, shedding light on their specific contributions to the overall greenspace dynamics. By emphasizing the differentiation between tree and nontree vegetation within urban greenspace and highlighting the disparities in human exposure, our study contributes to a more comprehensive understanding of urban greening dynamics. This insight can inform policymakers, urban planners, and researchers in developing strategies that address the specific needs and benefits of different types of vegetation within urban areas, ultimately fostering more equitable and sustainable urban environments.

Taking the example of China, India, and the United States (the three most populous countries), the mean HET of all three countries gradually declined, along with the increased Gini index, primarily due to the massive population growth in the past decades (Supplementary Table 1). The rising inequality was a consequence of uneven development and population growth within the vast extent of China and the United States (Supplementary Figure 6). Conversely, a steady increase in the nationwide mean HET but with the fairly escalating Gini index in Russia confirms that cities with substantially enhancing urban tree cover were associated with depopulation in Eastern Russia, giving rise to a nationwide enlarging inequality. The findings highlight a pressing need to address the growing inequalities in human exposure to urban greenspace regardless of the developing and under-developed countries. Moreover, the observed increase in inequality within the Global North also indicates the need for proactive measures to prevent the concentration of greenspace exposure within specific privileged neighborhoods or communities. As cities strive for sustainable development and inclusive urban environments, it is essential to ensure that the benefits of urban greening are accessible to all residents regardless of their geographic location or socioeconomic status10,38. This requires targeted interventions and evidence-based strategies that promote equitable distribution and access to both tree and nontree vegetation.

As the somewhat disparity in greenspace exposure compared with previous studies21, we further examined the correlations of urban vegetation coverage derived from multi-satellite observations with a spatial resolution ranging from 10 to 250 m. In general, global urban tree cover derived from three different sources of datasets exhibited strong relationships with considerable consistency (Supplementary Figure 7). Therefore, the magnitude of differences in human exposure to urban trees as well as the corresponding inequality in the Global North and South seems to be in line with previous findings21. By contrast, there was a discrepancy in urban nontree exposure compared with previous findings, mainly owing to the fact that urban nontree cover derived from MODIS and WorldCover showed a weak correlation. Unlike the discrete land cover characterizations, VCF provides a continuous, quantitative portrayal of tree and nontree cover39,40,41. Given the fast pace of current urban fragmentation nowadays, the percentage of urban shrubs and grasses could be over- or underestimated based on the land cover classification at a 10 m resolution, giving rise to large discrepancies of urban mean nontree vegetation cover derived from VCF and WorldCover. On the other hand, relative to the natural landscapes, the accuracy of urban vegetation cover estimation is moderately lower as a result of limited high-quality input as well as high urban heterogeneity42. Therefore, the assessment of tree and nontree vegetation coverage derived from remotely sensed imagery needs to be calibrated and improved in further research, especially in urban areas, by incorporating field measurement. With the help of emerging land cover datasets, such as SinoLC-1, which offers a high spatial resolution of 1 m, there is a promising opportunity to greatly enhance the accuracy of estimating urban tree coverage in further research43.

While the GAMs models have demonstrated robustness under various tests, it is acknowledged that no model is entirely immune to uncertainties or limitations and the general explanation accounts for nearly 70% of global urban tree coverage variability and 28.8% for nontree vegetation variability. Besides, the input explanatory factors of the GAMs were also affected by the limited and unified urban inventory worldwide, especially for the anthropogenic drivers. Here, we employed the three socioeconomic factors (GDP, HDI, and UDI) as the surrogates of the impacts of human-related activity on urban greenspace variability. Therefore, a more direct open-source dataset with regard to anthropogenic factors, such as urban green infrastructure investments, is needed and can further enhance the interpretability and adaptability of the results.

In this study, we used constant urban boundaries of global 3678 cities and it also could introduce to some extent biases since our planet is under rapid urbanization. Most cities worldwide, especially in developing countries such as China, and India, are expanding and growing. Along with the swiftly increasing number of populated residents, urbanization which converts natural lands to artificial surfaces usually leads to a significant downward in vegetation cover. Studies reveal that most major cities exhibited a contrasting vegetation pattern, with notably upward trends in urban greenspace coverage in the urban areas but downward trends in urbanized areas42. While the constant urban boundaries probably bring out uncertainties, it might insignificantly affect the overall decreasing trend in human exposure to urban greenspace. Furthermore, a yearly dynamic dataset of global urban extent coupled with annual vegetation coverage could further minimize the uncertainties induced by the constant urban boundaries44.

By adopting a holistic approach that considers both the ecological functions of diverse vegetation types and the equitable distribution of greenspace exposure, cities can strive towards achieving the SDGs, fostering inclusive and livable urban environments, and promoting global sustainability. Cities have emerged as policy actors in implementing the SDGs, which offer a blueprint for achieving global sustainability45,46. City planners and managers increasingly recognize the benefits of incorporating urban greening strategies into their planning and design to improve sustainability and livability38,45. Although we witnessed a widespread urban greenery enhancement mainly driven by the urban forest growth in the past 20 years, human exposure to greenspace across most world’s cities declined, along with increased inequality. This study emphasizes the need to go beyond the existing knowledge of greener cities and delve into the dynamics of urban greenspace. It highlights the persistence of inequalities in human exposure to greenspace in both developing and developed nations and further underscores the importance of understanding the impacts of urban greenspace on human exposure. The disparity in greenspace distribution can contribute to environmental injustice, as it disproportionately affects communities worldwide, particularly in the Global South. Marginalized communities, often located in urban areas with limited greenspace, may experience reduced access to the numerous environmental, social, and health benefits that greenspaces provide. This further exacerbates existing social inequalities and disparities in quality of life. Addressing these inequities requires a multifaceted approach that considers social, economic, and environmental factors, as well as the involvement of local communities in greenspace planning and management. In order to enhance sustainability and create more equitable and livable urban environments, we advocate for evidence-based strategies in sustainable urban greenspace management, including urban planning policies, land use regulations, community initiatives, and environmental awareness. Overall, it is still challenging and far away from providing universal access to greenspace by 2030, which is an indicator of the targets to achieve inclusive, resilient, and sustainable cities and human settlements as part of the SDGs.

Despite the uncertainty inherent in the datasets, our study reveals that the urban tree growth predominantly contributed to the prevalent urban greening across most world cities in the first two decades of the 21st century. Moreover, by providing a holistic understanding of human greenspace exposure, our findings support and further highlight the enlarging disparity in urban greenspace exposure and the corresponding inequality regardless of developing and developed countries and emphasize the demanding task for achieving global sustainability.

Methods

Vegetation coverage and greenness

(1) The Moderate Resolution Imaging Spectroradiometer (MODIS) Vegetation Continuous Fields (VCF) product (MOD44B, Version 6) is a valuable dataset that provides a yearly continuous and quantitative representation of land surface cover at a spatial resolution of 250 m39,40. It offers a global depiction of the sub-pixel fraction of surface vegetation cover, including three components: percent tree cover (TC), percent nontree vegetation (NTV), and percent non-vegetated area. The dataset is generated using daily surface reflectance and land surface temperature data from the MODIS instrument aboard NASA’s Terra satellite. A fully-automated machine learning algorithm is employed to estimate these sub-pixel fractions based on a comprehensive analysis of the input data39. The tree cover layers specifically indicate the percentage of horizontal ground within each pixel that is covered by woody vegetation exceeding a height of 5 m. We obtained and processed a 21-year dataset (from 2000 to 2020) of VCF using the Google Earth Engine (GEE). The quality layer of VCF data defined by the MODIS surface reflectance quality assurance values was used to mask out the low-quality pixels that are cloudy, high aerosol, under cloud shadow, or with view zenith >45°. This 8-bit packed bit quality layer represents 1 of the 8 input surface reflectance composite files used to create the model and predict vegetation cover percentages. In this study, pixels with at least 7 ‘clear’ time periods out of 8 remained for further analysis. (2) The Landsat Vegetation Continuous Fields dataset with a spatial resolution of 30 m offers estimates of global tree canopy cover for the years 2000, 2005, 2010, and 201540. Urban Tree Canopy (UTC) is defined as the average tree cover within urban areas of each city worldwide. This information provides insights into the presence and extent of tree canopy cover specifically in urbanized regions. Pixels with large uncertainty were excluded. (3) Enhanced Vegetation Index (EVI) is an adjusted vegetation index commonly used as a surrogate for canopy greenness47,48. It effectively reduces the influence of soil background signals and has been widely adopted in various studies. The equation of EVI is shown:

$$\begin{array}{c}{{{{{{\rm{EVI}}}}}}}=2.5\frac{{\rho }_{{{{{{{\rm{NIR}}}}}}}}-{\rho }_{{{{{{{\rm{red}}}}}}}}}{{\rho }_{{{{{{{\rm{NIR}}}}}}}}+6{\rho }_{{{{{{{\rm{red}}}}}}}}-7.5{\rho }_{{{{{{{\rm{blue}}}}}}}}+1}\end{array}$$
(1)

To minimize noise and uncertainties, we employed a rigorous data selection process. Specifically, pixels with a quality control flag of the first 2 bits that did not correspond to either “00” or “01” were excluded from the analysis. This approach ensured that only the highest quality data points were included in the study. Cloud cover was mitigated through the use of cloud masks and quality assurance flags provided in the original datasets. Annual maximum greenness (EVImax) per pixel was estimated from MOD13Q1, in line with the temporal resolution of VCF datasets. The region-wide mean of urban vegetation coverage (tree and nontree cover) and greenness was computed at the city scale for further inter-comparison. Relationships between urban vegetation coverage and greenness among global cities were examined through both linear and nonlinear regression.

Urban-related datasets

(1) The urban extent data are based on the simplified urban-extent algorithm, which combines the global urban land database with the Oak Ridge National Laboratory’s LandScan population database49,50. In order to generate the urban extent, these global urban data is overlapped with the LandScan population-derived Thiessen polygons. It has undergone validation, with a commendable overall accuracy of 93%51. This validation process involved comparing the dataset with a Landsat-based map encompassing 140 urban areas situated in various ecoregions, and accounting for diverse levels of population and economic development51. In this study, we selected the cities with a geographic area exceeding 100 km2 from the global urban extent data. This selection criterion resulted in a total of 3567 urban clusters that were included in our analysis. Subsequently, we focused on two specific aspects: urban tree cover and nontree vegetation. Among the identified urban clusters, 1464 cities exhibited a significant trend in urban tree cover, while 957 cities showed a significant trend in nontree vegetation (both with a significance level of P < 0.05). (2) To facilitate the spatial analysis of greenspace exposure at a global scale, we utilized the Global Administrative Unit Layers (GAULs) provided by the Food and Agriculture Organization of the United Nations. These administrative layers, which include country, state, and county divisions, served as hierarchical units for our analysis, enabling us to assess greenspace exposure patterns across different administrative levels in 2015. (3) To quantify the urban development levels, we utilized the global impervious surface area dataset, which provides information on built-up areas from 1985 to 2018 at a resolution of 30 m52. Using this dataset, we calculated the urban development index (UDI) as the ratio of the built area to the total area of the urban extent. The UDI serves as an indicator of the extent of urbanization and development within each urban cluster.

$${{{{{{{\rm{UDI}}}}}}}}_{i}=\frac{{{{{{{\rm{Built}}}}}}}\,{{{{{{\rm{area}}}}}}}}{{{{{{{\rm{Total}}}}}}}\,{{{{{{\rm{area}}}}}}}}\times 100 \%$$
(2)

Climate datasets

In this study, we utilized two climate datasets to analyze the climatic factors influencing urban greenspace dynamics. (1) The TerraClimate dataset provides monthly climate and climatic water balance information for terrestrial surfaces worldwide53. Actual evapotranspiration, climate water deficit, soil moisture (derived using a one-dimensional soil water balance model), precipitation accumulation, downward surface shortwave radiation, vapor pressure deficit were used in this study. (2) We also incorporated data from ERA5, the fifth generation of the European Centre for Medium-Range Weather Forecasts (ECMWF) atmospheric reanalysis dataset. ERA5 combines model data with observations from across the globe to create a comprehensive and consistent dataset. The monthly datasets offer aggregated values for seven climate reanalysis parameters, including air temperature (maximum, mean, and minimum temperature at 2 m height), total precipitation, mean sea level pressure, surface pressure, 10m u-component of wind and 10m v-component of wind.

Socioeconomic datasets

We relied on two datasets to incorporate population and socioeconomic factors into our research. (1) The Gridded Population of World Version 4 (GPWv4), Revision 11 provides the distribution of the global human population for multiple years, including 2000, 2005, 2010, 2015, and 2020. The dataset utilizes a 30 arc-second (~1 km) grid resolution and employs a proportional allocation method to distribute the population to grid cells based on census and administrative units. (2) We also utilized the Gridded Global Gross Domestic Product (GDP) and Human Development Index (HDI) dataset at a resolution of 30 arc-seconds for the year 201554. The HDI, developed by the United Nations Development Programme, is a comprehensive indicator that captures key dimensions of human development, including life expectancy, education, and standard of living. The HDI is calculated as the geometric mean of normalized indices for each of the three dimensions. By incorporating the GDP and HDI into our analysis, we gained insights into the socioeconomic aspects of urban greenspace dynamics and its association with human development.

$${{{{{{{\rm{HDI}}}}}}}}_{i}=\root 3 \of {{{I}_{{{{{{{\rm{health}}}}}}}}\times {I}_{{{{{{{\rm{education}}}}}}}}\times {I}_{{{{{{{\rm{income}}}}}}}}}}$$
(3)

Statistical analyses

To analyze the data and determine trends and relationships, we employed several statistical methods. (1) We utilized the Mann-Kendall method, a nonparametric test for monotonic trends, to assess the trends of urban greenspace, tree cover, and nontree vegetation during the past 21 years on a global scale. The Theil-Sen approach was employed to calculate the gradient of the trend. We tested the significance level of the trend analysis, and only pixels with a significance level of p < 0.05 were considered for further analysis. (2) To understand the contribution of different climate, geographic, and socioeconomic variables in explaining the variations in global urban trees, we conducted a relative importance analysis. It is based on established methodologies and has followed best practices to ensure the reliability of the results. The relative importance analysis works by transforming the set of independent variables into a set of orthogonal variables that are not correlated with each other. It turns out that the squared regression coefficients from the linear regression using the orthogonal variables represent each variable’s contribution to the R-square. This analysis helped us estimate the influence of each variable in interpreting the variability of urban trees and nontree vegetation. We also used partial correlation analysis to measure the strength of the correlations between urban greenspace and climate or socioeconomic factors while controlling for other variables. (3) The correlations between the two components of greenspace (tree and nontree cover) and urban greenness (annual EVImax) were assessed by applying linear and nonlinear regression with the least squares method.

Generalized additive model

To better understand the relationships between global urban greenspace and a range of predictor variables representing climate variability and anthropogenic influence, we employed generalized additive models (GAMs) for modeling the complex relationships between urban greenspace coverage and various drivers. GAMs is a type of semi-parametric multivariate regression model that can effectively incorporate both linear and nonlinear terms to capture various types of effects55,56. Through driver analysis and contribution analysis, we identified four climatic drivers and three socioeconomic drivers that largely influenced global urban greenspace. These drivers were integrated into the GAM model to explain and interpret the variability of urban greenspace. This approach enabled us to develop a robust model that effectively captured the complexity of the factors influencing urban greenspace at a global level.

$$g\left(E\left(Y\right)\right)= \, {f}_{1}\left({def}\right)+{f}_{2}\left({srad}\right)+{f}_{3}\left({sm}\right)+{f}_{4}\left({T}_{\max }\right)\\ +{f}_{5}\left({HDI}\right)+{f}_{6}\left({POP}\right)+{f}_{7}\left({UDI}\right)$$
(4)

To assess the robustness of our GAMs, we conducted cross-validation to evaluate the predictive performance and carefully validated the model to ensure its effectiveness in addressing the research questions posed in our study.

Population-weighted exposure model

Human exposure to urban greenspace was assessed using a population-weighted exposure model, building upon the methodology proposed by Song et al.21. Relative to the greenspace-oriented provision, accessibility methods without differentiating the real amount of greenspace exposed to humans21, the population-weighted exposure model provides a wall-to-wall fine-resolution assessment of urban greenspace and populations. It is able to map the multiscale differences in human exposure to greenspace from country to state, county, and city levels. This approach accounts for the spatial interaction between the population and urban trees or nontree vegetation, providing a quantitative measure of the extent to which people are exposed to green areas in urban environments. The population-weighted exposure model adopts a bottom-up approach, considering the density and distribution of both population and greenspace. Higher weights are allocated to greenspace exposure in areas where a larger population resides, ensuring that the model captures the varying levels of human exposure to urban greenspace. By incorporating population density and the spatial distribution of greenspace, the model provides a more accurate assessment of the interaction between people and urban green areas.

$${{HET}}^{d}=\frac{{\sum }_{i=1}^{N}{P}_{i}\times {{TC}}_{i}^{d}}{{\sum }_{i=1}^{N}{P}_{i}}$$
(5)

where Pi refers to the population of the i-th pixel, TCid refers to the fractional vegetation cover of the i-th pixel considering adjacent greenspace with a buffered areas of d, N is the overall number of pixels within each city, and HET represents the population-weighted greenspace level of exposure to urban tree or nontree vegetation.

Inequality metric

The Gini index, the most commonly used measure of inequality, is typically used as a measure of income inequality, but it can be used to measure the inequality of any distribution22. In this study, the Gini index was used to assess the inequality in greenspace exposure at different scales, including city, country, regional, and continental levels, from 2000 to 202021,22. The Gini coefficient, which is derived from the Lorenz curve, was employed to quantify the degree of inequality in greenspace exposure. The Lorenz curve represents the cumulative proportion of total greenspace exposure (y-axis) earned by the cumulative proportion of the population (x-axis). The Gini coefficient is calculated based on this curve and ranges from 0 to 1. A Gini coefficient of 0 indicates perfect equality, meaning that greenspace exposure is evenly distributed among the population. Conversely, a Gini coefficient of 1 represents absolute inequality, indicating that greenspace exposure is concentrated among a small portion of the population, while the majority has limited or no access to greenspace.

$${Gini}=\frac{{\sum }_{i=1}^{n}{\sum }_{j=1}^{n}\big|{x}_{i}-{x}_{j}\big|}{2{\sum }_{i=1}^{N}{\sum }_{j=1}^{n}{x}_{j}}$$
(6)