Abstract
Understanding the spatiotemporal patterns and associated drivers of China’s foreign aid is essential for characterizing its structural distribution and temporal evolution. Using project-level and financial data from the AidData database (2000–2021), combined with multi-source indicators from the World Bank WDI and UN Comtrade, this study applies geospatial analysis and machine learning models to quantify the country-level spatiotemporal patterns and potential determinants of China’s foreign aid. A SHAP-based framework is further used to identify the nonlinear contributions of key variables. The results indicate that: (1) the number of projects and total funding increased in several distinct phases, forming a dual-core spatial pattern concentrated in Africa and Asia, with infrastructure and social public services accounting for a large share of sectoral allocations; (2) regional profiles differ substantially—Africa and Asia mainly receive aid related to basic development sectors, the Middle East exhibits no persistent dominant sector, and Europe shows a relatively higher proportion of production- and economy-related projects; (3) spatial clustering is evident, with Sub-Saharan Africa and South Asia maintaining long-term high–high clusters in project counts, whereas funding amounts show higher variability and dispersion; and (4) aid allocation is associated with economic, trade, and political indicators, with recipient development level exhibiting the strongest contribution, while resource-related variables show comparatively weaker explanatory power. SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1038/s41598-026-39475-7.