luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
338 stars 20 forks source link

Visualization of sfnetwork objects #7

Closed Robinlovelace closed 4 years ago

Robinlovelace commented 4 years ago

The visualisation of the geographic components of sfnetwork objects is taken care of by sf and mapping packages such as leaflet, mapview, tmap and mapview and the graph component can be plotted by the igraph package. Worth considering other ways of visualising graphs? Just saw this and played with the interactive examples on the website and thought it may be of interest: https://github.com/JohnCoene/sigmajs

luukvdmeer commented 4 years ago

@agila5 Just a thought I got: You mentioned once you were planning to look into ggplot2 visualizations of sfnetworks. Maybe it is also an idea to look into ggraph, which already works flawlessly in combination with tidygraph objects. It should then just be able to recognize the geometry list column and plot nodes and/or edges with geom_sf.

See https://ggraph.data-imaginist.com/

loreabad6 commented 4 years ago

I created a repo here: https://github.com/sfnetworks/sfnetworks_viz for our wirk this afternoon. Feel free to comment here if you are intesrested to add you as a contributor.

And then just add ideas, code, data or anything that pops to mind!

Robinlovelace commented 4 years ago

Follow-on from my comment, it would be interesting to use the tranformer package to shift between the geographic and 'graph space' representations - seems to work with sf objects already: https://github.com/thomasp85/transformr

luukvdmeer commented 4 years ago

Since the hackathon is now behind us, I will close the hackathon issues. But I look forward to new specific feature request issues that resulted from the hackathon!

(although for this specific topic most issues/PRs will be probably be directed to ggraph)