The diffusion of granular renewable energy technologies displays spatial heterogeneity within countries. The study examines the distribution of residential heat pumps across 2148 Swiss municipalities in 2021, utilising a database covering 95.8 % of Swiss residential buildings. The study focuses on understanding the sociodemographic, technoeconomic and housing factors behind the spatial diffusion of heat pumps, using stepwise regression and spatial statistical analysis. Higher diffusion of residential heat pumps is found in less populated areas with larger shares of agricultural area and detached houses, suggesting a pronounced urban-rural disparity. Economic factors like income and electricity price show limited influence on residential heat pump diffusion in Switzerland, except for a negative impact of unemployment rates. Significant variations among Swiss cantons (states) in residential heat pump diffusion are observed, potentially influenced by regional policies. Spatial analysis indicates the presence of spatial spillovers as well. These findings could guide Swiss policymakers in effectively promoting heat pump diffusion, considering local and regional specificities. The methodology is adaptable and transferable to other geographical and socioeconomic contexts and alternative granular renewable energy technologies.