In R there is a package `spatstat` for spatial statistics — I don’t know of an equivalent in python.