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
Usage
Graph Construction
import pyquity
# Street networks from OpenStreetMap
G_walk = pyquity.graph_from_place('Barrie, Canada', network_type='walk')
G_bike = pyquity.graph_from_place('Barrie, Canada', network_type='bike')
# Transit network from GTFS
G_gtfs = pyquity.graph_from_gtfs('gtfs.zip')
# Combine into multimodal graph
MG_walk = pyquity.multimodal_graph(G_walk, G_gtfs)
MG_bike = pyquity.multimodal_graph(G_bike, G_gtfs)
Grid Construction
# Create amenity GeoDataFrame
amenity = pyquity.amenity_from_place('Barrie, Canada', amenity_type='all')
# Create spatial grid (500 m resolution)
grid = pyquity.grid_from_place('Barrie, Canada', grid_size=5000)
# Attach amenities and micromobility stations to grid
grid = pyquity.amenity_in_grid(grid, amenity)
grid = pyquity.micromobility_in_grid(grid, micromobility_size=100)
# Optional: select multiple amenity types
amenity = pyquity.amenity_from_place('Barrie, Canada', amenity_type=['education', 'healthcare'])
Equity Analysis
# Create equity properties
equity = pyquity.Equity(MG_walk, MG_bike, grid, amenity)
# Sufficientarianism: proportion of grid cells reachable within served_time
grid = equity.sufficientarianism(served_time=15, weight='travel_time')
# Utilitarianism: average accessibility score across all cells
grid = equity.utilitarianism(served_time=15, weight='travel_time')
# Egalitarianism: Gini coefficient and Lorenz curve of accessibility distribution
gini, lorenz = equity.egalitarianism(grid)
Examples
See examples for a full walkthrough covering graph construction, grid setup, and equity analysis.
License
This project is licensed under the MIT License. See LICENSE for details.
Metadata
Release files for pyquity 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyquity-1.9.0.tar.gz | 10.0 kB | Without provenance | Details for pyquity-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyquity-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for pyquity-1.9.0-py3-none-any.whl |
Total release size: 20.3 kB
Release files / pyquity-1.9.0.tar.gz
| Download URL | pyquity-1.9.0.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
388403be4445c1c7fb24f8fa48423ef02b23415f43e28e631d102016eed30f9b
|
|
BLAKE2b-256 checksum How to use checksums |
faaee0153dd06fb56c1dd1a1ea1d8bb6e702edcdba9a8222dd517bf1dbcd8199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / pyquity-1.9.0-py3-none-any.whl
| Download URL | pyquity-1.9.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98afdcba021cf43b1b86ed042a3d41ae70a3b8440e121d1805eaab61ebddcf4b
|
|
BLAKE2b-256 checksum How to use checksums |
92fff4b741211449793e80ab3bc2d7fd1f13d9a68477b67696b5668e8ca08ec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for pyquity 1.9.0
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.