Introduction

Heritage encompasses a broad spectrum of cultural and natural assets that not only carry rich historical information and cultural significance but also have a profound impact on regional socio-economic development and ecological conservation1. Traditionally, heritage studies have centered on tangible cultural heritage, such as monuments, historic buildings, and archeological sites, as well as intangible elements, including folklore, rituals, and traditional knowledge. However, the scope of heritage has expanded to incorporate natural elements that are inseparably intertwined with human history and cultural expression. Among these, Nature-based Cultural Heritage Sites (NCHS) represent a distinctive category where cultural heritage and natural landscapes coalesce. NCHS refers to cultural heritage sites located in natural environments, such as historical buildings, archeological sites, or religious places situated in mountains or forests. These sites have become key objects for studying heritage conservation, ecological management, and tourism development2,3,4.

Since the adoption of the 1972 UNESCO World Heritage Convention, heritage conservation has been established as the core objective of cultural heritage sites. However, over time, these sites have increasingly become significant tourist destinations, with their roles and significance expanding. In recent years, UNESCO has emphasized integrating conservation with sustainable tourism, aiming to achieve dual goals of heritage protection and socio-economic development through tourism5. Heritage tourism is considered an important means of enhancing public awareness of cultural and natural heritage through visitor engagement, thus raising societal attention to heritage conservation and value transmission6. Tourism at cultural heritage sites has experienced significant growth over the past few decades, particularly at NCHS, which combine unique natural landscapes with cultural relics. The uniqueness of these sites lies in the fact that, during cultural tourism, visitors engage not only with historical relics but also experience the deep integration of natural environments and cultural backgrounds, satisfying their dual desire for nature and culture7,8. However, with the rapid growth of tourism, these sites face the dual challenge of uneven visitor density. Some sites experience excessive visitor density, which can lead to environmental stress and cultural loss9, as highlighted by the International Union for Conservation of Nature (IUCN) in its “World Heritage Outlook” reports, which emphasize that tourism may threaten heritage conservation10. Conversely, some sites suffer from low visitor numbers and lack appeal, leading to underutilized resources and potentially stagnating conservation efforts due to insufficient funding. Therefore, researching the spatial distribution and driving mechanisms of visitor density at NCHS is crucial for balancing resource utilization with heritage protection and optimizing visitor management policies11.

Research on cultural heritage tourism has covered various aspects, including visitor satisfaction, visitor behavior, tourism management, and heritage conservation12,13,14. Particularly, studies on visitor behavior have focused on analyzing motivations, preferences, and behavioral paths15. Some scholars have also explored the relationship between cultural heritage and tourist flows16. However, previous studies on visitor dynamics and cultural heritage tourism have primarily focused on World Heritage urban sites (e.g., historic districts and architectural landmarks)16,17,18, while rural or nature-integrated heritage sites are often overlooked. This gap is particularly critical in large, diverse countries like China, where heritage sites span various landscapes, from forest parks with ancient temples to mountainous heritage clusters.

Prior research has primarily approached visitor behavior from single-dimensional perspectives, such as economic factors (Li & Xu, 2019) or spatial accessibility (Wang et al., 2020). However, comprehensive analyses integrating multiple landscape attributes (e.g., vegetation coverage, cultural landmark density, and environmental quality) remain limited. Most studies concentrate on specific types of cultural heritage sites and lack a comprehensive analysis of natural and artificial landscape factors. Previous studies have indicated that factors such as landscape attractiveness, the uniqueness of cultural landscapes, and the quality of facilities affect visitor density18. However, many studies focus on a single dimension, such as the impact of cultural landscapes on visitor attraction, neglecting the interaction between natural and cultural factors.

Moreover, conventional approaches to analyzing visitor volume or visitor density in tourism, such as survey-based studies or small-scale case analyses, are constrained by geographical and sample-size limitations19. These methods are also resource-intensive, requiring significant time, labor, and expense20,21. In terms of statistical methods, although some scholars have begun using spatial econometric models and Geographic Information System (GIS) technologies to analyze spatial structures and visitor flows in cultural heritage tourism, most studies still rely on simple statistical models and fail to explore the complex interactions between landscape factors which are crucial for understanding visitor dynamics at large—scale, spatially heterogeneous sites17. In recent years, the rise of big data technologies (e.g., crowdsourced data)22,23,24,25 and machine learning methods (e.g., XGBoost)26,27 has provided distinct advantages in conducting large-scale studies and handling complex relationships in multi-dimensional data. However, their application in cultural heritage tourism remains limited28,29. Thus, the use of modern data analysis techniques to uncover the complex relationship between landscape characteristics and visitor density in cultural heritage tourism remains an open and important area for exploration.

In summary, while existing research has addressed the impact of visitor density on cultural heritage site management, empirical studies are still lacking, especially in a large country like China, which possesses abundant cultural heritage resources. The main gaps in current research include: (1) limited research subjects, with most studies focusing on a single cultural heritage site or urban cultural heritage site, while systematic research on NCHS—sites uniquely combining nature and culture—is scarce; (2) a narrow analytical framework, with existing studies often addressing visitor behavior from a single dimension and lacking a systematic analysis of the impact mechanisms of multiple landscape factors on visitor density; (3) methodological limitations, as traditional statistical models struggle to handle the complex relationships between multiple variables at heritage sites, and the potential of machine learning and social media data to reveal these complex driving mechanisms has yet to be fully explored. Therefore, this study aims to fill this gap by using social media data and machine learning methods to explore the spatial distribution and multidimensional influencing factors of visitor density at NCHS.

