Skip to main content

pysupercluster

tests

A fast Python 3 module for geospatial point clustering.

This is a port of https://github.com/mapbox/supercluster to C++, conveniently wrapped in a Python module. Initial benchmarks show it to be an order of magnitude (10x) faster than the original JavaScript implementation.

Installing pysupercluster

The easiest way to install pysupercluster is to use pip:

pip install pysupercluster

Using pysupercluster

>>> import numpy
>>> import pysupercluster
>>> points = numpy.array([
...     (2.3522, 48.8566),   # paris
...     (-0.1278, 51.5074),  # london
...     (-0.0077, 51.4826),  # greenwhich
... ])
>>> index = pysupercluster.SuperCluster(
...     points,
...     min_zoom=0,
...     max_zoom=16,
...     radius=40,
...     extent=512)
>>> clusters = index.getClusters(
...     top_left=(-180, 90),
...     bottom_right=(180, -90),
...     zoom=4)
[
    {'id': 0, 'count': 1, 'expansion_zoom': None, 'latitude': 48.8566, 'longitude': 2.3522},
    {'id': 3, 'count': 2, 'expansion_zoom': 8, 'latitude': 51.49500168658321, 'longitude': -0.06774999999998421}
]

Metadata

Release files for pysupercluster-problematy 0.7.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysupercluster-problematy 0.7.8
File Size Uploaded Provenance Actions
pysupercluster_problematy-0.7.8.tar.gz 8.3 kB Without provenance Details for pysupercluster_problematy-0.7.8.tar.gz

Release files / pysupercluster_problematy-0.7.8.tar.gz

Download URL pysupercluster_problematy-0.7.8.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d844a0c367721e454f7c335b92842f45a3fe47aab682448d896f92c56a4dfb36
BLAKE2b-256 checksum
How to use checksums
277cdbd8ac94c041c7085346f87dfe396439e70165b15dc487295bb926db3947
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for pysupercluster-problematy 0.7.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.7.8 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page