ThinkR-open / isc-proposal

RConsortium ISC Proposal — "Rebooting and Extending R for Neo4J"
9 stars 0 forks source link

Comments and random discussion #3

Open ColinFay opened 6 years ago

ColinFay commented 6 years ago

Feel free to leave any comment or question you might have here.

RMHogervorst commented 6 years ago

Move to and from neo4j from tidygraph

The tidygraph package uses igraph on the backend and represents graph data as a node dataframe and an edge dataframe. It should be relatively easy to translate those to cypher statements. As I recall, using neo4j you create links and nodes seperately from each other.

ColinFay commented 6 years ago

This is a neat idea @RMHogervorst.

I've been working a neo4j -> igraph -> ggraph workflow for now, but it seems pretty interesting to implement the other way around : from tidygraph to cypher.

This would basically mean working on a way to translate the two tidy-graph dataframe into cypher. I've already worked on a dataframe to cypher-nodes example here, so this might be pretty straightforward for the node part.

I've struggled a little bit with the dataframe to cypher-relationship (as I first have to set a bunch of rules for what makes a "cypherizable" relationship dataframe), but I guess if we go for a "tidy graph first" approach, this would alleviate from a lot of complexity on this point.

Thanks for sharing this !