tomalrussell / snkit

spatial networks toolkit (python)
MIT License
31 stars 10 forks source link

Return networkx graph #41

Closed amanmajid closed 2 years ago

amanmajid commented 3 years ago

Potential solution to #39

tomalrussell commented 3 years ago

Thanks for working on this @amanmajid :blush: .. will be super useful

Apart from the notes above, could you:

What do you reckon about @czor847's suggestion of a to_igraph method - could you add it too while you're looking at this related stuff?

amanmajid commented 3 years ago

No worries!

I've just made some changes to the code as requested. In terms of the additional bullets:

tomalrussell commented 3 years ago

Great 😊

I wonder if we should create the networkx graph as a MultiDiGraph - that way it can handle multiple edges between pairs of nodes, and will retain the direction of edges, both of which are okay within the GeoDataFrame representation. It should also keep snkit in line with osmnx and momepy in terms of exchanging networkx graphs.

In terms of recording requirements - yes, I’d put it on a line in “extras” so that pip will only install networkx if you do something like ‘pip install snkit[nx]’ and in dev-requirements so we can test the optional functionality.

tomalrussell commented 2 years ago

Thanks for this, @amanmajid - closes #39 and #40, potential follow-up in #42