To address the research gaps outlined above, this study focuses on 238 representative NCHS in China, which were selected based on their prominent cultural heritage significance, well-defined geographical boundaries, and sufficient social media data availability. The process of sample selection will be elaborated in detail in the next chapter. By examining these sites, the study aims to reveal the spatial distribution characteristics of visitor density and its multi-dimensional driving mechanisms. The core objective is to integrate three key dimensions—natural landscapes, artificial landscapes, and visitor perceptions—and systematically analyze how these factors influence visitor density, as well as uncover complex influence mechanisms such as interactions and threshold effects. Specifically, the study will address the following research questions:

  1. (1)

    What are the spatial distribution characteristics of NCHS and visitor density?

  2. (2)

    How do natural landscapes, artificial landscapes, and visitor perceptions influence visitor density at NCHS?

  3. (3)

    Is there a threshold effect in cultural heritage density at NCHS, and does it interact with other landscape characteristics?

This study, starting from the dual challenges of visitor density, aims to build a multi-dimensional analytical framework integrating natural landscapes, artificial landscapes, and visitor perceptions, providing a new theoretical perspective for NCHS research. Methodologically, the study introduces machine learning techniques and social media data to overcome the limitations of traditional statistical models, offering a new methodological path for heritage tourism research. By uncovering the driving mechanisms of visitor density, this study provides a quantitative basis for the sustainable management of NCHS, helping optimize visitor flow strategies and resource allocation, alleviate management pressures at high-density heritage sites, and enhance the appeal of low-density heritage sites.

Methods

Study area and sample selection

In China, many cultural heritage sites are not isolated urban landmarks but are deeply embedded within natural landscapes, forming nature-based cultural heritage sites that hold both ecological and cultural value. To systematically examine visitor density at these sites, it is crucial to ensure that the selected sample is representative of typical NCHS, where the interplay between natural and cultural attributes significantly influences tourism patterns. In addition, it is also necessary to ensure that these heritage tourism destinations are regionally representative and enjoy high reputations both domestically and internationally. Therefore, this study adopts a rigorous selection process to identify 238 representative NCHS based on several key criteria.

First, we selected sites from the National Nature Park list, ensuring that they are officially recognized nature reserves with significant natural and cultural value and have clearly defined geographical boundaries, allowing for precise measurement of landscape characteristics. Second, to emphasize the cultural dimension, we included only sites containing at least three officially designated cultural heritage elements (e.g., temples, historical structures, or ancient villages), thereby ensuring that the sample consists of authentic heritage landscapes rather than purely natural sites. Third, to guarantee the availability of visitor data, we only included sites with at least 100 geotagged Weibo posts, ensuring that the selected sites are open to the public and have sufficient social media data for analysis. Finally, given that China’s southeastern region (east of the Hu Line) serves as the cultural and economic center where natural and cultural landscapes are highly integrated30, we focused on NCHS within this region to capture a diverse range of heritage types and visitor dynamics.

In total, 238 NCHS were selected as the study sample, including three World Cultural Heritage Sites, one World Cultural and Natural Heritage Site, and two World Cultural Landscape Heritage Sites. Other NCHS in the sample include cultural heritages of various protection levels, ranging from national to provincial and municipal designations. The selected NCHS encompass different types of cultural heritage, such as Buddhist, Taoist, and Christian religious sites, tombs of historically significant figures (e.g., Ming Xiaoling Mausoleum), and vernacular architecture (e.g., Fujian Tulou), ensuring that the sample is both typical and geographically diverse.

Measurement of visitor density

