Spatiotemporal Variation and Inﬂuence Factors of Habitat Quality in Loess Hilly and Gully Area of Yellow River Basin: A Case Study of Liulin County, China

: China has set up ecological protection and high-quality development of the Yellow River Basin as its national strategy. However, the fragile natural ecosystem and intensive human disturbances pose challenges to it. This study evaluates habitat quality change and analyzes its drivers in a representative county of this region, aiming to provide scientiﬁc basis for ecological protection and sustainable development. We took Liulin, a representative county of middle Yellow River Basin as the study area and evaluated the spatiotemporal variation of habitat quality from 2000 to 2020 with the InVEST model. Further, the inﬂuencing factors of habitat quality pattern were explored using GeoDetector, and their gradient ranges dominating the habitat quality change were determined by gradient analysis. The results showed that: (1) Areas of low and medium-low habitat quality grades were distributed interactively in the whole county; medium grade areas were scattered in the northeast and southwest parts of the county; and medium-high and high grades area were distributed sporadically along the Yellow River and its branches. (2) Habitat quality of the county almost unchanged from 2000 to 2010. However, from 2010 to 2020, with the rapid expansion of construction land (increased by 9.62 times), the area proportion of medium, medium-high, and high habitat quality grades decreased from 7.01% to 5.31%, while that of low and medium-low habitat quality grades increased from 92.99% to 94.69%. (3) The habitat quality was inﬂuenced by multiple natural-human factors. The main inﬂuencing factor was land use, followed by elevation. (4) Most changes of habitat quality occurred in areas with lower elevation, gentler slope, and higher vegetation coverage, which were affected by intensive human activities. These results suggest that in future land use policy making and, the construction land expansion in Liulin County should be restricted and differentiated ecological protection and restoration strategies should be implemented in areas with different habitat quality.


Introduction
In 2019, China proposed the major national strategy of ecological protection and high-quality development of the Yellow River Basin [1]. On 9 October 2021, Outline of the Yellow River Basin's Ecological Protection and High-quality Development Plan was issued, and the land use planning in these areas will continue prioritizing environmental protection instead of economic growth [2]. As China's second-longest river, the Yellow River and its branches flow through nine provinces, with a population of 0. 16

billion and
Land 2022, 11, 127 3 of 17 (3) analyze the main gradients of influencing factors on habitat quality, and (4) propose differentiated ecological protection and restoration strategy in the different habitat quality areas for governments and policy makers.

Study Area
Liulin County is located in middle the Yellow River Basin in the west of Shanxi Province (110 • 39 45"-110 • 05 33" E, 37 • 08 53"-37 • 37 28" N) (Figure 1), belonging to loess hilly and gully region. Liulin County includes 15 towns (Liulin town, Mucun town, Xuecun town, Mengmen town, Chengjiazhuang town, Zhuangshang town, Liuyu town, Sanjiao town, Chenjiawan town, Jinjiazhuang town, LiJiawan town, Jiajiayuan town, Gaojiagou town, Shixi town and Wangjiagou town) with a total area of 1287.29 km 2 . The area has a warm temperate monsoon climate. The annual average temperature is 10.5 • C and the average annual rainfall is 472.3 mm. The main soil types are yellow loamy soil, skeleton soil, and chestnut-brown soil. Liulin is located along the banks of the Yellow River, and the Sanchuan River, a first-level tributary of the Yellow River flows through the country. The elevation of the study area decreases gradually from east to west with ranges of 598-1472 m, forming four types of landforms: mountains area, hills area, platforms area, and plains area. The area of hills and gully occupies more than 70% of the total area. The exposed loess in the loess hilly and gully area has caused serious soil erosion and low vegetation coverage, resulting in a fragile ecological environment. Liulin County is also a typical area where industrial development and ecological environment conflict with each other, facing great challenges in the ecological protection and restoration. (3) analyze the main gradients of influencing factors on habitat quality, and (4) propose differentiated ecological protection and restoration strategy in the different habitat quality areas for governments and policy makers.

