Naoyun – Visualize Live Twitter Activity

Version Comments Link
Tcheliabinsk (v3) Sochi Upgrade
  •  GUI
  • Automatic User Resolver
  • Multi Gephi Sender
  • TwitterGrapher : Updated
  • Solve OAuth 403 from the V3
Naoyun_V3.1
Arrow in the knee (V1.4142)
  • Following User is available
  • TwittGrapher : Adding Tweet text as Label
  • GeoTwitt : Experimental
  • Bonus : Special French Politics 2012 Thema (see the user.csv and word.csv)

If you have previous version just replace the .jar to upgrade.

At least don’t touch you Properties.properties or you will have to redo the OAuth process.

Download
Triple « A »  (v1.0) Start Download

Demo !

Naoyun is a software that create a bridge between Twitter and Gephi with their own Stream API. You can « follow » hashtags, words or users on twitter and display them as a network in Gephi in real time.

Here is a scheme to understand the architecture :

The TwitterStreamer is the main class that manage the Twitter API . This class also load a class that extends TwitterGephiStreamer.  Each time the Twitter Api get a new Status, the TwitterStreamer call the newStatus method from the TwitterGephiStreamer class.

On this method, there is the « Network Logic ». I called « Network Logic » all the processes and the rules to create a network from Twitter status.

For the moment, Naoyun have 3 network logic :

  • TwittFullGrapher : Makes a complete graph by representing users, hashtags, tweet, media, links and their connection. The « Smart » version implemented in Naoyun won’t represent tracked hashtag to improve the visibility of the graph.
  • TwitterUserNetwork : Represent only the relation between users.
  • GeoTwitt : Just display Twitt with Geo localisation

TwitterGephiStreamer extends a specific class : GephiStreamer. This Class can send message to Gephi with the Gephi Streaming API. I based the implementation thanks to theses 2 useful links :

How to Use Naoyun ?

The new version comes with a GUI. It should make life easier 😀

Keep in mind that Naoyun still in development, so sometime it might not work properly and some features are missing.

Naoyun

Launch the application by clicking on the Naoyun.bat / Naoyun.sh.

Because it’s serious twitter business, you have to get a token. For the first launch, the application will pleased you to use a link in order to obtain a PIN Code. This PIN code has to be enter after in the software promp. Don’t worry, if the process is right, this won’t be ask for you anymore. The Token will be stored in the TwitterProperties.properties file.

You should see this windows

Open

Main Panel

Here, by right clicking, you can activate defined Network Logic and link them to a Gephi Streamer.

Networklogic GephiStream

If you select a Network logic, it will show you in green the gephi platform where the graph will be try to be send.

By default, you have only 2 workspaces defined, but it’s possible to add others. Just fill up de form and click to Add Workspace .

It’s not possible yet to define other Network logic.

Streamer Tracking

The other tabs show you the streamer stracking part.

Streamer Tracking

You can define words and user to follow.

User

/!\ User need to have their id to be followed : Method used here might not works, the better is that you provide the list of user with their id in tracking/user.csv /!\

The start button will launch the twitter streaming with the current tracking items define here

Gephi

Launch Gephi and start a new Projet.

Go to the Streaming tab and start the Streaming server.

By default the server is http://localhost:8080

/!\ Don’t launch a layout for the moment  (Some bugs have been noticed ) /!\

If you have multiple gephi stream, add as many workspace as you need and don’t forget to start the Streaming Server on each workspace.

Naoyun_NewWorkspace

(Works only with v 0.8.2, It’s weird to setup, but it works)

If it’s all right, and if there is activity on your research, you should see some edges and nodes party in Gephi. You can now use some Layout (like ForceAtlas 1 & 2) to have a better visualization.

Possible Flow Architecture

Archi 1

Archi 2

Archi 3

Archi 4

Last one is possible to put in place, but I didn’t test it [may explode].

I start to stream, but nothing append on Gephi ?

You should verify:

  • The Gephi instance you want to reach is correctly defined and linked to a Running network logic.
  • The host is reachable at the adress you gave (firewall ?)
  • Nothing is running on same port (Tomcat, Glassfish etc… )
  • You start the streaming server in Gephi

 

User Following ?

To follow user, if the GUI method isn’t working well, you can edit the tracking/user.csv file. Each line represent a user.

There is 2 possibilities :

  • username : Username as a word
  • username,012345 :  Username as a word and following him (012345 is the long id of username)

You’r behind a proxy ?

Just open the .bat or .sh script and change this :

  • -Dhttp.proxyHost=YourProxyHost
  • -Dhttp.proxyPort=YourProxyPort

.Problems ? Comments ? please contact me on Twitter (of course 😉 @totetmatt

Problem with Authentification 401 ?

Re-download or clean the properties file by deleting everything inside.

If still doesn’t work, try to resynchronize your system time or better enabled automatic time synchronisation (thx to @evrsml who troubleshoot that )

 Old Video