In recent years, social media big data has become an important tool for studying cultural heritage tourism activities. As one of China’s major social media platforms, Sina Weibo has a broad user base and comprehensive geographic location features. The number of user comments on Weibo has been shown to be an effective proxy for actual visitor volume31,32. On the one hand, Weibo comment data can dynamically and promptly reflect the level of tourist engagement; on the other hand, compared to traditional survey data, social media data offers advantages such as low collection costs, wide coverage, and strong timeliness. Therefore, this study collected comment data from Sina Weibo posts between 2014 and 2024 for 238 NCHS locations, totaling 237,273 comments (https://m.weibo.cn/beta/). This data was used to estimate the visitor activity intensity at these nature-based cultural heritage sites.

Visitor density (VD) has been widely recognized as a key dependent variable for assessing the level of activity at attractions, parks or heritage sites19,33,34. Previous studies have employed on-site observation methods to examine the influence of landscape characteristics on visitor density and its spatial heterogeneity in comprehensive parks19. However, such data collection approaches are inherently time-consuming and resource-intensive. To facilitate large-scale research, recent studies have leveraged geotagged social media big data to explore the impact of spatial characteristics on visitor density in urban parks33. This approach has been empirically validated as an effective method for measuring visitor density. When analyzing visitor density using social media data, it is typically defined as the number of user-generated posts per unit area, serving as a crucial indicator of destination carrying capacity and visitor activity patterns33,35. Compared to directly using visitor numbers, visitor density better accounts for the impact of site area differences on visitor distribution, offering a standardized measure of visitor activity intensity per unit area, making it more comparable across sites. The park area data was derived from the Area of Interest (AOI) boundary data for each NCHS. The formula for calculating visitor density is as follows:

$$VD=\frac{C}{A}$$
(1)

Where C represents the number of Weibo comments for each NCHS, and A represents the area of the NCHS (in square kilometers, km2).

Factors affecting the spatial distribution of NCHS

The factors influencing the spatial distribution of NCHS were analyzed at the prefecture-level city scale in the eastern region of the Hu Line, encompassing 267 cities. This analysis followed an established indicator framework from previous research36, incorporating natural environment, cultural environment, and socioeconomic factors, with a total of 13 indicators. The natural environment was characterized by vegetation, topography, hydrology, and climate, where fractional vegetation cover (FVC) represented vegetation, elevation and topographic relief captured topographical variations, river density (Den_river) reflected hydrological conditions, and average temperature and precipitation measured climatic influences. The cultural environment was evaluated through four aspects: historical settlements, religion and folklore, cultural institutions, and education. Historical settlements were quantified by the number of historical and cultural cities, towns, villages, and traditional villages. Religious and folk cultural factors were represented by the number of religious sites and intangible cultural heritage elements. Cultural institutions included the number of museums, memorial halls, cultural centers, and performing arts organizations. Educational level was assessed based on the number of higher education institutions. Socioeconomic factors included per capita GDP, population density (Den_pop), and road density (Den_road), reflecting economic development and accessibility. This multidimensional framework integrates environmental, cultural, and socioeconomic attributes, providing a comprehensive perspective on the determinants shaping the spatial patterns of NCHS.

Factors affecting the visitor density of NCHS

To comprehensively quantify the landscape features of NCHS, this study draws on the framework of Landscape Character Assessment (LCA)37 and categorizes the factors influencing visitor density into three dimensions: natural landscape, artificial landscapes, and visitor perceptions. The primary data sources for the study are summarized in Table 1. For the natural landscape, variables such as fractional vegetation cover (FVC), forest age, and forest density reflect the quantity and quality of the overall vegetation in the NCHS. Copernicus digital elevation model (DEM) data is used to calculate the average elevation and terrain ruggedness of each site. Net effective temperature (NET_year) serves as an indicator of the climate comfort at the tourist destination.

Table 1 The list of main data in our research

For the artificial landscapes, several variables are considered. The proportion of gray space (PLAND_gray), including buildings and plazas, reflects the overall extent of the built landscape. The road network density (Den_road) within the park indicates internal accessibility, while Dist_RS measures the actual driving distance from the nearest railway station. Cultural heritage Points of Interest (POI) data, sourced from Baidu Maps (https://map.baidu.com) and Chinese national and local cultural and tourism departments (https://ncha.gjzwfw.gov.cn/), are used to calculate the cultural heritage density (Den_CH) within the Area of Interest (AOI) boundaries of each NCHS. Using the same approach, museum density (Den_museum), density of recreational facilities such as amusement parks and campsites (Den_play), and density of supporting facilities such as restaurants, hotels, and parking lots (Den_SF) are also calculated.

This study employs social media images to assess visitors’ perceptions, a method that has been previously applied and validated, particularly in evaluating urban street quality and the perceived image of tourist destinations38,39. In recent years, heritage studies have increasingly adopted this approach to assess the landscape characteristics of heritage sites. For instance, previous research has utilized street-view imagery to evaluate the landscape features of historical and cultural districts in Beijing40, panoramic images to analyze perceptual preferences for canal heritage41, and photographs shared on Pinterest to examine visitor perceptions of heritage tourism destinations42. Building on the prior methodologies, this study applies image semantic segmentation to quantify seven perceptual sensory dimensions (PSDs): naturalness, openness, coherence, enclosure, tranquility, civility, and diversity. The specific calculation methods for each perceptual dimension are not elaborated here, but can be found in prior research43,44. These studies have confirmed a strong correlation between image-based computational assessments and survey-based visitor perception dimensions, demonstrating the suitability of this method for large-scale perception evaluation.

Furthermore, numerous studies have confirmed that socioeconomic characteristics are highly correlated with the visitor volume and visitor density at tourist destinations31,45,46. Therefore, this study incorporates several covariates: population density and nighttime light intensity within a 1 km buffer zone around each NCHS, as well as the per capita GDP of the province to which the NCHS belongs. These covariates help reduce model error and enhance the reliability and accuracy of the model.

Kernel density analysis

Kernel density analysis is a commonly used spatial analysis method that helps assess the spatial distribution characteristics of a given dataset within a specific area. For National Cultural Heritage Sites (NCHS), this method helps reveal the spatial distribution patterns of these sites nationwide, identifying high-density clusters and low-density sparse areas36,47,48. The analysis was performed using ArcGIS 10.8. The calculation formula is as follows:

$$(x,y)=\frac{1}{n{h}^{2}}\mathop{\sum }\limits_{i=1}^{n}K\left(\frac{{d}_{i}}{h}\right)$$
(2)

Where f(x,y) represents the density at location (x,y); n is the number of points in the study area; h is the bandwidth of the kernel density function; di is the distance between location (x,y) and the i-th point. The higher the value of f(x,y), the greater the density of NCHS in that area.

Image semantic segmentation

Using images to compute landscape perception has become a prominent trend in recent research, including street view images and social media photos49,50. This study uses the ADE20K dataset and applies the Fully Convolutional Network (FCN-8s) for semantic image segmentation to extract landscape features, such as trees, grass, water bodies, and buildings, from social media images. The ADE20K dataset consists of over 25,000 labeled images with object tags from 150 categories. Each object in an image is precisely labeled, providing pixel-level classification, which makes it suitable for training semantic segmentation models. This processing was implemented using Python 3.8.

Correlation analysis and OLS regression model

Spearman’s rank correlation analysis is a non-parametric statistical method used to assess monotonic relationships between variables, particularly when dealing with non-normally distributed data51. This study uses Spearman’s correlation to preliminarily evaluate the relationships between variables related to natural landscape, built environment, and perception, and visitor density. The analysis was conducted using SPSS v.26. The calculation formula is:

$$\rho =1-\frac{6\sum {d}_{i}^{2}}{n({n}^{2}-1)}$$
(3)

Where ρ is the Spearman rank correlation coefficient; di is the difference in ranks for each pair of variables; n is the sample size.

Ordinary Least Squares (OLS) linear regression is a classical statistical model used to quantify the linear influence of independent variables on a dependent variable. In this study, the OLS model is used to explore the direct effects of NCHS landscape attributes on visitor density. The analysis was conducted using SPSS v.26. The model takes the following form:

$$V{D}_{i}={\beta }_{0}+\mathop{\sum }\limits_{k=1}^{K}{\beta }_{k}{X}_{{ki}}+{\epsilon }_{i}$$
(4)

Where \(V{D}_{i}\) is the visitor density of the i-th NCHS; \({X}_{ki}\) is the value of the k-th independent variable; \({\beta }_{k}\) is the regression coefficient, representing the marginal effect of \({X}_{k}\) on VD; \({{\epsilon }}_{i}\) is the random error term.

Spatial autocorrelation analysis and spatial regression models

To assess the geographic distribution characteristics of visitor density, the study calculates the Global Moran’s I to measure the spatial autocorrelation of visitor density. The calculation formula is:

$$I=\frac{n\mathop{\sum }\nolimits_{i=1}^{n}\mathop{\sum }\nolimits_{j=1}^{n}{w}_{{ij}}(V{D}_{i}-\overline{{VD}})(V{D}_{j}-\overline{{VD}})}{\mathop{\sum }\nolimits_{i=1}^{n}{(V{D}_{i}-\overline{{VD}})}^{2}\mathop{\sum }\nolimits_{i=1}^{n}\mathop{\sum }\nolimits_{j=1}^{n}{w}_{{ij}}}$$
(5)

Where n is the number of observation points; \({w}_{ij}\) is the weight in the spatial weight matrix; \(V{D}_{i}\) and \(V{D}_{j}\) are the visitor densities for the i-th and j-th points; \(\overline{VD}\) is the mean visitor density.

In the presence of significant spatial autocorrelation, spatial regression models are applied to improve the analysis accuracy. These models include the Spatial Error Model (SEM) and Spatial Lag Model (SLM). SEM is used to capture the spatial dependence of the error terms by introducing a spatial error term, which allows for more accurate estimation of the impact of landscape factors on visitor density, addressing the spatial error effects that may be overlooked in traditional regression analysis. The model takes the following form:

$$VD=X\beta +\lambda W{\epsilon }+\mu$$
(6)

Where represents the spatial lag of the error term; λ is the spatial error coefficient.

SLM is used to analyze the spatial dependence of the dependent variable itself by introducing the spatial lag of the dependent variable in the regression model, considering the mutual influence of visitor density between geographically adjacent units. The model takes the following form:

$$VD=\rho WVD+X\beta +{\epsilon }$$
(7)

Where WVD represents the spatial lag of the dependent variable; ρ is the spatial lag coefficient, indicating the strength of the spatial effect.

Spatial effect tests and spatial regression models were implemented in GeoDa V1.20.

XGBoost and SHAP

With the development of big data technologies, machine learning models have been widely applied to tourism behavior analysis. In this study, the eXtreme Gradient Boosting (XGBoost) model combined with the SHapley Additive exPlanations (SHAP) method is used to explore the complex nonlinear relationships affecting visitor density. XGBoost is a decision tree-based gradient boosting model well-suited for handling high-dimensional data and nonlinear features52. The optimization objective of the model is:

$${\mathcal{L}}=\mathop{\sum }\limits_{i=1}^{n}l({y}_{i},{\hat{y}}_{i})+\mathop{\sum }\limits_{k=1}^{K}\varOmega ({f}_{k})$$
(8)

Where \(l({y}_{i},{\hat{y}}_{i})\) is the loss function (e.g., mean squared error); \(\Omega ({f}_{k})\) is the regularization term used to control model complexity.

The SHAP method is used to interpret the output of the XGBoost model and quantify the contribution of each feature to the predicted results. Through SHAP, we can clearly identify the importance of different natural and cultural factors in the model and provide a quantitative analysis of the mechanism of each independent variable. Based on Shapley value theory, the formula is:

$${\phi }_{i}=\sum _{S\subseteq N\setminus \{i\}}\frac{{|S|}!({|N|}-{|S|}-1)!}{{|N|}!}\left[f(S\cup \{i\})-f(S)\right]$$
(9)

Where \({\phi }_{i}\) is the contribution of the i-th variable; S is a subset of the independent variables; N is the set of all independent variables; f(S) is the predicted value of the model when only subset S is included.

XGBoost and SHAP algorithms were implemented using Python 3.8.

Optimal parameters geodetector model

The Optimal Parameter-based Geographical Detector (OPGD) extends the traditional geographical detector (GD) method by optimizing classification intervals of explanatory variables to maximize the statistical power (q-statistic), thereby providing more accurate and robust detection of spatial heterogeneity and interaction effects53. Within the OPGD framework, the interaction detector module was specifically applied to explore pairwise interactions between socioeconomic, natural landscape, artificial landscape, and visitor-perceived factors. Interaction types were classified into five categories: nonlinear enhancement, bivariate enhancement, independent effects, single-factor nonlinear attenuation, and nonlinear weakening (Table 2).

Table 2 The types of interactions and judgment bases of OPGD.

Results

Spatial distribution of NCHS and its influencing factors

The kernel density analysis results, illustrated in Fig. 1, reveal a pronounced spatial clustering pattern in the distribution of NCHS across China. High-density clusters are observed primarily in the southeastern coastal regions and certain areas of central and western China, particularly the Yangtze River Delta, Pearl River Delta, and Beijing-Tianjin-Hebei regions. These areas are not only economically prosperous but also serve as key regions for the preservation and development of cultural heritage. Additionally, regions in central and western China with a concentration of historical sites, such as Sichuan, Shaanxi, and Yunnan provinces, also exhibit high kernel density values.

Fig. 1
figure 1

Spatial distribution of 238 NCHS.

The results of the OPGD analysis (Table 3) reveal that multiple factors significantly influence the spatial distribution of NCHS. Among the 13 analyzed variables, cultural institutions, education, religion and folklore, GDP per capita, historical settlements, road density, temperature, and FVC all passed the 5% significance level test, indicating that cultural, economic and environmental factors contribute to the spatial pattern of NCHS. Cultural institutions and education exert the strongest influence, highlighting the pivotal role of cultural and educational resources (q > 0.2). Social-economic factors, including GDP per capita and road density, have a moderate impact (0.1 < q ≤ 0.2), suggesting that economic development and accessibility contribute significantly to the distribution of these sites. Religion and folklore, historical settlements, temperature and FVC also exert notable effects, though to a lesser extent (0.05 < q ≤ 0.1). In contrast, factors such as elevation, topographic relief, river density, precipitation, and population density do not show significant effects. These findings indicate that while natural environmental conditions may influence the spatial distribution of NCHS, their impact is relatively limited compared to cultural, economic, and infrastructural variables.

Table 3 The explanatory power (q value) and significance level of 13 factors on the spatial distribution of NCHS

Spatial distribution of visitor density in NCHS

The visitor density analysis, presented in Fig. 2, highlights distinct spatial heterogeneity in the distribution of visitor density across NCHS. This variability is likely influenced by factors such as the cultural heritage value of the sites, transportation accessibility, natural landscape characteristics, and the level of tourism development. Visitor density is notably higher in the southeastern coastal areas and northwestern regions of China, with hotspots in the Yangtze River Delta, the west coast of the Taiwan Strait, and Shaanxi Province. These findings suggest that these regions possess significant cultural heritage value and strong tourism appeal. Conversely, lower visitor density is observed in central and remote western regions, likely due to limited transportation infrastructure and relatively underdeveloped tourism. Interestingly, the results of the kernel density analysis and visitor density analysis demonstrate similar spatial distribution patterns, particularly in the pronounced visitor clustering observed in southeastern coastal regions such as the Yangtze River Delta.

Fig. 2
figure 2

Spatial distribution of visitor density of 238 NCHS.

Correlation analysis and OLS model

Figure 3 presents a heatmap of the Spearman correlation coefficients between all landscape variables and visitor density for NCHS. The results reveal that the strongest and most significant correlation is between visitor density and Den_CH (β = 0.81, p < 0.001), indicating that areas with higher cultural heritage density attract more visitors. This finding aligns with the understanding that cultural heritage sites tend to draw larger numbers of visitors, particularly in areas with concentrated cultural significance. Additionally, visitor density is positively correlated with Den_road, Den_museum, and Den_SF. In contrast, it shows a negative correlation with natural landscape indicators such as FVC and elevation. These correlations suggest that while infrastructure and cultural facilities contribute to higher visitor density, natural landscape features like vegetation cover and elevation may have an inhibitory effect on visitor concentration. Spearman correlation analysis measures the monotonic relationship between two variables but does not imply causation. In contrast, regression analysis establishes a linear relationship between a dependent variable (Y) and one or more independent variables (X), allowing for prediction and causal inference. The subsequent regression analysis will further explore the combined effects of these indicators on visitor density.

Fig. 3: Heatmap of the Spearman correlation analysis.
figure 3

*p < 0.05, **p < 0.01, ***p < 0.001; The numbers in the squares of the figure are Spearman’s rank correlation coefficients.

To evaluate the relative contributions and effects of natural variables, artificial variables, and perception variables on visitor density, this study established a baseline model (Model 0) incorporating only covariates. Subsequently, three additional models were constructed by adding natural variables (Model 1), artificial variables (Model 2), and perception variables (Model 3) to the baseline model. Finally, all variables across the three dimensions, along with covariates, were integrated into a comprehensive model (Model 4) to assess the combined multidimensional effects (Table 4). The specifications of the OLS models are as follows:

Model 0: Dependent variables (Y) Covariates

Model 1: Dependent variables (Y) Covariates + Natural variables

Model 2: Dependent variables (Y) Covariates + Artificial variables

Model 3: Dependent variables (Y) Covariates + Perception variables

Model 4: Dependent variables (Y) Covariates + Natural variables + Artificial variables + Perception variables

Table 4 Linear regression model series

Table 5 presents the results of the five OLS models. The baseline model (Model 0) explains 6% of the variance in visitor density, whereas the comprehensive model (Model 4) explains 52.4%. The Variance Inflation Factor (VIF) values for all models are below 10, indicating that multicollinearity is not an issue in the models.

Table 5 Results of OLS regression analysis

The improvement in model performance, measured by the adjusted R2, highlights the contribution of each dimension of variables to visitor density. Compared to the baseline model (R2 = 0.060), Model 1 (R2 = 0.369), Model 2 (R2 = 0.387), and Model 3 (R2 = 0.092) demonstrate increases of 0.309, 0.327, and 0.032, respectively. These results indicate that artificial variables have the greatest impact on visitor density, followed by natural variables, while perception variables have the least influence. The comprehensive model (Model 4) achieves the best fit (R2 = 0.524), with improvements of 0.155, 0.137, and 0.432 compared to Models 1, 2, and 3, respectively.

The regression results of Model 4 identify 10 variables with significant effects on visitor density. Among these, four variables exhibit negative impacts: FVC (β = –0.254, P < 0.01), NET_year (β = -0.254, P < 0.01), Den_road (β = -0.254, P < 0.01), and Den_SF (β = –0.254, P < 0.01). The remaining six variables demonstrate positive effects. The three variables with the strongest contributions are NET_year (β = –0.254, P < 0.01), Den_CH (β = 0.300, P < 0.01), and PLAND_grey (β = 0.257, P < 0.001).

Spatial autocorrelation analysis and spatial regression models

This study conducted an LM test on Model 4 (Table 6), yielding a Moran’s I value of 3.5171 (P < 0.01), indicating significant spatial autocorrelation in the OLS residuals. The presence of notable spatial dependence suggests that the OLS model may be insufficient to capture the spatial structure of the data, necessitating further analysis using spatial regression models. The significant result of the Lagrange Multiplier (error) test (P < 0.05) suggests that SEM is more appropriate for addressing spatial effects, thereby ensuring more reliable estimation results. To compare the performance of spatial models, the study examined the results of the OLS model (Model 4), SEM (Model 5), and SLM (Model 6).

Table 6 LM test results

Table 7 presents the results of the spatial regression models for visitor density. Model selection was based on information criteria, including the Akaike Information Criterion (AIC) and Schwarz Criterion (SC), where smaller values indicate better model fit. The OLS model had an adjusted R² of 0.524. When spatial effects were incorporated, the SEM demonstrated an improvement in R² compared to the OLS model, whereas the SLM did not show changes in R². Additionally, the SEM exhibited the lowest AIC and SC values among the three models. Based on these findings, SEM (Model 6) was selected as the final spatial regression model for analyzing the relationship between landscape characteristics and visitor density in NCHS.

Table 7 Results of spatial regression models

The results of the SEM are summarized in Table 7. LAMBDA, representing the spatial error coefficient (λ) in the SEM equation, was found to be significant at the 0.001 level, confirming the presence of significant spatial dependence. A total of 10 variables were identified as having a significant influence on visitor density. Five variables exhibited a significant positive correlation with visitor density: GDP (P < 0.05), forest age (P < 0.01), PLAND_grey (P < 0.001), Den_CH (P < 0.001), and “Natural” perception (P < 0.01). Conversely, five variables demonstrated a significant negative correlation with visitor density: FVC (P < 0.001), NET_year (P < 0.001), Den_road (P < 0.001), Den_SF (P < 0.01), and “Cohesive” perception (P < 0.05).

Relative importance analysis of XGBoost-SHAP

The dataset was divided into a training set and a test set in a 7:3 ratio. Hyperparameters were optimized using the grid search method54,55, and the optimal XGBoost model parameters were determined through K-fold cross-validation, where K = 5 in this study. The model’s performance was evaluated based on the root mean square error (RMSE)56,57. The final optimal parameter combination identified was as follows: learning_rate = 0.01, max_depth = 5, and n_estimators = 100, yielding a minimum RMSE of 1834.4. The final model trained with these parameters served as the basis for calculating SHAP values. To identify the key factors influencing visitor density in NCHS, the absolute SHAP values (mean|SHAP | ) were used. SHAP analysis revealed the contribution of natural variables, artificial variables, and perception variables to visitor density based on Shapley values. A higher SHAP value indicates a greater influence of a variable on the model’s predictions.

Figure 4a presents the results of global feature importance. The findings highlight that FVC and Den_CH have the greatest influence on visitor density, with most artificial landscape indicators ranking prominently. Figure 4b illustrates the results of local feature importance, where each data point represents an NCHS. The color of each point reflects the feature value, with red indicating high values and blue indicating low values. The x-axis represents SHAP values, which can be either positive or negative, signifying both the magnitude and direction of a variable’s impact on the model’s output.

Fig. 4: The relative importance of independent variables.
figure 4

a Global feature importance. b Local feature importance.

The results presented in Fig. 5 further illustrate the impact of different landscape dimensions on visitor density. Collectively, natural landscapes contribute 37.11% to visitor density, artificial landscapes account for 44.30%, and landscape perception contributes 6.94%. These findings indicate that artificial landscapes exert the greatest influence on visitor density, followed by natural landscapes, while the effect of landscape perception is relatively minimal.

Fig. 5
figure 5

Contribution of variables in the three dimensions.

Within each dimension, individual indicators show varying levels of influence. Among natural landscape indicators, FVC is the most impactful, with a contribution rate of 29.86%, followed by elevation at 4.65%. The effects of other natural indicators are relatively minor. In the artificial landscape dimension, Den_CH has the highest influence, contributing 16.25%, followed by the proportion of gray spaces and museums, with contribution rates of 12.31% and 10.56%, respectively. In the perception dimension, most indicators exhibit relatively low importance. However, the “Sheltered” and “Cohesive” dimensions show comparatively greater influence, with contribution rates of 3.04% and 1.44%, respectively. Other perception indicators have a negligible impact on visitor density.

Interactions and threshold effects of XGBoost-SHAP

The partial dependence plots (PDPs) in Fig. 7 provide a deeper understanding of the interaction effects between cultural heritage density (Den_CH) and other variables across three dimensions—natural variables (FVC), artificial variables (Den_museum), and perception variables (Cohesive). The analysis also reveals the threshold effects of cultural heritage density on visitor density. In the plots, the x-axis represents the actual values of Den_CH, while the y-axis corresponds to its SHAP values, indicating the contribution of Den_CH to the model predictions. The data points are color-coded to reflect the values of the interacting features, with blue denoting lower values and red indicating higher values.

In regions with higher cultural heritage density, lower vegetation coverage is often associated with higher visitor density (Fig. 6a). This suggests that cultural heritage characteristics may attract more visitors even in areas with less abundant vegetation. A plausible explanation is that the cultural significance of these heritage sites serves as the primary draw for visitors, with vegetation playing a secondary role. Additionally, areas with lower vegetation coverage may feature more open spaces or better accessibility, further contributing to increased visitor flows. Regions with higher cultural heritage density and the presence of multiple museums tend to attract more visitors (Fig. 6b). This indicates that in areas rich in cultural heritage, the presence of museums enhances regional appeal and drives higher visitor density. Museums, as part of the cultural landscape, provide educational value, historical context, and immersive experiences, enhancing the attractiveness of the destination and contributing to a richer tourism experience58,59,60. In areas with lower spatial cohesion, higher cultural heritage density is associated with increased visitor density (Fig. 6c). This suggests that dispersed spaces, such as heritage sites divided by walls or steps, tend to attract more visitors. The dispersed layout may create additional points of interest, encouraging visitors to explore various parts of the site, thereby enhancing their overall experience. Conversely, higher spatial cohesion might result in a more unified site layout, which may reduce visitors’ inclination to explore beyond the main attractions.

Fig. 6: Partial dependence plots of cultural heritage density.
figure 6

a Interaction effect between Den_CH and FVC. b Interaction effect between Den_CH and Den_museum. c Interaction effect between Den_CH and Cohesive perception. d Nonlinear relationship and threshold effects of Den_CH on visitor density.

The relationship between visitor density and cultural heritage density is nonlinear (Fig. 6d), with two critical threshold points: the first at 2.22, where the relationship shifts from negative to positive, and the second at 5.0, representing a saturation peak. This indicates that as cultural heritage density increases, there is a critical point (2.22) where its impact on visitor density becomes positive. Beyond this point, visitor density continues to rise until it peaks at 5.0, after which growth begins to stabilize or decline. These thresholds highlight the nonlinear dynamics between cultural heritage density and visitor attraction.

Interaction detection of OPGD

The results obtained from the optimal-parameter geographical detector comprehensively illustrate the interactive effects among influencing factors on visitor density across China’s NCHS, highlighting varying interaction intensities and distinct interaction types (Fig. 7). According to the analysis, the interactions among these influencing factors predominantly exhibit nonlinear enhancement and bivariate enhancement effects, suggesting that the combined influences of these factors substantially exceed the sum of their individual impacts. Specifically, socioeconomic factors show pronounced nonlinear enhancement interactions with natural landscape variables (e.g., Forest density and Roughness), artificial landscape variables (e.g., Den_road and Dist_RS), and visitor-perception variables (e.g., Natural, Open, Cohesive, and Cultivated). Among natural landscape variables, significant interactions are observed between Forest density and Elevation, as well as between Roughness and NTE_year, indicating strong synergistic relationships affecting visitor density.

Fig. 7
figure 7

The interactive effects of influencing factors on the visitor density of NCHS.

Within artificial landscape factors, the interaction between cultural heritage density (Den_CH) and GDP exerts the strongest influence on visitor density, with an interaction q-statistic reaching as high as 0.7213. This finding suggests that the combined effect of socioeconomic status and cultural heritage density significantly enhances site attractiveness. Moreover, substantial interactive effects are observed between Den_CH and other variables such as Forest age, Den_road, Dist_RS, Cohesive, and Den_SF. Conversely, the interaction between Den_CH and vegetation coverage (FVC) is relatively weak, which aligns well with previous findings obtained from the XGBoost-SHAP model analysis. Regarding visitor-perceived factors, the nonlinear enhancement interaction between Natural and Serene demonstrates the highest magnitude, underscoring their combined importance in influencing visitor preferences. Interestingly, variables such as PLAND_grey and Sheltered consistently exhibit weak interaction types with all other factors. Collectively, these findings elucidate the complex interplay among socioeconomic, natural landscape, artificial landscape, and visitor-perceived factors in shaping visitor density patterns at China’s NCHS, providing valuable insights for future planning and sustainable tourism management.

Discussion

Through kernel density analysis, correlation analysis, regression models, OPGD, and the XGBoost-SHAP model, this study illuminates the effects of natural landscapes, artificial landscapes, and landscape perceptions on visitor density in NCHS. The findings provide valuable insights for managing cultural heritage tourism. The spatial distribution of NCHS and visitor density exhibits a strong clustering effect, predominantly concentrated in southeastern coastal China. This pattern aligns with prior studies on the spatial distribution of cultural heritage sites36,48. Such findings underscore the importance of prioritizing heritage conservation and managing visitor carrying capacity in this region.

The analysis of factors influencing visitor density reveals both consistencies with existing literature and novel findings. Previous studies widely acknowledge that the richness of cultural heritage within the artificial landscape dimension positively influences visitor attraction18,61,62. This is corroborated by the results of the spatial regression and machine learning models in this study. However, contrary to earlier findings63, this study identifies a negative relationship between visitor density and infrastructural elements such as road network density and supporting facilities. This suggests that for NCHS, excessive development or an overabundance of artificial features may detract from their appeal to visitors.

Regarding natural landscapes, the observed negative relationship between FVC and visitor density has not been extensively documented in prior research. This phenomenon could be attributed to the ability of culturally significant heritage sites to attract visitors even in areas with sparse vegetation, suggesting that the allure of cultural heritage can outweigh the limitations imposed by less favorable natural environments. Additionally, the positive correlation between forest age and visitor density, as well as the negative correlation between average net effective temperature and visitor density, highlights that older trees and cooler climates enhance the appeal of cultural heritage tourism64,65.

For landscape perception, the study uncovers a relatively minor impact of perceptual variables on visitor density, diverging from earlier studies66,67. This could be attributed to the significant influence of individual differences, cultural backgrounds, and situational factors on perception. It suggests that more granular perceptual metrics may be necessary to capture their nuanced effects on visitor density. Moreover, the limited impact of perception could be related to the dependent variable under investigation. Perceptual factors might more directly influence visitor experiences or emotional responses than visitor numbers. Nevertheless, the regression results demonstrate the significant role of “Natural” and “Cohesive” dimensions, emphasizing that landscapes with abundant vegetation and spatially diverse environments enhance the attractiveness of NCHS.

An important contribution of this study is its identification of the nonlinear relationship between cultural heritage density and visitor density, particularly the threshold effects. The findings indicate that while visitor density increases significantly with cultural heritage density in low-density contexts, it reaches a saturation point at a cultural heritage density of 5.0. This saturation effect highlights the need for heritage site managers to consider the implications of visitor carrying capacity9. Furthermore, the interactions between cultural heritage density and other dimensions, such as FVC, museum presence, and perceptions, underscore the importance of multidimensional synergies in influencing visitor behavior.

Our study makes several theoretical contributions to the understanding of visitor dynamics at heritage sites. First, by leveraging large-scale social media data, we extend the application of big data analytics in tourism and heritage studies, providing a novel approach to measuring visitor density and its influencing factors at a national scale. This overcomes the limitations of traditional survey-based or on-site observation methods, which are often time-consuming and geographically constrained. Second, our research integrates landscape characteristics, cultural heritage attributes, and visitors’ perceptions, revealing complex, nonlinear relationships that were previously underexplored. By employing XGBoost-SHAP analysis, we contribute to the methodological advancement in tourism research by demonstrating the efficacy of machine learning techniques in identifying threshold effects and interaction mechanisms in visitor behavior. Finally, our findings enrich the discourse on spatial heterogeneity in tourism flows, showing that visitor density at NCHS is influenced by a combination of natural and cultural factors, which vary across different locations. This reinforces the need for context-specific tourism management strategies and contributes to the broader theoretical framework of sustainable tourism development.

The findings of this study also have several practical implications for the management and planning of cultural heritage tourism. First, the identification of key landscape and cultural attributes that influence visitor density can inform evidence-based planning and management strategies. For instance, an important implication lies in the role of artificial landscapes, such as cultural heritage density and the number of museums, in shaping visitor density. While these elements enhance a site’s attractiveness, it is equally crucial to consider the adverse effects of overdevelopment and excessive artificial construction, which may undermine the site’s appeal. In addition, the observed negative relationship between vegetation coverage and visitor density highlights the need to carefully balance ecological conservation with visitor experience. This could involve strategically adjusting the proportion of vegetation and open spaces in heritage-dense areas. Another critical insight is the nonlinear relationship between cultural heritage density and visitor density, particularly the saturation effect observed at higher heritage densities. This calls for proactive measures to manage visitor flow, such as implementing reservation systems or setting capacity limits, to prevent overcrowding. By doing so, heritage managers can protect the integrity of the sites while ensuring a high-quality visitor experience. Furthermore, the application of social media analytics in assessing visitor distribution and preferences presents opportunities for real-time tourism management. Destination managers can leverage these insights to implement smart tourism strategies, such as dynamic visitor flow regulation, targeted marketing campaigns, and infrastructure adjustments based on seasonality trends. Future research could expand upon our findings by integrating real-time social media monitoring and machine learning forecasting models to predict emerging tourism trends and support adaptive management strategies.

Although this study offers significant insights into the factors influencing visitor density at nature-based cultural heritage sites, several limitations should be acknowledged. The scope of variables considered, while encompassing natural landscapes, artificial landscapes, and perceptions, remains constrained. In particular, the study does not thoroughly evaluate the current conditions and quality of cultural heritage itself, which are likely to play a critical role in visitor behavior. The study primarily employs spatial analysis and quantitative modeling, which, while yielding significant results, do not delve into individual visitor differences and behavioral patterns. Future research could integrate methodologies from disciplines such as behavioral science and psychology to further explore visitor motivations and decision-making processes. Future studies should also extend their focus beyond visitor density to explore the multidimensional aspects of visitor experiences at cultural heritage destinations. Emotional, psychological, and behavioral responses warrant greater attention, as these factors are closely tied to the long-term sustainability of such sites68,69. By prioritizing visitor feedback and experience, researchers and practitioners can develop strategies that not only enhance visitor satisfaction but also promote the sustainable development of cultural heritage tourism.

This study investigated the factors influencing visitor density at 238 nature-based cultural heritage sites (NCHS) in China by analyzing spatial distribution data and employing methods such as kernel density analysis, spatial regression models, OPGD, and the XGBoost-SHAP model. The findings illuminate the complex mechanisms through which natural landscapes, artificial landscapes, and landscape perceptions shape visitor density. The results indicate that artificial landscape variables, particularly cultural heritage density, exert a significant positive influence on visitor density. In contrast, the effects of natural landscape factors are more nuanced. While FVC and NET_year are negatively correlated with visitor density, forest age demonstrates a positive association. Furthermore, landscape perception variables exhibit relatively modest direct impacts on visitor density, although dimensions such as “Natural” and “Cohesive” show significant correlations. The analysis also highlights the presence of potential interactions between cultural heritage density and other landscape dimensions, as well as threshold and saturation effects in the influence on visitor density. These findings underscore the nonlinear and context-dependent relationships between landscape characteristics and visitor patterns. This study offers important implications for tourism management at cultural heritage sites, providing new perspectives and empirical evidence for improving the sustainable management of these destinations. By systematically analyzing the interplay between landscape attributes and visitor density, this research equips managers with actionable insights to optimize resource allocation, enhance site planning, and improve visitor experiences. Additionally, this work establishes a theoretical and methodological foundation for future studies on the spatial dynamics of cultural heritage tourism and visitor behavior. The frameworks and approaches presented here can guide subsequent research efforts aimed at deepening our understanding of the interactions between cultural heritage, landscapes, and tourism.