Gephi Advanced Functions

download Gephi Advanced Functions

of 19

Transcript of Gephi Advanced Functions

  • 8/18/2019 Gephi Advanced Functions

    1/19

    Gephi – advanced functions

    Filters, metrics and plugins

    V 1.1 – Jan. 2014

    Clément Levallois

    Gephi Support Team and Assist. Prof @EMLyon Business School

    1

  • 8/18/2019 Gephi Advanced Functions

    2/19

    Clement Levallois

    Bio notes

    • Education in economics, management, history of science (Ph.D.)

    • Turned to digital methods for research.

     –  data visualization, network analysis, natural language processing, web

    applications and more.

     –  Member of the “Gephi Community Support” team

     –  Gephi certified trainer

    https://marketplace.gephi.org/service/data-analysis/  

    • Contact, feedback welcome: on twitter @seinecle or

    www.clementlevallois.net 

    https://marketplace.gephi.org/service/data-analysis/http://www.clementlevallois.net/http://www.clementlevallois.net/https://marketplace.gephi.org/service/data-analysis/https://marketplace.gephi.org/service/data-analysis/https://marketplace.gephi.org/service/data-analysis/https://marketplace.gephi.org/service/data-analysis/

  • 8/18/2019 Gephi Advanced Functions

    3/19

    FILTERS

    3

  • 8/18/2019 Gephi Advanced Functions

    4/19

    Clement Levallois

    Filters – for what goal?

    1. Basic function: to hide away a part of the

    network

    2. Advanced use: allow to hide away a part of

    the network, apply specific parameters to the

    remaining visible part, and then show the full

    network – hence with a differentiated aspect

    4

  • 8/18/2019 Gephi Advanced Functions

    5/19

    Clement Levallois

    1. Basic use of filters

    1. Select a filter in the « catalogue »(Example: « degree range »)

    2. Drag and drop the filter in the lowerpart of the filter panel

    3. Open its parameters, play withvalues

    4. Click on « Filter » to actually filter

    5. Options are made available to save/ export / change labels of thefiltered graph.

    5

  • 8/18/2019 Gephi Advanced Functions

    6/19

    Clement Levallois

    2. Advanced:

    modify parameters of the viz

    1. Open « Les Misérables.gexf »

    2. Select the filter « Modularity class » et drag and drop it. Select a color to filterin. Apply the filter.

    Filter can be found here: Library -> Attributes -> Partition

    3. In the main window, right click on the icon to change node color. Change thedefault color, confirm. Left click on the same icon to apply this new defaultcolor.

    4. Stop the filtering by clicking on « Filter » again. Observe how your change ofnode color has left intact the color of the nodes that had been filtered out.

    Our objective: change the color of a particular group of nodes only

    Note: any other operation could have been applied (on size, labels, but also on

    metrics).

    6

  • 8/18/2019 Gephi Advanced Functions

    7/19Clement Levallois

    Combine several filters

    • « Chained » filters: –  Drag and drop filters by placing them nested inside each

    other.

     –  The most « inner » filter will be applied first, then the onesurrounding it, etc.

     –  Frequent use case: nest the filter we are interested ininside a « degree range » filter, of which we set the valuesto exclude the zero value. Has for effect to hide away thenodes which are isolated (no neighbor) after applying thefirst filter.

    • Filter UNION : –  Drag and drop the « UNION » filter

     –  Insert the filters to apply inside it, without nesting theminside each other.

    Filter « INTERSECTION »: contradictory report on itfunctioning or not.

    • Dynamique filter –  This filter is created automatically by Gephi when the

    timeline is activated (don’t try to apply it yourself anually).

     –  Filters to apply to a dynamic graph sould be dragged anddropped, with the dynamic filer always nest at the mostinner level of the filters applied..

    Most « inward » filter,

    will be applied first

    Most « outwardly » filter,

    will be applied last

    7

  • 8/18/2019 Gephi Advanced Functions

    8/19

    METRICS (STATISTICS)

    8

  • 8/18/2019 Gephi Advanced Functions

    9/19Clement Levallois

    Principle

    • Most used algorithms in descriptive statistics fornetworks are implemented in Gephi

    • Caution: Gephi does not specialize in the complete set

    of statistics, and has no modelling capacity (it couldchange! Who want to write a plugin?) –  See Pajek or UCINET instead.

    •How is Gephi special on statistics: the statistics can beeasily visualized on the network, instead of a table ofnumbers.

    9

  • 8/18/2019 Gephi Advanced Functions

    10/19

    Clement Levallois

    Example

    calculus of betweenness centrality

    • Preliminary note:

     –  A « shortest path » is the shortest way to go from one

    node to another. Here the shortest path between A

    and C is A-B-C.

    • A node has a strong « betweenness centrality » if:

     –  It is situated on many shortest paths

    A

    B C

    D E

    10

  • 8/18/2019 Gephi Advanced Functions

    11/19

    Clement Levallois

    How to run / use a metrics

    1. Run it

    2. Check and close the report

    3. One or several columns have been added to the datalab. –  This columns contain the value for the metrics, specific for

    each node.

     –  This means that the result of the metrics has been recorded –one can export it and work on it outside of Gephi if needs be.

    4. This values can be seen on the graph! –  Apply a ranking on node size to see which ones are central

    11

  • 8/18/2019 Gephi Advanced Functions

    12/19

    Clement Levallois

    Normalize or not?

    • It is sometimes an option to « normalize » a metrics. This is becausemetrics can create values with units that are not easy to grasp: (mynode has a score of « 455 » on this metrics: huge or not?).

    • To normalize consists in converting values from 0 to 1. Hence, it is

    easier to evaluate whether this or that value is close to theminimum value or to the maximum value.

    • Example for betweenness centrality: a normalized value of 0 meansthat the node is situated on no shortest path, a value of 1 means

    the node lies on all shortest paths. –  A non normalized value would show for each node how many

    shortests paths they lie unto – which is hard to judge.

    12

  • 8/18/2019 Gephi Advanced Functions

    13/19

    Clement Levallois

    Directed or not? It matters

    GE

    DF

    Let’s Imagine a network of “who follows whom”

    onTwitter

    If we are interested in who has most followers, we

    should look at the node receiving most links. That’s

    node E.

    The number of inbound links is called in-Degree. It can be computed in

    Gephi with the “Degree” metrics.

    Legend:

    - centrality +

    A

    C

    B

    GE

    DF

    A

    CB

    1: directed network

    2: same network, but undirectedNow let’s imagine the same network, but imported in

    Gephi as an undirected network (meaning that the

    directionality of edges is of no interest).

    The node with most edges (with the highest “degree”)

    is D (4 connections), not E (just 2 connections).

    Conclusion: in general, metrics return different results

    depending on whether the network is considered

    directed or not. The interpretation can be completely

    erroneous if one does not take care of this.

    13

  • 8/18/2019 Gephi Advanced Functions

    14/19

    Clement Levallois

    Which centrality measure? It matters!

    Ref: http://en.wikipedia.org/wiki/File:Centrality.svg 

    A: degree centrality = local connectivity  

    => nodes with lots of neighbors are central

    B: closeness centrality = geographic centrality

    => Nodes at the geographic center are central

    C: betweenness centrality = transit centrality

    => Nodes where a lot of transit can happen are

    central(careful: does not mean transit actually takes place. See Scott Weingart’s

    blog post on this)

    D: Eigenvector centrality = authority=> Nodes connected to central nodes are central

    themselves (recursive approach).Légende:

    - centrality +

    14

    http://en.wikipedia.org/wiki/File:Centrality.svghttp://en.wikipedia.org/wiki/File:Centrality.svg

  • 8/18/2019 Gephi Advanced Functions

    15/19

    PLUGINS

    15

  • 8/18/2019 Gephi Advanced Functions

    16/19

    Clement Levallois

    Plugins: what for?

    • A plugin brings a functionality which is originally absent from Gephi

    • Once installed, a plugin is totally integrated in Gephi (but it can be uninstalledanytime, of course)

    It exists around 50 plugins today, new plugins are publishedregularly.

    • Do we really need them? –  Yes! As soon as one works in Gephi for a project, one realizes quickly

    that this or that functionality would have been a life saver.

     –  Plugins add these missing functionalities to Gephi: thanks to plugins,Gephi can be extended infinitely.

    16

  • 8/18/2019 Gephi Advanced Functions

    17/19

    Clement Levallois

    Plugins: to insist

    • Plugins are an essential part of a software solution.

    • It is far from trivial to create a system where pluginscan be authored, distributed, installed and used

    reliably.

    • Gephi did it! –  Plugins easy to create (in Java)

     –  Distributed and installed directly from inside Gephi (justneed an Internet connection for the download).

    17

  • 8/18/2019 Gephi Advanced Functions

    18/19

    Clement Levallois

    Where to find plugins?

    • In Gephi: –  Tools -> Plugins -> Available plugins

     –  Select a plugin then follow the wizard

    • On the Gephi Marketplace: –  https://marketplace.gephi.org/ 

     –  The Gephi marketplace lists all plugins in detail and give the possibilityto download and install them manually.

     –  But it remains easier to visit the marketplace website to learn about aplugin, then to go back to Gephi to install it directly (as describedabove)

    18

    https://marketplace.gephi.org/https://marketplace.gephi.org/

  • 8/18/2019 Gephi Advanced Functions

    19/19

    Clement Levallois

    Some very useful plugins(very subjective selection!)

    Plugins Fonction

    SigmaJS exporter, SeaDragon Web Export,

    Gexf-JS Web Viewer

    3 plugins to export a Gephi network viz

    into a web page.

    Excel / csv converter to network To import non network data, in Excel or

    csv format. The plugin creates a network

    and imports it directly into Gephi

    GeoLayout, Map of countries 2 plugins to visualize geospatial data (GIS

    like).

    19