Study Area
Liulin County is located in middle the Yellow River Basin in the west of Shanxi Province (110°39′45″-110°05′33″ E, 37°08′53″-37°37′28″ N) (Figure 1), belonging to loess hilly and gully region. Liulin County includes 15 towns (Liulin town, Mucun town, Xuecun town, Mengmen town, Chengjiazhuang town, Zhuangshang town, Liuyu town, Sanjiao town, Chenjiawan town, Jinjiazhuang town, LiJiawan town, Jiajiayuan town, Gaojiagou town, Shixi town and Wangjiagou town) with a total area of 1287.29 km 2 . The area has a warm temperate monsoon climate. The annual average temperature is 10.5 °C and the average annual rainfall is 472.3 mm. The main soil types are yellow loamy soil, skeleton soil, and chestnut-brown soil. Liulin is located along the banks of the Yellow River, and the Sanchuan River, a first-level tributary of the Yellow River flows through the country. The elevation of the study area decreases gradually from east to west with ranges of 598-1472 m, forming four types of landforms: mountains area, hills area, platforms area, and plains area. The area of hills and gully occupies more than 70% of the total area. The exposed loess in the loess hilly and gully area has caused serious soil erosion and low vegetation coverage, resulting in a fragile ecological environment. Liulin County is also a typical area where industrial development and ecological environment conflict with each other, facing great challenges in the ecological protection and restoration.

