Skip to main content

OpenMander: a redistricting toolkit in Rust with Python bindings

Project description

Openmander Python Bindings

This directory contains the Python bindings for Openmander.

Installation

To install the Openmander Python bindings, you can use pip. Make sure you have Python ≥ 3.8 and pip installed on your system.

python -m pip install openmander

Usage

Once installed, you can import the Openmander module in your Python scripts and start using its features.

import openmander as om

iowa_map = om.Map("IA_2020_pack")

plan = om.Plan(iowa_map, num_districts=4)

# Generate a random configuration of 4 districts.
plan.randomize()

# Balance the total population of each district.
plan.equalize("T_20_CENS_Total", tolerance=0.002, max_iter=1000)

plan.to_csv("block-assign.csv")

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

openmander-0.1.1.tar.gz (83.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openmander-0.1.1-cp38-abi3-macosx_11_0_arm64.whl (22.0 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file openmander-0.1.1.tar.gz.

File metadata

  • Download URL: openmander-0.1.1.tar.gz
  • Upload date:
  • Size: 83.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.4

File hashes

Hashes for openmander-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d53601d605d78dee47a505137e6ab32eeb325020d6d83714032c15096796e00b
MD5 e5aae4c6fb02fe49d4dff84048acf236
BLAKE2b-256 f74e4b12a4daeb6627db111f03aa63d2721358633be38b029ffbb0e85dcaad36

See more details on using hashes here.

File details

Details for the file openmander-0.1.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for openmander-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 39d380ed20f04f01fb5c74eeae420970074c1a073e2c0e7898b975c1016f047b
MD5 9d83a829ae6012d2b357ac8a8e715bba
BLAKE2b-256 994f628ae398f85936e5ceb0c46801ea8b72ed11b6683d4fbb0dea2c709fd21c

See more details on using hashes here.

Supported by

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