pointpats provides methods and functions for planar point pattern analysis, including point process simulation, intensity estimation, distance-based statistics, and cluster detection. Version 2.5.5 (current) supports Python 3.11+ and is part of the PySAL ecosystem. Releases follow a minor version cadence, with occasional breaking changes.
pip install pointpatsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a random point pattern and computes Ripley's K function for spatial clustering analysis.
Upgrade Python to 3.11+ or use a virtual environment with correct Python version.
Use 'points' instead of 'events' when creating PointPattern.
Ensure DataFrame has columns 'x' and 'y', or pass coordinates as numpy array.
Use simulated_pp.points to get the numpy array of coordinates.
Pass window as a shapely Polygon or use import shapely.geometry.box; window = box(minx, miny, maxx, maxy).
Use 'from pointpats import PointPattern' instead.
Ensure points array is 2D with shape (n,2). For single-feature input, reshape: points.reshape(-1,2).
Run 'pip install pointpats' and verify Python version >=3.11.
Use statistic object (e.g., k = K(pp); k.plot()) or import matplotlib and plot manually.