Skip to main content

1-Wasserstein distances between districting plans

Project description

wasserplan is a library for computing 1-Wasserstein distances between GerryChain partitions.

Dependencies

wasserplan depends on GerryChain and CVXPY. We recommend installing these dependencies with Anaconda (see the official GerryChain installation instructions).

Using

We principally use this library to compute pairwise transport distances which we (approximately) project into 2D Euclidean space. A simple demonstration of this use case using Virginia congressional districts is available as a notebook (open in Colab).

Performance

By default, wasserplan uses the open-source, lightweight ECOS solver, which is included with CVXPY. However, this solver may exhibit performance issues for large graphs (thousands of nodes). Performance can be improved by using a commercial solver such as MOSEK.

License

This library is available under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wasserplan-0.1.3.tar.gz (5.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page