#Bandwidth selection

2 posts

Tutorial Spatial Analysis Part 2 of 2

Geographically weighted regression in Python: GWR and MGWR with mgwr

Fit geographically weighted regression (GWR) and multiscale GWR (MGWR) in Python with the mgwr package on real West Yorkshire house prices: choose the bandwidth by AICc, map local coefficients with a multiple-testing correction, read local R² and local collinearity, and compare against global OLS, spatial lag and spatial error models.

Advanced 17 min read

Tutorial Python Part 2 of 2

Kernel density estimation in Python for GIS: bandwidths, GeoTIFF heatmaps and relative risk

Make a kernel density heatmap from points in Python: compare Scott/Silverman, likelihood cross-validation and a fixed planning distance, Gaussian and Epanechnikov kernels and sample weights, export an edge-corrected GeoTIFF with rasterio, show it on a basemap, and map case-control relative risk on Camden's London plane trees.

Intermediate 16 min read