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] Methods to assist common tasks (especially plotting) #581

Closed
martibosch opened this issue Jan 11, 2021 · 2 comments
Closed
Assignees
Labels

Comments

@martibosch
Copy link

The notebooks of the tutorial show how spaghetti can be used to assist a variety of spatial analysis tasks related to spatial networks. Nevertheless, to that end, the notebooks require a substantial amount of ad-hoc code, especially when it comes to plotting tasks. A key example concerns the simplest network visualization task, which seemingly requires using the spaghetti.element_as_gdf method to obtain geo-data frames for the vertices and arcs and then using the corresponding geopandas plotting methods. Wouldn't it be possible to create method(s) (maybe in the utils.py or as a separate, e.g., plotting.py module) to automatize these common tasks and offer a nicer API to the users so that they do not need to write too much repetitive and ad-hoc code? Such a method could include arguments to automatically add labels and legends for the nodes and arcs, and to assist further customization for the plots. I am thinking about something like the plot_graph method of OSMnx or more broadly its plot module.

After browsing the tutorial notebooks, the case for a plotting method(s) appears very relevant, yet the same remark might apply to further recurrent tasks (other than plotting) for which spaghetti has been design to assist.

openjournals/joss-reviews#2826

@jGaboardi
Copy link
Member

Partially addressed in #595.

@jGaboardi
Copy link
Member

Thank you for this remark, we have started to address this by adding a Network_Moran method (see the Network-constrained spatial autocorrelation notebook) into the code base as this is a much appreciated idea and we will be implementing that for this review. See Issue #586. Additionally, it is a good point that there is a fair amount of adhoc code, especially for plotting, in the tutorials. To stay in line with the federated ecosystem structure in the PySAL ecosystem, we plan on making general plotting functionality part of pysal/splot in the future. See issue pysal/splot#108. Additionally, the code for optimization problems will become part of the pysal/spopt package following its initial release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants