Abstract:In the context of China’s new urbanization, the supply and demand situation of rural basic education, which is an important part of urban and rural basic public services, is constantly changing, and there is a structural imbalance between supply and demand of some rural educational facilities. Measuring and evaluating the accessibility of educational facilities in rural areas can accurately grasp the level of supply and demand of rural education, which is of great significance in promoting the equalization of basic public services in urban and rural areas. Taking Xiangxi Tujia and Miao Autonomous Prefecture as an example, it measured the accessibility level of educational facilities in rural areas based on Amap Direction API, analyzed the overall spatial pattern and spatial agglomeration characteristics of the accessibility level of educational facilities in rural areas by using Kriging interpolation and spatial autocorrelation, and explored the influencing factors and nonlinear relationships of facility accessibility by using random forest model and SHAP method. The results of the study provide data support for practical work such as special planning of public service facilities in national territory space, which can effectively promote the development of urban and rural education equivalence.Firstly, based on the direction API data, a system operation scheme for obtaining the shortest path time is constructed by drawing on the relevant scripting language writing method, so as to extract and analyze the accessibility level of rural educational facilities in Xiangxi. According to the accessibility time specified in the layout standards of educational facilities, the accessibility level of each type of facility is divided into levels, and the overall distribution of the accessibility level of each type of facility is obtained, on the basis of which the Kriging interpolation method is used to analyze the overall characteristics of the spatial pattern of the accessibility level of the rural educational facilities. The results show that the overall level of accessibility of rural educational facilities in Xiangxi is poor, and its spatial pattern has obvious differentiation characteristics. Secondly, the spatial autocorrelation (including global Moran index and local Moran index) was used to analyze the spatial clustering characteristics of the accessibility level of rural educational facilities. The results show that there is significant clustering of similar areas with similar levels of accessibility of educational facilities in rural areas of Xiangxi. The areas with higher accessibility levels are mainly concentrated in the centers of Jishou City and Huayuan County, while the areas with lower accessibility levels are mainly concentrated in Guzhang and Yongshun Counties in the eastern part of Xiangxi Prefecture. In terms of the degree of agglomeration, kindergartens have the strongestdegree of spatial agglomeration, followed by middle schools, and elementary school are the weakest. Finally, based on the existing studies and the characteristics of the study area, combined with the availability of data, multiple factors characterizing the level of economic and social development and the natural environment were selected, and the Random Forest Model and the SHAP algorithm were used to comprehensively detect the factors influencing the level of accessibility of rural educational facilities in western Xiangxi and their nonlinear relationships. The results show that the key factors influencing the accessibility of educational facilities in rural areas of Xiangxi mainly include population density, the proportion of construction land and average elevation, and that the level of urbanization and natural environment characteristics have nonlinear effects on the accessibility level, such as the threshold effect. In the future, it can further explore measures and paths to narrow the gap between urban and rural education levels and promote the equalization of urban and rural educational facilities on a county basis.