-
Notifications
You must be signed in to change notification settings - Fork 0
/
lets-play-gephi-understand-degree-weighted-degree-and-betweeness-centrality.html
18 lines (17 loc) · 16.3 KB
/
lets-play-gephi-understand-degree-weighted-degree-and-betweeness-centrality.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Let's Play Gephi : Understand Degree, Weighted Degree & Betweeness centrality - Toto do stuff</title><meta name="description" content="Hello everybody, Today I'll try to explain some classic notion when you are looking at your graph. The Degree and Weighted Degree are quite simple…"><meta name="generator" content="Publii Open-Source CMS for Static Site"><link rel="canonical" href="https://totetmatt.github.io/lets-play-gephi-understand-degree-weighted-degree-and-betweeness-centrality.html"><link rel="alternate" type="application/atom+xml" href="https://totetmatt.github.io/feed.xml"><link rel="alternate" type="application/json" href="https://totetmatt.github.io/feed.json"><meta property="og:title" content="Let's Play Gephi : Understand Degree, Weighted Degree & Betweeness centrality"><meta property="og:image" content="https://totetmatt.github.io/media/posts/20/World.Betweeness.png"><meta property="og:site_name" content="Toto do stuff"><meta property="og:description" content="Hello everybody, Today I'll try to explain some classic notion when you are looking at your graph. The Degree and Weighted Degree are quite simple…"><meta property="og:url" content="https://totetmatt.github.io/lets-play-gephi-understand-degree-weighted-degree-and-betweeness-centrality.html"><meta property="og:type" content="article"><style>:root{--body-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--heading-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--logo-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--menu-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}</style><link rel="stylesheet" href="https://totetmatt.github.io/assets/css/style.css?v=825c89ac06c7215b642eda05e8a14751"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://totetmatt.github.io/lets-play-gephi-understand-degree-weighted-degree-and-betweeness-centrality.html"},"headline":"Let's Play Gephi : Understand Degree, Weighted Degree & Betweeness centrality","datePublished":"2013-12-16T13:40","dateModified":"2020-06-20T00:35","image":{"@type":"ImageObject","url":"https://totetmatt.github.io/media/posts/20/World.Betweeness.png","height":1024,"width":1024},"description":"Hello everybody, Today I'll try to explain some classic notion when you are looking at your graph. The Degree and Weighted Degree are quite simple…","author":{"@type":"Person","name":"Totetmatt","url":"https://totetmatt.github.io/authors/totetmatt/"},"publisher":{"@type":"Organization","name":"Totetmatt"}}</script></head><body><div class="site-container"><header class="top" id="js-header"><a class="logo" href="https://totetmatt.github.io/">Toto do stuff</a></header><main><article class="post"><div class="hero"><figure class="hero__image hero__image--overlay"><img src="https://totetmatt.github.io/media/posts/20/World.Betweeness.png" srcset="https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-xs.png 300w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-sm.png 480w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-md.png 768w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-lg.png 1024w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-xl.png 1360w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-2xl.png 1600w" sizes="(max-width: 1600px) 100vw, 1600px" loading="eager" height="1024" width="1024" alt=""></figure><header class="hero__content"><div class="wrapper"><div class="post__meta"><time datetime="2013-12-16T13:40">13/12/16</time></div><h1>Let's Play Gephi : Understand Degree, Weighted Degree & Betweeness centrality</h1><div class="post__meta post__meta--author"><a href="https://totetmatt.github.io/authors/totetmatt/" class="feed__author invert">Totetmatt</a></div></div></header></div><div class="wrapper post__entry"><p>Hello everybody,</p><p>Today I'll try to explain some classic notion when you are looking at your graph. <strong>The Degree</strong> and <strong>Weighted Degree</strong> are quite simple to understand and it's almost the base of graph analysis. <strong>Betweeness centrality</strong> ask for some mind focus to understand, but when explain with an expressive example, it's straightforward !</p><h1>The Dataset</h1><p>I'll take the relation of countries by borders. It's very simple and concrete to understand, it changes from the traditionnal "social network" and the data set is various enought to see clearly the concept we want to study.</p><p>Of course, I encourage and propose you to use the gexf file to do it and explore by yourself :D. [ <a href="http://matthieu-totet.fr/World.Border.gexf">Gexf file</a> ]</p><p>Here is the cartography with only a little layout display. We didn't touch yet the size of the nodes.</p><figure class="alignnone size-full wp-image-271"><a href="https://totetmatt.github.io/media/posts/20/World.Nothing.png"><img loading="lazy" src="https://totetmatt.github.io/media/posts/20/World.Nothing.png" sizes="(max-width: 48em) 100vw, 768px" srcset="https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-xs.png 300w, https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-sm.png 480w, https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-md.png 768w, https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-lg.png 1024w, https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-xl.png 1360w, https://totetmatt.github.io/media/posts/20/responsive/World.Nothing-2xl.png 1600w" alt="World.Nothing" width="1024" height="1024"></a></figure><p></p><h1>Degree : G**ph me I'm famous.</h1><p>The degree of a node is the number of relation (edge) it has, independantly if it's a<strong> in</strong> or a <strong>out</strong> relation. It's the sum of edges for a node. It's very simple notion to understand.</p><p>We don't have a <strong>InDegree</strong> and <strong>OutDegree</strong> in our graph, it's because we have an Undirected graph. Theses statistics are exactly the same as <strong>Degree</strong>, but "In" count only <strong>incomming</strong> edges and "Out" count only <strong>outgoing</strong> edges.</p><p>To display node size per degree : <strong>Ranking >> Nodes >> Choose a Rank Parameter Degree </strong>and<strong> click "Apply"</strong></p><figure class="alignnone size-full wp-image-270"><a href="https://totetmatt.github.io/media/posts/20/World.Degree.png"><img loading="lazy" src="https://totetmatt.github.io/media/posts/20/World.Degree.png" sizes="(max-width: 48em) 100vw, 768px" srcset="https://totetmatt.github.io/media/posts/20/responsive/World.Degree-xs.png 300w, https://totetmatt.github.io/media/posts/20/responsive/World.Degree-sm.png 480w, https://totetmatt.github.io/media/posts/20/responsive/World.Degree-md.png 768w, https://totetmatt.github.io/media/posts/20/responsive/World.Degree-lg.png 1024w, https://totetmatt.github.io/media/posts/20/responsive/World.Degree-xl.png 1360w, https://totetmatt.github.io/media/posts/20/responsive/World.Degree-2xl.png 1600w" alt="World.Degree" width="1024" height="1024"></a></figure><p></p><p><strong>What does it mean here ?</strong></p><p>A relation (edge) is a border between 2 countries, so if a country has a high degree, it means it has a lot of countries as neighbours.</p><p>In the cartography above, we see that Russia and China are very big, it's because they have a lot of neighbour countries, 14 to be precise.</p><h1>Weighted Degree : Bigger is better</h1><p>The weighted degree of a node is like the degree. It's based on the number of edge for a node, but ponderated by the weigtht of each edge. It's doing the sum of the weight of the edges.<br>For example, a node with 4 edges that weight 1 (1+1+1+1=4) is equivalent to:</p><ul><li>a node with 2 edges that weight 2 (2+2=4) or</li><li>a node with 2 edges that weight 1 and 1 edge that weight 2 (1+1+2=4) or</li><li>a node with 1 edge that weight 4 etc...</li></ul><p>The weighted degree has to be computed before, go to <strong>Statistics >> Avg. Weighted Degree >> Run. </strong>After a quick time, you will have the computation result and you will be able to do <strong>Ranking >> Nodes >> Choose a Rank Parameter Degree >> Weighted Degree </strong>and<strong><strong> click "Apply"</strong></strong></p><figure class="alignnone size-full wp-image-272"><a href="https://totetmatt.github.io/media/posts/20/World.weightedDegree.png"><img loading="lazy" src="https://totetmatt.github.io/media/posts/20/World.weightedDegree.png" sizes="(max-width: 48em) 100vw, 768px" srcset="https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-xs.png 300w, https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-sm.png 480w, https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-md.png 768w, https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-lg.png 1024w, https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-xl.png 1360w, https://totetmatt.github.io/media/posts/20/responsive/World.weightedDegree-2xl.png 1600w" alt="World.weightedDegree" width="1024" height="1024"></a></figure><p></p><p><strong>What does it mean here ?</strong></p><p>You might have noticed that some edges are bigger than others, it's because in the data collected, the edge's weight represent the border length in kilometers. So the weighted degree here is equivalent to the total number of border's kilometer for a country.</p><p>Here again Russia and China are big because they have large borders. But if you compare with the previous cartography, you see that all the European country were big before but are now very little. It's because theses countries have very small borders.</p><h1>Betweenness centrality : Master of Puppet</h1><p>To visualise the concept, you take all the shortest path from all nodes to all nodes on your graph. In each path, if one node is traveled, you add him "one point". When all the paths are done, you have a ranking where some nodes are traveled a lot and some a few (almost never). This describes the Betweeness centrality; if a node have a high number, it has a high betweenness centrality.</p><p>If you are navigating onto the graph,you will most probably traveled nodes that have a high Betweeness. And if you remove theses nodes first, there is a high probability to cut your graph into multiple unconnected components.</p><p>The betweeness centrality has to be computed before, go to <strong>Statistics >> Network Diameter >> Run. </strong>After a quick time, you will have the computation result and you will be able to do <strong>Ranking >> Nodes >> Choose a Rank Parameter Degree >> Betweeness Centrality </strong>and <strong><strong>click "Apply"</strong><br></strong></p><figure class="alignnone size-full wp-image-269"><a href="https://totetmatt.github.io/media/posts/20/World.Betweeness.png"><img loading="lazy" src="https://totetmatt.github.io/media/posts/20/World.Betweeness.png" sizes="(max-width: 48em) 100vw, 768px" srcset="https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-xs.png 300w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-sm.png 480w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-md.png 768w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-lg.png 1024w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-xl.png 1360w, https://totetmatt.github.io/media/posts/20/responsive/World.Betweeness-2xl.png 1600w" alt="World.Betweeness" width="1024" height="1024"></a></figure><p></p><p><strong>What does it mean here ?</strong></p><p>The betweeness centrality here means that, if you want to go from one country to another, you will most probably have to travel across the big nodes. What you can see is that there is a ring of countries that are very "central" because they are linking (indirectly) almost all the countries in the world.</p><p>And if you look at France case, it has the highest betweeness centrality. Why ? It's mainly due to the fact that it's the only country that's doing the link between americas and rest of the world.</p><p>Here it is ! I hope I was clear in my explaination and you enjoyed this tutorial.</p></div><footer class="wrapper post__footer"><p class="post__last-updated">This article was updated on 20/06/20</p><div class="post__share"></div><div class="post__bio bio"><div class="bio__info"><h3 class="bio__name"><a href="https://totetmatt.github.io/authors/totetmatt/" class="invert" rel="author">Totetmatt</a></h3></div></div></footer></article><nav class="post__nav"><div class="post__nav-inner"><div class="post__nav-prev"><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://totetmatt.github.io/assets/svg/svg-map.svg#arrow-prev"/></svg> <a href="https://totetmatt.github.io/gephi-and-the-streaming-module.html" class="invert post__nav-link" rel="prev"><span>Previous</span> Gephi and the Streaming module</a></div><div class="post__nav-next"><a href="https://totetmatt.github.io/lets-play-gephi-bitcoin-transactions.html" class="invert post__nav-link" rel="next"><span>Next</span> Let's Play Gephi : Bitcoin Transactions </a><svg width="1.041em" height="0.416em" aria-hidden="true"><use xlink:href="https://totetmatt.github.io/assets/svg/svg-map.svg#arrow-next"/></svg></div></div></nav><div class="post__related related"><div class="wrapper"><h2 class="h5 related__title">You should also read:</h2><article class="related__item"><div class="feed__meta"><time datetime="2015-08-28T23:05" class="feed__date">15/08/28</time></div><h3 class="h1"><a href="https://totetmatt.github.io/java-7-for-gephi-brief-how-to.html" class="invert">Java 7 for Gephi - Brief How To</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2015-09-06T22:47" class="feed__date">15/09/06</time></div><h3 class="h1"><a href="https://totetmatt.github.io/lets-play-gephi-dbpedia-rdf-sparql-and-your-favorite-actors.html" class="invert">Let's Play Gephi : Dbpedia, RDF, Sparql and your favorite Actors</a></h3></article><article class="related__item"><div class="feed__meta"><time datetime="2014-06-15T09:55" class="feed__date">14/06/15</time></div><h3 class="h1"><a href="https://totetmatt.github.io/lets-play-gephi-streaming-api-the-hidden-websocket.html" class="invert">Let's Play Gephi : Streaming API - The 'hidden' Websocket</a></h3></article></div></div></main><footer class="footer"><div class="footer__copyright"><p>Powered by <a href="https://getpublii.com" target="_blank" rel="nofollow noopener">Publii Static CMS</a></p></div><button class="footer__bttop js-footer__bttop" aria-label="Back to top"><svg><title>Back to top</title><use xlink:href="https://totetmatt.github.io/assets/svg/svg-map.svg#toparrow"/></svg></button></footer></div><script>window.publiiThemeMenuConfig = {
mobileMenuMode: 'sidebar',
animationSpeed: 300,
submenuWidth: 'auto',
doubleClickTime: 500,
mobileMenuExpandableSubmenus: true,
relatedContainerForOverlayMenuSelector: '.top',
};</script><script defer="defer" src="https://totetmatt.github.io/assets/js/scripts.min.js?v=f4c4d35432d0e17d212f2fae4e0f8247"></script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script></body></html>