Tuesday, 10 September 2013

Exporting MongoDB to GraphML network format

Exporting MongoDB to GraphML network format

I am a new programmer (not sure if I even deserve that title yet) so
forgive me if this is a naive question but I would like some help
exporting data from a MongoDB to the popular GraphML file format. Also, my
preferred language is Python.
Wikipedia has this specification of the file format here:
http://en.wikipedia.org/wiki/Graph_Modelling_Language
At the moment, I have a collection of documents that looks like this:
- Source entity
- Array of entity IDs for relationship type 1
- Array of entity IDs for relationship type 2
- Array of entity IDs for relationship type 3
I want to create a directed GraphML file where "Source entity" is the
source node, and each additional entity ID represents a directed edge.
Any advice or guidance on how to go about doing this would be most welcome :)
Thanks!

No comments:

Post a Comment