Python statistics and GIS functions