The R script named "spatial_interpolation_functions.R" comprises functions for spatial interpolation of sociodemographic and built-environment variables. These functions are designed to be utilized on point data, particularly to compute variables for subway station locations. These variables can then be employed as inputs for cluster analysis or econometric analysis. Although primarily intended for subway station data, it is possible that these functions could function on other data types as well.
An R package sifr has been developed based on these functions. You can directly use that package instead.