github-actions[bot] on gh-pages
Update documentation (compare)
jGaboardi on v1.6.6
jGaboardi on main
Update .pre-commit-config.yaml (compare)
dependabot[bot] on github_actions
jGaboardi on main
Bump actions/setup-python from … Merge pull request #675 from py… (compare)
dependabot[bot] on github_actions
Bump actions/setup-python from … (compare)
@hasecbinusr a network object can now be instantiated with a geopandas.GeoDataFrame
, but currently it will still produce the same error you were getting before if you would like a simplified, graph-theoretic object. However, we have added an extragraph
kwarg that will bypass simplification if set to False
.
Thanks for sticking with this issue. It is absolutely still on the radar.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-14-0c31d729ebc0> in <module>()
----> 1 ntw = spgh.Network(in_shp=edges)
AttributeError: module 'spaghetti' has no attribute 'Network'
Any clue what's causing this? I'm trying to follow the example at https://github.com/pysal/spaghetti/blob/master/notebooks/Network_Usage.ipynb
import spaghetti as spgh
import osmnx as ox
%matplotlib inline
place_name = "Travis County, Texas, United States of America"
graph = ox.graph_from_place(place_name, network_type='drive')
fig, ax = ox.plot_graph(graph)
edges = ox.graph_to_gdfs(graph, nodes=False, edges=True)
ntw = spgh.Network(in_shp=edges)
geopandas.GeoDataFrame
as the value of the in_shp
argument. And it is very cool that we now know this works. Have you thought about contributing a notebook to showcase this use-case? We would be very interested in reviewing any contributions you may have!
spaghetti
repo and opened a discussion where we can better get ideas and keep track of them. Can you post you notes and figures in there?