Data Sources
The analysis of this study is mainly based on land use datasets, vector datasets (China vector, the vector of Yellow River Basin, Liulin County vector, Vector data of the towns in

Data Sources
The analysis of this study is mainly based on land use datasets, vector datasets (China vector, the vector of Yellow River Basin, Liulin County vector, Vector data of the towns in Liulin), socioeconomic datasets (Population density data and GDP data), DEM, Meteorological data, and NDVI. The data involved in this research comes from Resource and Environment Science and Data Center of the Chinese Academy of Science (http://www.resdc.cn/, accessed on 21 November 2021). The land use data in 2000, 2010, and 2020 in this study was 30 × 30 m grid data. The spatial distribution data of 1 km grid was used for the population density. The GDP data with spatial distribution of 1 km grid was adopted. Elevation adopted 90 m DEM data generated by sorting and splicing based on SRTM V4.1 data. The slope data was obtained from DEM data. Meteorological data includes annual rainfall and average temperature, the spatial interpolation data sets of annual average rainfall and the annual average temperature were used, respectively. The NDVI with spatial data of 1 km was used.

Habitat Quality Assessment
InVEST is a model system developed by the U.S. Natural Capital Projects Group to evaluate ecosystem services and their economic value, and to support ecosystem management and decision-making [51]. The Habitat Quality module of the InVEST model can be used to evaluate the conservation status of habitats which is important to biodiversity [51,52]. The Habitat Quality Module estimates habitat quality by analyzing land use maps and threats to species habitats [22,51,53]. Therefore, this study needs to determine the impact distance of threat factors, weight of threat severity, spatial attenuation characteristics, and relative sensitivity of habitat threat. Habitat quality is calculated by Equations (1)-(4) [51,52].
where D xj is the habitat degradation degree of x grid in habitat type j, R is the number of threat factors, Y r is the number of grids in the threat layer on the ground layer, W r is the weight of threat factors (0-1), r j is the intensity of threat factors, i rxy is the thret distance of threat factors to habitat, β x is the degree of legal protection, S jr is the sensitivity of j land types to threat factors r, d xy is the distance between grid x (habitat) and grid y (threat factor), d r max is the maximum influence range of threat factors. Where Q xj is the habitat quality index of x grid in habitat type j, K is a semi-saturation constant, which was 0.5 in this study; Z is the default parameter of the model (Z = 2.5), H j is the habitat suitability of j (0-1). According to the actual situation of Liulin County, dry land and construction land which are greatly influenced by human beings are selected as threat sources, so dry land, urban land, rural residential areas, and other construction land were taken as threat factors. Different threat factors have different threat parameters to land use types, and different land use types have different sensitivities to threat factors. If the threat degree of the threat factor gets greater, its maximum impact distance and weight will increase; similarly, the greater the threat ability of the threat factor, the greater the sensitivity of the land use type to the threat factor [51]. Threat factor parameters were determined based on empirical values and expert knowledge (Table 1). Referring to the InVEST instruction manual [51] and the related papers [13,23], sensitivity parameters were determined ( Table 2). In this study, ArcGIS 10.4 was used to process and analyze shp and tif data, InVEST model 3.7 was used to evaluate and simulate the degree of habitat degradation and habitat quality, and GeoDetector_2015 was used to analyze the influencing factors of habitat quality.  The range of habitat quality index is from 0-1 representing biodiversity. The higher habitat quality index, the more conducive to the maintenance of biodiversity. In order to facilitate the study of the temporal and spatial variation of habitat quality, natural breakpoint method was used to divide habitat quality index into five grades: Low (0-0.2), Medium-low (0.2-0.5), Medium (0.5-0.7), Medium-high (0.7-0.8), and High (0.8-1).
In order to explore the change range of Liulin habitat quality from 2000 to 2020, the change map of habitat quality was obtained by subtracting the grid maps of 2020 and 2000. The "+" value represented the improvement of habitat quality, and the "−" value represented the decline of habitat quality.

Exploration on Influencing Factors of Spatial Distribution of Habitat Quality
Geodetector model is a spatial statistical method to detect the spatial heterogeneity of variable factors and analyze the driving forces [36]. Geodetector is used to explore the relationship between independent variable (type quantity x) and dependent variable (numerical quantity y): the explanatory power of x to y. The explanatory power of two x combination to y increases or decreases, whether there is significant difference in the attribute mean of the two sub-regions; x has significant differences on the spatial distribution of attribute y [46]. The unique advantage of Geodetector is that it not only sorts order the influence degree of each influencing factor, but also analyzes the strength, direction, and linearity of the interaction between the two factors [46,54]. In this study, factor detection and interaction detection were used to explore the relationship between habitat quality and human-natural factors. This study selected human factors of land use (land use dynamics represents land use), population density and GDP, and natural factors of elevation, annual average rainfall, annual average temperature, and slope and NDVI to analyze the driving mechanism of spatial heterogeneity of habitat quality. Factor detection can measure the spatial divergence of the x factor on the habitat quality (y) and can also detect the magnitude of the influence of the x factor on the habitat quality (y). The calculation formula of q value is as follows (Equation (5)) [46,54].
where q is the influence degree of an influencing factor on the spatial and temporal distribution of habitat quality, L is the sample number of influencing factors, N h and N are the units of sub-region N and the whole study area, respectively, and σ h 2 and σ 2 are the discrete variance of habitat quality of sub-region h and study area, respectively. The value range of q is [0, 1], and the larger the value, the greater the influence of zoning factors on the spatial distribution of habitat quality in the study area; otherwise, the influence is smaller.
Interaction detection is to identify the interaction of different influencing factors, and evaluate whether the combined effect of influencing factors x 1 and x 2 will increase or decrease the interpretation ability to habitat quality (y), or whether these influencing factors have independent influences on habitat quality. The evaluation method is to calculate the values of q(x 1 ∩x 2 ), q(x 1 ), and q(x 2 ), and then compare them. The interaction relationship types are shown in Table 3 [46]. Table 3. Types of two-factor interaction of interaction detection.

Description
Interaction Enhance, nonlinear

Gradient Analysis of Influencing Factors of Spatial Distribution
Based on the analysis of the driving force of habitat quality change by GeoDetector, the single-factor influence degree and the two-factor interaction influence on the habitat quality had been obtained. In order to further determine the gradient range of the impact of the single factor on the habitat quality, a gradient analysis of the influencing factors was conducted. The influencing factors of elevation, annual average rainfall, annual average temperature, NDVI, and slope were divided into five gradients by natural breakpoint method. The change of habitat quality from 2000 to 2020 was divided into three habitat conditions: deterioration, no-change, and improvement. The results of gradient analysis were obtained by superposition of habitat quality change map and reclassification impact factor map.

Land Use Change Analysis
Arable land, forest land and grassland accounting for more than 90% of the total land area were dominant land use types and the main components of landscape matrix of Liulin (Table 4, Figure 2). From 2000 to 2020, the area of arable land decreased 1210.22 hm 2 , with a minimum decrease of 2.4%. The decline rate in the first 10 years was greater than that in the past 10 years. The area of forest land decreased 2325.72 hm 2 , with a maximum reduction of 38.04%. The area of forest land remained relatively stable from 2000 to 2010, but decreased by 38.04% from 2010 to 2020, indicating that the ecological land was well protected in the first 10 years. From 2000 to 2020, the area of grassland decreased 1850.83 hm 2 , which decreased by 2.66%. The area of grassland first increased 0.12% in the first 10 years, and then decreased 2.77% in the past 10 years. From 2000 to 2020, the area of construction land increased significantly 858.35%, with a maximum increase of 5328.97 hm 2 . The area of Land 2022, 11, 127 7 of 17 construction land increased by 845.17% between 2010 and 2020, indicating that the city developed quickly, and the construction land expanded rapidly in the past 10 years. The area of water area increased 56.5 hm 2 , with a minimum increase of 2.89%. There were relatively large-scale beaches distributed near the water area, and the area was expanding constantly. The land use types of the water area were mainly reservoirs and ponds. that in the past 10 years. The area of forest land decreased 2325.72 hm 2 , with a maximum reduction of 38.04%. The area of forest land remained relatively stable from 2000 to 2010, but decreased by 38.04% from 2010 to 2020, indicating that the ecological land was well protected in the first 10 years. From 2000 to 2020, the area of grassland decreased 1850.83 hm 2 , which decreased by 2.66%. The area of grassland first increased 0.12% in the first 10 years, and then decreased 2.77% in the past 10 years. From 2000 to 2020, the area of construction land increased significantly 858.35%, with a maximum increase of 5328.97 hm 2 . The area of construction land increased by 845.17% between 2010 and 2020, indicating that the city developed quickly, and the construction land expanded rapidly in the past 10 years. The area of water area increased 56.5 hm 2 , with a minimum increase of 2.89%. There were relatively large-scale beaches distributed near the water area, and the area was expanding constantly. The land use types of the water area were mainly reservoirs and ponds.  In the past 20 years, the land change in the first 10 years was slowed, but the land use change in the past 10 years was more intense. From 2000 to 2010, the conversion of arable land and construction land was the largest. About 82.01 hm 2 and 8.82 hm 2 of arable land were converted into grassland and construction land, respectively. Approximately 64.66 hm 2 and 4.91 hm 2 waters were converted into arable land and grassland, respectively. From 2010 to 2020, the conversion of arable land, forest land, and grassland was the largest. Approximately 2751.15 hm 2 and 1895.48 hm 2 of arable land were converted into grassland and construction land, respectively. About 1201.26 hm 2 and 1320.48 hm 2 of forest land were converted into arable land and construction land, respectively. Approximately 2503.39 hm 2 and 2036.83 hm 2 of grassland were converted into arable land and construction land, respectively. These changes were directly related to the local population growth, economic development, social development, and the laws and regulations. In the past 20 years, the land change in the first 10 years was slowed, but the land use change in the past 10 years was more intense. From 2000 to 2010, the conversion of arable land and construction land was the largest. About 82.01 hm 2 and 8.82 hm 2 of arable land were converted into grassland and construction land, respectively. Approximately 64.66 hm 2 and 4.91 hm 2 waters were converted into arable land and grassland, respectively. From 2010 to 2020, the conversion of arable land, forest land, and grassland was the largest. Approximately 2751.15 hm 2 and 1895.48 hm 2 of arable land were converted into grassland and construction land, respectively. About 1201.26 hm 2 and 1320.48 hm 2 of forest land were converted into arable land and construction land, respectively. Approximately 2503.39 hm 2 and 2036.83 hm 2 of grassland were converted into arable land and construction land, respectively. These changes were directly related to the local population growth, economic development, social development, and the laws and regulations.
According to the land types change of Liulin in the past 20 years, the area of forest land and grassland with ecological functions was declining, while the area of construction with man-made landscape was increasing greatly.

Temporal Variation of Habitat Quality
On the time scale, the mean habitat quality value of the whole study from 0.318 in 2000 to 0.319 in 2010, and then decreased to 0.298 in 2020 ( Figure 3, Table 5). The habitat quality first increased 0.31% and then decreased 6.58%, but the habitat quality showed a declining trend as a whole with a decline rate of 6.29%. In the three stages, the proportion of medium-low and low grades area of habitat quality was over 90%, and it can be seen that the mean habitat quality of Liulin was not good. From 2000 to 2020, the area of lower level (medium-low and low grades) increased, while the area of higher-level (medium, medium-high and high grades) decreased (Table 5). In 2000 and 2010, the higher-level habitat quality area accounted for 6.92% and 7.01%, respectively, while the lower-level area accounted for 93.08% and 92.99%, respectively, and the habitat quality was improved to a lesser extent. By 2020, the proportion of higher-level area reduced to 5.31%, the proportion of lower-level area increased to 94.69%. And the proportion of higher-level habitat quality area reduced by 24.31% from 2010 to 2020, the maximum reduction of medium-high grade was 44.29%. The above changes indicated that the habitat quality of Liulin had deteriorated, reducing by 6.29% in the past 20 years.
portion of lower-level area increased to 94.69%. And the proportion of higher-level habitat quality area reduced by 24.31% from 2010 to 2020, the maximum reduction of mediumhigh grade was 44.29%. The above changes indicated that the habitat quality of Liulin had deteriorated, reducing by 6.29% in the past 20 years.    According to the change map of Liulin habitat quality from 2000 to 2020 (Figure 4), the most obvious reduction in habitat quality was in the urban areas along the Sanchuan River in Liulin, as well as Chenjiawan town, Zhuangshang town, and Liuyu town. The habitat degradation in these areas was that the medium-high grade habitat quality was converted into medium-low and low grades habitat quality. However, the habitat quality improved in the middle of Chenjiawan town and Jinjiazhuang town, and the area of the promotion was relatively small. River in Liulin, as well as Chenjiawan town, Zhuangshang town, and Liuyu town. The habitat degradation in these areas was that the medium-high grade habitat quality was converted into medium-low and low grades habitat quality. However, the habitat quality improved in the middle of Chenjiawan town and Jinjiazhuang town, and the area of the promotion was relatively small.

Spatial Variation of Habitat Quality
On the spatial scale, the spatial differentiation of habitat quality was basically consistent with the land use. The habitat quality of urban land and rural residential land of man-made landscape type was poor, while the habitat quality of forest land and grassland of natural landscape type was better. The habitat quality pattern of the county was that low grade and medium-low grade distributed interactively, while medium, mediumhigh, and high grades were scattered (Figure 3). Medium-low and low grades habitat quality were the main habitat types in the county ( Table 5). The medium grade areas

Spatial Variation of Habitat Quality
On the spatial scale, the spatial differentiation of habitat quality was basically consistent with the land use. The habitat quality of urban land and rural residential land of man-made landscape type was poor, while the habitat quality of forest land and grassland of natural landscape type was better. The habitat quality pattern of the county was that low grade and medium-low grade distributed interactively, while medium, medium-high, and high grades were scattered (Figure 3). Medium-low and low grades habitat quality were the main habitat types in the county ( Table 5). The medium grade areas concentrated in the northeast and southwest of Liulin. The medium-high grade areas distributed in the villages and towns along the Yellow River and the Sanchuan River in Liulin. The high-grade areas scattered in Zhuangshang town in the middle of Liulin.
There was a certain correlation between the spatial distribution of habitat quality and landform characteristics. The habitat quality varied with topography (mountains > hills > platforms > plains). The habitat quality in mountainous area was mainly of medium grade; The habitat quality in plain area was mainly medium-low and low grades habitat quality.

Single Factor Analysis of Detection Factors
According to the results of GeoDetector, there were differences in the interpretation ability (q value) of different influencing factors to the change of habitat quality, but the q value of the decisive factor was not high. In Liulin County, the order of interpretation ability of influencing factors on habitat quality change was land use > elevation > annual average rainfall > population density > annual average temperature > GDP > NDVI > slope (Table 6). So, land use change was the important driving force of habitat quality change, followed by elevation. The q value of elevation was greater than annual average rainfall, annual average temperature and GDP, indicated that topographic factors had more obvious influence on the spatial change of habitat quality.

Interaction of Detection Factors
According to the interactive detection results (Table 7), the interaction relationship between annual average temperature, annual average rainfall, GDP, NDVI, population density, and slope, and any other factors was non-linear enhancement. This showed that the habitat quality of Liulin County was not affected by a single factor, but was the result of a combination of multiple factors. The six groups interactive factors with high interpretation ability of habitat quality change were annual average rainfall ∩ elevation > annual average rainfall ∩ land use > annual average temperature ∩ land use > annual average rainfall ∩ population density > elevation ∩ land use > population density ∩ land use. It can be found that the change of habitat quality was most affected by the interaction of annual average rainfall and elevation, followed by the interaction of annual average rainfall and land use. Although the interaction between annual average rainfall and elevation was the greatest among the results of the interactive detection, the interaction between natural factors and human factors was wholly stronger than that between natural factors. The interpretation ability to habitat quality was stronger only under the combined action of natural and human factors. The interaction ability between land use and any other factors in Liulin County was relatively high. According to the single factor analysis of detection factors, human factors, and natural factors in Liulin County significantly affected the evolution of habitat quality and spatial distribution pattern. Interactive detection and single-factor detection showed that the influence degree of two-factor interaction was greater than that of single-factor (Tables 6 and 7). If the interpretation ability of single factor was large, the interpretation ability of the corresponding two-factor interaction was also large. It can be inferred that the change of habitat quality was affected by multi-factor influence.

Gradient Analysis of Influencing Factors
The gradient of habitat quality change was different among influencing factors (Tables 8 and 9); 58.67% of the areas with deteriorated habitat quality distributed DEM gradients II and III, and 61.53% of the areas with improved habitat quality distributed DEM gradients II and III. The change of habitat quality occurred in 810-1025 m elevation areas, and the area of habitat change showed a decreasing trend with the increase of elevation; 54.11% of the areas with deteriorated habitat quality distributed slope gradient II and III, and 50.88% of the areas with improved habitat quality distributed slope gradient II and III. The change of habitat quality mostly occurred in the gentle slope zone. With the increase of slopes, the changing area of habitat showed a decreasing trend.  In terms of annual average temperature and annual average rainfall, about 70% of the habitat quality deterioration areas distributed both the gradients II, III, and IV, about 75% of the habitat quality improvement areas also distributed the gradients II, III, and IV. This reflected that the change of habitat quality did not occur in the areas with the highest or lowest climate factors, but in the areas with moderate climate factors (annual average rainfall of 478.97-483.56 mm and annual average temperature of 10.02-10.2 • C).
Also, 68.38% of the areas with deterioration habitat quality distributed gradient III and IV of NDVI, and 66.03% of the areas with improved habitat quality distributed gradient III and IV of NDVI. Habitat quality change occurred in high vegetation coverage areas with NDVI of 0.48-0.57.

Temporal and Spatial Variation of Habitat Quality
From 2000 to 2020, construction land rapidly expanded and forest land, grassland and arable land continuously decreased in the study area. Land use change led to the spatialtemporal heterogeneity of habitat quality distribution. The habitat quality spatial pattern of the county was that low grade and medium-low grade areas distributed interactively, accounted for 90% of the whole county; while medium, medium-high, and high grades area scattered among them. This spatial pattern is different from the aggregation pattern found by other studies. For example, Tang, F et al. found that the habitat quality was high around the county boundary and low in the central regions in Changli County [13], and Berta Aneseyee, A et al. found in Winike Watershed, the eastern part had a higher habitat quality than its western part [24]. The special spatial pattern of habitat quality in Liulin, which was different than other areas, was mainly caused by the unique terrain, limited water resources and intensive disturbances. Due to low precipitation, severe soil erosion and intensive human disturbances over the years, the vegetation cover is sparse, and relatively high in the gullies than on the slopes, leading to an alternating distribution of medium-low and low grades habitat quality. Some small patches with high vegetation coverage distributed sporadically in the county, and hence medium, medium-high, and high grades of habitat quality were scattered in this area.
The habitat quality varied with topography, with an order of mountains > hills > platforms > plains. Due to the special geographical conditions of mountainous areas, human beings have less ecological intrusion in mountainous areas with high vegetation coverage, and the habitat quality in this area is higher. In plain areas, rapid expansion of built-up areas and intrusion of various artificial landscapes seriously threatens the surrounding environment, resulting in low habitats quality. This phenomenon, i.e., habitat quality was higher in mountain areas than in plain areas, is consistent with previous studies in other areas, such as the Taihang Mountains in Hebei Province [35], Changchun City [55].
Our research results showed that land use was the main influencing factor of habitat quality changes. The habitat quality decreased mainly due to the conversion of forest land, water area, arable land, and grassland to construction land and the conversion of forest land to arable land ( Figure 5). Owing to the Grain for Green Project and the Fragile Ecosystem Protection of Lvliang Mountain, a fraction of arable land and grassland were converted to forest land, and a fraction of arable land was converted to grassland and water area ( Figure 5). In these areas, the habitat quality was improved. This is consistent with the findings of many existing studies that different land-use changes have different spatial and temporal effects on habitat quality, that is, conversion from other land-use types to forest land and grassland is positively correlated with habitat changes, while conversion to construction land is negatively correlated with habitat changes [23,56]. On the whole, although Liulin County has implemented a series of ecological protection and restoration projects, such as the Grain for Green Project, three North Shelterbelt Project, the Fragile Ecosystem Protection of Lvliang Mountain, mined land reclamation, and ecological restoration, the destruction of ecologically functional land by human activities outweighed the positive effects of these projects, leading to the habitat quality decrease of the whole county. Therefore, the government should not only promote artificial ecological restoration projects, but should also appropriately restrict human activities that destroy the ecological environment.
Ecosystem Protection of Lvliang Mountain, mined land reclamation, and ecological restoration, the destruction of ecologically functional land by human activities outweighed the positive effects of these projects, leading to the habitat quality decrease of the whole county. Therefore, the government should not only promote artificial ecological restoration projects, but should also appropriately restrict human activities that destroy the ecological environment.

Influencing Factors of Habitat Quality
In the single factor detection of this study, the dominant factor of habitat quality change was land use, which was consistent with the previous research results [38,42,57]. Elevation was the second dominant factor of habitat quality, which is different from Zhu et al. study [42]. In the same period, the vegetation coverage and the intensity of human activities are also different for different altitudes. As the altitude increases, the vegetation coverage decreases and human activities decrease. The elevation of Liulin ranges from 598 to 1472, with an elevation difference of more than 900 m. The special topography of the Liulin will lead to differences in vegetation coverage and human activities, which in turn leads to differences in habitat quality. Therefore, elevation is the second dominant factor in the change of habitat quality. According to interaction detection, the interpretation ability of land use interacts with any other factors was greater than other factors interaction, which further proved that land use was the core factor of habitat quality change. Human factors played a leading role in the process of habitat quality change [42]. In order to protect the habitat quality and maintain a healthy ecosystem, it was necessary to control the spatial differences in habitat quality caused by human as far as possible. Therefore, the change of habitat quality was affected by multiple factors including natural, social, and human, and so on [36,38]. The impact of comprehensive factors on the change of habitat quality was multiple and complex, and the relationship between factors was interactive. In the future, multi factor coupling driving analysis of habitat quality will be considered.
This study attempted to further determine the gradient range dominating the change of habitat quality of different influencing factors on the basis of the above analysis. The study found that most of the change of habitat quality mainly occurred in the areas with low elevation, gentle slope, moderate temperature, and moderate rainfall and high vegetation coverage, where human activities are intensive. Yao et al. [58] found that most of the changes in the habitat quality of the Sanjiang Plain occurred in areas with high vegetation coverage, low altitude, gentle slopes, and moderate temperature and precipitation. The results of this study are consistent with Yao et al. research results. The low-altitude and gentle slope area is dominated by construction land, and the expansion of construction land has severely damaged the quality of the habitat. At the same time, the government has proposed ecological restoration policies to improve the quality of the habitat in response to the ecological impacts of urban expansion. Therefore, changes in habitat quality mainly occur in flat areas. In areas with high vegetation coverage, the quality of habitats has been reduced due to man-made destruction of forests and degradation of woodlands, while the establishment of ecological protection zones and the implementation of ecological projects have led to higher quality of habitats. Therefore, changes in habitat quality mainly occur in areas with high vegetation coverage. To improve habitat quality in the future, the government and relevant departments need to actively guide human activities in the change of habitat quality.

Implications for Habitat Quality Improvement and Ecological Protection
This paper revealed the spatial-temporal variation and influencing factors of habitat quality of Liulin County, where is a typical vulnerable eco-environmental area of the Middle Yellow River Basin. Our results have important implications for habitat quality improvement and ecological protection in this area.
The government should strengthen territorial spatial planning and reasonably regulate the scale of construction land transformation. Since 2010, the construction land of Liulin has expanded sharply to 9.62 times, resulting in a reduction of the average habitat quality of 6.29%, so it is necessary to strictly limit the intensity of land development. At present, China is carrying out the demarcation of "three zones and three lines (Three space areas of urban space, agricultural space and ecological space; and the corresponding three control lines of urban development boundary, permanent basic farmland protection red line and ecological protection red line)". The government needs to strengthen territorial spatial planning, reasonably plan the delimitation of "three areas and three lines", strictly implement the spatial planning and use, and prevent the extensive utilization and disorderly expansion of construction land.
Differentiated strategy for ecological protection and restoration should be developed. Ecological restoration measures should be taken to improve regional vegetation coverage and habitat quality in the lower-level habitat quality area of Liulin. The results show that due to the poor ecological background of the hilly and gully area and frequent human activities in the Liulin, the lower-level habitat quality area accounts for more than 90% of the total area of the county. Therefore, the government needs to take measures to reduce the proportion of areas with lower-level habitat quality. In areas of lower-level habitats with intensive human activities, we must persist in greening around urban areas and towns, and intensive and economical utilization. In the hilly and gully areas of lower-level areas, the small watershed should be taken as a unit for systematic management, and the ditch-slopearable land should be regarded as a whole. Due to the lack of water resources, shrubs and grass should be replanted on slopes to form a shrub-grass multi-layer structure and increase biological diversity, and farmland protection measures should be integrated in cultivated land remediation, such as configuring ecological corridors, integrating ecological design in infrastructure improvement, and increasing ecological connectivity and connectivity. Ecological conservation measures should be improved and ecological protection areas should be designated in the higher-level habitat quality area of Liulin. We found that areas with higher-level habitat quality are scattered across the county and account for 10% of the county. These areas account for a relatively small proportion, and the destruction of human activities and the natural degradation of forest land have led to a reduction in the quality of habitats. Therefore, it is necessary to strictly adopt a strategy of protection prior to restoration to increase the area of higher-level habitats. In higher-level habitat quality areas where human activities are intensive, restoration measures such as ecological replanting and low-efficiency forest quality and efficiency improvement should be adopted, and protection measures for ecological protection areas should be constructed in higher-level habitat quality areas with fewer human activities.

Conclusions
This study takes Liulin as the study area, which is a representative county of the Loess hilly and gully area in the Yellow River Basin. The spatiotemporal variation of habitat quality, influencing factors and their gradient ranges dominating habitat quality change were revealed with the InVEST model, GeoDetector, and gradient analysis. The results show that the mean habitat quality of Liulin decreased by 6.29% from 2000 to 2020. The area of lower-level habitat quality accounted for more than 90%; while the higher-level scattered among them. Our results could provide scientific basis for developing differentiated ecological restoration and protection strategy in this area. The lower-level habitat quality was mainly distributed in areas with hilly and gully terrain and built-up areas. In these areas, human disturbances should be restricted and artificial ecological restoration should be implemented to enhance habitat quality. Especially, as the major cause of habitat quality decrease in the past decade, construction land expansion should be rationally controlled by promoting land intensive and economical use and strictly implement land use planning. For areas with higher-level habitat quality, efforts should be put on ecological protection to prevent vegetation degradation, and ecological preservation areas should be established when necessary.
In the future, more research should be conducted on habitat quality variation and driving factors in larger scales in the Yellow River Basin, to better guide biodiversity protection and sustainable development in this area. Also, the processes and mechanism of human activities' effects on habitat quality change needs further investigation, especially in ecologically fragile areas, which are basis for coordinating economic development and ecological protection.
Funding: This study was funded by the National Natural Science Foundation of China (41401619).

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.