Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JOSS review] Support reading/writing networks from different formats, integration with NetworkX/OSMnx #582

Closed
martibosch opened this issue Jan 11, 2021 · 1 comment
Assignees
Labels
Projects

Comments

@martibosch
Copy link

The in_data argument of spaghetti.Network lists six possible input types but only describes four of them.
The notebooks of the tutorials use example data from PySAL in the form of a shapefile and iterables of libpysal.cg.Chain, nonetheless, the users might have their network data in other (more) common data formats (see, e.g., the formats supported by NetworkX). Would it be possible to instantiate spaghetti.Network objects from NetworkX graph objects so that spaghetti delegates the I/O part to NetworkX and focuses on the spatial analysis functionalities (see also #580). I know that there are other Python librares to deal with NetworkX, but since I suppose that spaghetti is mostly concerned with street networks, supporting NetworkX objects has the major advantage of supporting in turn OSMnx, which makes it very easy to stream street networks from OSM directly into Python objects.

Again, the developers might have good reasons (or other priorities) to not work with NetworkX objects, the point of this issue is to ensure that the matter has been considered.

openjournals/joss-reviews#2826

@jGaboardi jGaboardi added the JOSS label Jan 12, 2021
@jGaboardi jGaboardi added this to To do in JOSS paper Jan 15, 2021
@jGaboardi jGaboardi moved this from To do to In progress in JOSS paper Jan 15, 2021
@jGaboardi jGaboardi self-assigned this Mar 7, 2021
jGaboardi added a commit that referenced this issue Mar 21, 2021
addressing #582: update spaghetti.Network docstring
@jGaboardi
Copy link
Member

Thank you for pointing this out, we updated the documentation to be more clear (see #592)

str, iterable (list, tuple, numpy.ndarray), libpysal.cg.Chain, geopandas.GeoDataFrame

We also added a wishlist/roadmap item to the issues (#593) to address reading these different formats in future. However, due to spaghetti being tightly integrated into the PySAL ecosystem, we believe that the majority of use cases are covered by the standard pysal input file formats such as shapefiles and GeoDataFrames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
JOSS paper
  
Done
Development

No branches or pull requests

2 participants