Skip to content

Commit a9b965e

Browse files
committed
Populate the missing bits of the README
1 parent 26731ba commit a9b965e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ Create Spatial Kernel Density / Heatmap raster from point based vector data, à
55

66
Creates a kernel density (heatmap) raster from vector point data using kernel density estimation. The density is calculated based on the number of points in a location, with larger numbers of clustered points resulting in larger values, and points can be optionally weighted. Kernel Density / Heatmaps allow easy for identification of hotspots and clustering of points. This implementation provides an equivalent to [QGIS' Heatmap](https://docs.qgis.org/3.16/en/docs/user_manual/processing_algs/qgis/interpolation.html#heatmap-kernel-density-estimation) and [ArcGIS/ArcMap/ArcPro's Kernel Density spatial analyst](https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/kernel-density.htm) function. Note that any distance calculations are planar, therefore care should be taken when using points over large areas that are in a geographic coordinate system.
77

8-
The implementation of Kernel Density here uses the Quartic kernel for it's estimates, with the methodology equivialent to the ArcGIS documentation explaining how [Kernel Density](https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/how-kernel-density-works.htm) works. There are many alternative KDE functions available in python that may offer better performance, for example [scipy](https://docs.scipy.org/doc/scipy/reference/stats.html#univariate-and-multivariate-kernel-density-estimation), [scikit-learn](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html), [KDEpy](https://kdepy.readthedocs.io/en/latest/index.html), though these alternatives may not perform KDE in the same manner as GIS software (namely the Quartic kernel with optional weights).
8+
The implementation of kernel density uses the Quartic kernel for it's estimates, with the methodology implemented [following QGIS](https://github.com/qgis/QGIS/blob/master/src/analysis/raster/qgskde.cpp) and as described in ArcGIS' documentation explaining [how Kernel Density works](https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/how-kernel-density-works.htm). There are many alternative kernel density estimate (KDE) functions available in popular python libraries that may offer better performance, for example [scipy](https://docs.scipy.org/doc/scipy/reference/stats.html#univariate-and-multivariate-kernel-density-estimation), [scikit-learn](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KernelDensity.html), [KDEpy](https://kdepy.readthedocs.io/en/latest/index.html) etc., though these alternatives may not implement the Quartic kernel (with optional weights), as is typically found in GIS software. Additionally, performance with this package will be reduced compared to the native C++ implementaion in QGIS.
99

1010
## Installation
1111

12+
The package can be installed from pip:
13+
14+
```shell
15+
pip install spatial-kde
16+
```
17+
1218
## Usage
1319

1420
After installation, the `skde` tool is available from the command line with the following usage:
@@ -109,4 +115,5 @@ The Makefile includes helpful commands setting a development environment, get st
109115
- [ ] Documentation (e.g. mkdocs, read-the-docs w/ sphinx or similar)
110116
- [ ] Tooling for managing versioning/releasing (e.g. bump2version)
111117
- [x] Makefile commands for releasing to (test) pypi
112-
- [ ] Support geodesic distance calculation
118+
- [ ] Support geodesic distance calculation
119+
- [ ] Performance improvements

0 commit comments

Comments
 (0)