This morning I started working on another my intent: I wanted to see full Van Gogh’s artworks collection in a Gephi graph.
Three days ago I tried with Neo4j Gephi plugin, but since I’m working with Neo4j 2.0, I got an error. I tried to understand how much could cost to me to upgrade the plugin. So I started looking at the code… mmm too ambitious to me: I’d absolutely need some help from the plugin’s authors.
Fortunately, this tweet (and Michael Hunger) came to rescue me:
… and I realized I was able to start working on this task!
I. Download, install and configure GEPHI on my MAC OS X 10.7.5
It seemed I’d have to do the same usual automatic installation, but not: some other configuration was needed.
First, simple part:
“It’s a 42 MB .dmg file that contains the Gephi application. The installation is therefore simple: just drag the .app file into the Applications folder on your Mac and you’re done. Or so I thought“.
Second, slightly more complicated part:
Or just a joke if you use this post: http://www.konstantingreger.net/running-gephi-0-8-2-beta-on-macos-x-10-8-5-mountain-lion/
Current version of Gephi needs JDK 1.6… and some more energy!
1. If you have a JDK 1.7 installed, all you have to do is to uncomment jdkhome property and set the path to your v.1.6 home.
Show Gephi.app package content and go to Resources/gephi/etc and edit gephi.conf.
In my case I changed:
2. Add some more energy.
in my case I changed:
default_options="--branding gephi -J-Xms64m -J-Xmx512m -J-Xverify:none -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dnetbeans.indexing.noFileRefresh=true -J-
default_options="--branding gephi -J-Xms2048m -J-Xmx4096m -J-Xverify:none -J-Dsun.java2d.noddraw=true -J-Dsun.awt.noerasebackground=true -J-Dnetbeans.indexing.noFileRefresh=true -J-
II. Download neo4j-shell-tools by Mr. @mesirii
With Gephi.app installed and correctly configured, now I can download neo4j-shell-tools (please pay attention: this link is to version 2.0) and add some jars to neo4j lib directory:
1. Download this neo4j-shell-tools-2.0.zip and follow very clear instructions posted on github readme.md file:
unzip neo4j-shell-tools-2.0.zip -d
4 jars will be added:
geoff-0.5.0.jar mapdb-0.9.3.jar opencsv-2.3.jar import-tools-2.0-SNAPSHOT.jar
3. Now we can start Neo4j 2.0 Server and export data (excuse me @mesirii, I’m cutting and pasting readme.md):
cd /path/to/neo4j-community-2.0.0-M05 ./bin/neo4j restart ./bin/neo4j-shell
4. Finally run export command:
export-graphml [-o out.graphml] [-t]
Please note, it was mandatory to me using -t option: that’s the way how Gephi can see my properties (will be right??? I’m an absolute beginner of all these things…)
Now I can finally share my neo4art.graphml.
III. Load data into Gephi and have fun!
Open Gephi app and load neo4art.graphml:
Wow! Gephi is seeing my nodes, relationships and properties with all their attributes! 🙂
IV. Neo4Art Graph DB into Gephi
Et voilà: FULL VAN GOGH’S ARTWORK COLLECTION INTO A GEPHI GRAPH!
In yellow of course: Van Gogh’s favourite colour!
Or if you prefer a richer version with my wife saying “Ciao” exactly while I was taking the snapshot, ah ah ah 🙂