Skip to main content

Python toolkit for building and analyzing multimodal street and transit networks with a focus on accessibility and distributive equity

Project description

PyQuity

PyQuity is a compact Python toolkit for building and analyzing multimodal street and transit networks with a focus on accessibility and distributive equity. Quickly generate graphs and grids, attach POIs/GTFS, compute route-based accessibility, and evaluate equity (sufficientarianism, egalitarianism, utilitarianism) with seamless GeoPandas/NetworkX/OSMnx integration.

Installation

PyQuity can be installed via PyPI:

pip install pyquity

Examples

Graph Construction

import pyquity

# Create base graphs
G_walk = pyquity.graph_from_place('Barrie, Canada', network_type='walk')
G_bike = pyquity.graph_from_place('Barrie, Canada', network_type='bike')

# Create GTFS graph (GTFS zip file)
G_gtfs = pyquity.graph_from_gtfs('gtfs.zip')

# Combine base graphs with GTFS graph
MG_walk = pyquity.multimodal_graph(G_walk, G_gtfs)
MG_bike = pyquity.multimodal_graph(G_bike, G_gtfs)

Grid Construction

# Create amenity
amenity = pyquity.amenity_from_place('Barrie, Canada', amenity_type='education')

# Create grid
grid = pyquity.grid_from_place('Barrie, Canada', grid_size=1000)

# Add amenity and micromobility into grid
grid = pyquity.amenity_in_grid(grid, amenity)
grid = pyquity.micromobility_in_grid(grid, micromobility_size=100)

Equity Construction

# Create equity properties
equity = pyquity.Equity(MG_walk, MG_bike, grid, amenity)

# Measuring equity
grid = equity.sufficientarianism(served_time=15, weight='travel_time')
grid = equity.utilitarianism(served_time=15, weight='travel_time')
gini, lorenz = equity.egalitarianism(grid)

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

pyquity-1.8.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

pyquity-1.8.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file pyquity-1.8.0.tar.gz.

File metadata

  • Download URL: pyquity-1.8.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pyquity-1.8.0.tar.gz
Algorithm Hash digest
SHA256 95ca719c9b650dbaf1186c195c0acc86f93d3b3b283e94ac9cae72e27a503104
MD5 40c343a3152cc21e05b06a061b71e5b3
BLAKE2b-256 47f2fe41ac008dde3d80bb56a67aa9d21453dcd3612526acf6e314918e7a25c9

See more details on using hashes here.

File details

Details for the file pyquity-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: pyquity-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pyquity-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc6fcbfaa22430e93385949ffa3712bdd6b3c54b4cba13185be82b27a3cb41ba
MD5 e6fd8fb1aad6bea5d25494a6c3964455
BLAKE2b-256 f69fe1c86677bd85504e353ab726345c83093e1b715f477b507561ba0214911b

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