Build your own interactive network

Similar to the map builder, there is a web-based version of the network builder under development. The web based version is useful as it provides immediate feedback on a new interactive visualization — due to browser security restrictions the visualizations will not run from a local computer without a webserver. Nevertheless, the scale and size of network data also demand an offline alternative for networks.

I am very happy to announce the first version of such an option: a Sigma.js export option for Gephi. The code we have written for this has been tested, but it should be considered an ‘alpha’ version. We very much welcome feedback and information on any bugs you discover.

To create an interactive network visualization with this offline approach, you will need to have Gephi installed. It is free and available for Linux, Mac, and Windows, and can be downloaded from the Gephi website.

Once installed, open Gephi and go to Tools->Plugins. Click “Available Plugins” and find “SigmaExporter” in the list. If you don’t see it, please click the “Reload Catalog” button and see if it then appears. Place a checkmark next to it and click the “Install” button at the bottom of the window. Accept the license agreement (GNU GPL v3), and click to install even though it hasn’t been signed (I’ll need update the plugin to address this later).

You must then exit Gephi and open it a second time. From that point onward, you will have a new menu option in the File->Export menu. Open any network and visualize it the way you like within Gephi. When you are ready to share your network online, click File->Export->Sigma.js template… . Close a suitable location and provide the necessary information (anything marked with * should be filled in at a minimum). Click ok and your network will be built. You will not be able to preview the network on your local machine without a webserver installed (this is why a web version is in the works). Upload the “network” folder in the location you specified to any webserver of your choice and share the link with all your friends. We’d love for you to share the link with us too and provide feedback.

If changes are needed, re-run the export wizard a second time and re-upload. The only files that change are config.json and data.json. Advanced users may also wish to just open and edit config.json in a text editor after formatting the JSON with JSONLint or another tool.

21 thoughts on “Build your own interactive network

  1. Great work.
    I need to include some information for the nodes (as in the followers at @OIITwitter project). How can I do that? I have the data in my data table in Gephi under different columns.
    Thanks,

    • Hi Omar,

      This should happen automatically if you are using the SigmaExporter plugin. Each column in the Node view is listed in the right hand panel (the column name in bold followed by the value for the selected node). There is a limitation currently that extra edge information is not included (not sure where to put it at the moment), but nodes should be fully covered. If this isn’t working, please do follow up and we can track down the issue.

      Best wishes!

        • Replied to you in email a week ago, but also posting here for reference.
          ———————-
          Hi Omar,

          It looks as though you selected the attribute as the “image attribute”. In that case, it won’t appear but will try to load an image at the location stored in the attribute. Since that location doesn’t exist in your example nothing is shown.

          Try setting the image attribute to “None (default)” and your attribute should appear in the right hand panel.

          Scott

  2. Great plug-in that makes it a lot easier to get interactive network graphs from Gephy. A few things I would like to see in an update:
    *Make the info/legend/search-box on the right minimizable, sometimes you want to use as much of the screen as possible for the graph.
    *Include the possibility to chose between hiding and grayscaling all non-neighbours.

    • Hi Gunnar, apologies for the delay.

      I think these are both great suggestions. The HTML and JavaScript code is all open source; so if you or anyone you know wants to take a look at making the legend (etc.) minimizable that would be great.

      In the next release, the “dim” option is fixed and provides the option to grayscale non-neighbours (rather than the default of hiding them).

  3. Hi Scott, I really like your date graph example using political borders. I have some data related to internet access which I was looking to plot on this kind of map and you have the solution…I am wondering if and how it might be possible to make a map visualization out of language borders rather than political boarders. I have shape files and I have points with coordinates.
    Thanks.

  4. Hi,
    this plugin is great. thank so much. exactly what gephi needed.
    I’m trying to automate the building of a network for some relational data. so I was asking myself if it was possible to use this in combination with R leaving out gephi. The idea is to write a R-script which automaticly builds the /data.json file. Would this be possible or are there some dependencies I didnt untderstand?
    Another question is if there is a way to search within the node attributes?

    thanks

    • Hi, thank you for your interest. This is absolutely possible. The two things to note:
      1) The network has to be laid out in R/igraph already (i.e. it must have x,y coordinates for each node). The display framework is not actually doing any layout work
      2) It will also be necessary to supply the config.json file. This file has the display configuration options (title, logo, link, legend, etc.) in it. Looking at the examples the format should be self explanatory, but if not feel free to drop a comment/email and I’ll be very happy to help.

      To the second question, this isn’t currently within the framework, but could be added. I’ve raised a ticket in our issues tracker, but can’t promise when it might be addressed by.

    • Hi Griff, I’m glad you’re finding the exporter useful. There are a few settings in the config.json that are yet properly exposed in the UI. At each zoom level, the largest nodes are labeled. This behavior is controlled through “labelThreshold” in the config.js. To show more node labels:
      1) Open the config.json in a normal text editor (notepad, textmate, etc.)
      2) find the section that currently reads “labelThreshold”:10
      3) change this to “labelThreshold”:5
      4) Save the file, upload it, and refresh the graph in your browser

      The exact value in step three will be a bit of experimentation. “labelThreshold”:0 will label every node at every zoom level. A value somewhere between the current value of 10 and 0 should hopefully lead to a nice balance of labeling enough nodes to give a good orientation to the graph without swamping the viewer with too many labels.

      • Thanks for your help! It worked but is there not an option to make it scaled like it is in Gephi? i.e. large fonts for the big nodes and small fonts for the small nodes. Also, in my link, there is a broken image in the top left – what is this meant to be and how can it be fixed? Thanks.

        • No problem. There isn’t an option to make text labels scale at the moment, but this is a great suggestion. It is something I will add to the todo list.

          The broken image is the ‘logo’ specified in the wizard. The easy way to fix this is to simply find the part of config.json that reads:
          “file”:”www.itsfullofstars.net/griffsgraphs/”,
          and remove this completely (including the comma after closing “) or change it to a fully qualified URL to some image (e.g.
          “file”:”http://itsfullofstars.net/griffsgraphs/wp-content/uploads/2012/12/logo2.png”,
          )

  5. I am experimenting with your new plugin and have found it fantastic. My toy model is the simple disease graph but how much more work is it to say:

    My first test here: http://itsfullofstars.net/griffsgraphs/js/disease/index.html#

    *make it borderless
    *make the font size dynamic (currently swamped)

    I’m thinking of really putting some time in to converting all of my graphs to be viewed interactively. I’ve had quite a number of requests to do so and it seems like the natural next step with these graphs. Thanks for your efforts.

    GG

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>