Small utility library containing graph algorighms used in other projects
Reason this release was yanked:
deprecated
Project description
DonGraphio
Small utility library containing graph algorighms used in other projects.
Base usage example
pip install dongraphio
import geopandas as gpd
from dongraphio import DonGraphio
from dongraphio import GraphType
import networkx as nx
dongrph = DonGraphio(city_crs=32638)
intermodal_graph = dongrph.get_intermodal_graph_from_osm(city_osm_id=3955288)
nx.write_graphml(intermodal_graph,"city_intermodal.graphml")
builds_from = gpd.read_file("test_data/buildings.geojson")
services_to = gpd.read_file("test_data/services.geojson")
adjacency_matrix = dongrph.get_adjacency_matrix(buildings_from=builds_from, services_to=services_to, weight="time_min")
adjacency_matrix.to_csv("city_adjacency_matrix.csv")
accessibility_isochrones, public_transport_routes, public_transport_stops = dongrph.get_accessibility_isochrones(
graph_type=[GraphType.PUBLIC_TRANSPORT, GraphType.WALK],
x_from=571747,
y_from=5709639,
weight_value=15,
weight_type="time_min",
)
accessibility_isochrones.to_file("city_accessibility_isochrones.geojson")
public_transport_routes.to_file("city_public_transport.geojson")
public_transport_stops.to_file("city_public_stops.geojson")
To get rid of GeoPandas warning message about Shapely one can use following construction in their code:
import os
os.environ["USE_PYGEOS"] = os.environ.get("USE_PYGEOS", "0")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dongraphio-0.2.4.tar.gz
(14.3 kB
view hashes)
Built Distribution
dongraphio-0.2.4-py3-none-any.whl
(16.4 kB
view hashes)
Close
Hashes for dongraphio-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 600987a00e522936dfd612fa7ed90ca8d56588321eb0e62c658f79bf6d8b0db8 |
|
MD5 | a5b1a137b71c3543463d9fd2364ff180 |
|
BLAKE2b-256 | 3bea0d0af0d9854500d8a0c2b345e57c038626b28afe24a6e2365dd0bf7ac4f4 |