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.0.tar.gz (83.5 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.0-cp38-abi3-macosx_11_0_arm64.whl (11.4 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for openmander-0.1.0.tar.gz
Algorithm Hash digest
SHA256 86b3aa0b7a1f91ae530ee8c1d8c5c956fd7875bfbdfa9c4422e4851cc6c35e5d
MD5 8024978af2085930725ba81a2ab048c7
BLAKE2b-256 4022221223b63e7cc0df2fc4b1b6221ff0e9055b6f740de8fa5bcf240b18733a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openmander-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5cefc357b3b878ae2b435e65a0099365fd3903d7238ec865bdd2dfbf07a841ea
MD5 7cbfb77d4a6f90e5a223a1070331cde1
BLAKE2b-256 24a2b9814e2612084f5ee9bb137ff748b970db51e939aa378c7eb57d85d4c93b

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