<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Francisco Restivo on Medium]]></title>
        <description><![CDATA[Stories by Francisco Restivo on Medium]]></description>
        <link>https://medium.com/@frestivo?source=rss-4c8b28178809------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KW6vnHmUwkmcGeETySuijg.jpeg</url>
            <title>Stories by Francisco Restivo on Medium</title>
            <link>https://medium.com/@frestivo?source=rss-4c8b28178809------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 18:23:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frestivo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ranking actors]]></title>
            <link>https://medium.com/@frestivo/ranking-actors-d8ba5c2a5ae0?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ba5c2a5ae0</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[rankings]]></category>
            <category><![CDATA[gephi]]></category>
            <category><![CDATA[actors]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Fri, 26 Apr 2024 13:34:20 GMT</pubDate>
            <atom:updated>2024-05-23T23:20:09.757Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ranking Actors</h3><p>I found in Kaggle this <a href="https://www.kaggle.com/datasets/harshitshankhdhar/imdb-dataset-of-top-1000-movies-and-tv-shows/data">dataset</a> of the top 1000 movies by IMDB rating, where the four main actors per movie are listed.</p><p>Since actors participate in different movies with different actors, we may have a large network of co-acting actors, which may reveal interesting information about this industry.</p><p>The dataset has four columns named Star1, Star2, Star3 and Star4, which means that in each line we have six undirected edges Star1-Star2, Star1-Star3, Star1-Star4, Star2-Star3, Star2-Star4 and Star3-Star4.</p><p>Simple re-arranging of the table provides an adjacency list that <a href="https://gephi.org/">Gephi</a> can read straightforwardly.</p><p>As the next figure shows, I found a network of 2709 actors and 5837 different edges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ffB3Sp6knf0ooOzx5k_L8w.png" /><figcaption>Gephi overview panel</figcaption></figure><p>Being interested in ranking actors, we have to decide which metric to use, since different metrics result in different rankings.</p><p>One metric could be the degree, related to the number of movies in which one actor participated, but I feel that the most suitable measure is the eigenvector centrality since it takes into account the quality of the other actors he co-acted with.</p><p>Note that in an undirected network, eigenvector ranking coincides with authority and hub ranking.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AWQnKWoBiFZKXO7NlmWNWw.png" /><figcaption>Gephi data laboratory panel</figcaption></figure><p>Difficult decisions, but number one is either Brad Pitt or Robert De Niro, depending on the centrality measure adopted, and if I had to decide I would vote for Brad Pitt.</p><p>Finally, a nice picture of the full network, with labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CVrwgMaAtjsGwFV5bo1aUg.png" /><figcaption>Top 1000 IMDB actors co-acting network</figcaption></figure><p>Colours mean that actors belong to different clusters, and a lot could be discussed around this topic.</p><p>Please comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ba5c2a5ae0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing family networks]]></title>
            <link>https://medium.com/@frestivo/visualizing-family-networks-5a654ef7c24a?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a654ef7c24a</guid>
            <category><![CDATA[gephi]]></category>
            <category><![CDATA[gedcom]]></category>
            <category><![CDATA[genealogy]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[family]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Fri, 16 Jun 2023 14:10:45 GMT</pubDate>
            <atom:updated>2024-06-05T10:42:22.768Z</atom:updated>
            <content:encoded><![CDATA[<p>A family is a very complex network of people. When two persons decide to live together, they start a family. When a child is born, she belongs to a family.</p><p>A family tree may be immense, unexpected, or surprising. If one family member meets and decides to live together with someone on another continent, the two families join in a single family.</p><p>There are many problems here: how to find information, organize it, and visualize it in a useful way.</p><p>Churches used to keep birth, marriage and death records for everyone after the Council of Trent, held between 1545 and 1563. Before that, only important families used to keep records of their members.</p><p>In each country, many manuscripts are available through dedicated archiving organizations, and one organization in particular, <a href="https://www.familysearch.org/">FamilySearch</a>, provides links to most of those sites, all over the world.</p><p>Manuscripts may be difficult to read, and some attempts at automatic reading have to be considered with care.</p><p>So, there are people, alive or dead, and there are records, and the questions are to relate people in genealogical trees and to attach records to people.</p><p>People usually start by organizing their family tree, using some easy-to-use tool, paper, Excel sheets, or other, and data available in the family.</p><p>The next step uses to be to find a computer program, either to run locally or on the Web.</p><p>I prefer Web platforms, like <a href="https://www.ancestry.com/">Ancestry</a>, <a href="https://www.myheritage.com/">MyHeritage</a>, <a href="https://www.geneanet.org/">Geneanet</a>, or others, and I use all of them since data can be downloaded/uploaded in the <a href="https://en.wikipedia.org/wiki/GEDCOM">GEDCOM</a> format, which was developed by the Church of Jesus Christ of Latter-day Saints as an aid to genealogical research.</p><p>At the moment, I have more than 2000 people in my tree, and to see the full picture becomes more and more difficult.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZESW-U1fiKaJKXGfJLEog.png" /><figcaption>Two of my great-grandparents, and two generations above and below (print screen from Ancestry)</figcaption></figure><p>This representation is very poor and doesn’t provide a view of contemporaneity, or the big picture.</p><p>This was the motivation to look to the GEDCOM format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skQsPSNR3nxUjcNMDFP9sw.png" /><figcaption>This GEDCOM file has 47896 lines</figcaption></figure><p>Without entering into all the details, there are two basic concepts, the individual and the family. The individual can be attached to one or two families, FAMC from Child, and FAMS from Spouse.</p><p>In the picture above, the first individual, me, @12147680407@ is attached to the family created by parents FAMC @F15@ and created a family FAMS @F9@.</p><p>The next individual, my father, created the family @F15@ I am attached, and is attached to the family created by his parents, and so on.</p><p>So, the first challenge was to extract this bipartite network from a GEDCOM file.</p><p>I developed a very short program that does just that, and also the surname associated with each individual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*bp_T_GKtRdtRXeHg8Uk8rg.png" /><figcaption>A very simple Python program</figcaption></figure><p>I used <a href="https://gephi.org/">Gephi</a> for a first look at the data I extracted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vmLKBiUTeb5O3n35fykGQ.png" /><figcaption>A family is a reunion of families</figcaption></figure><p>It was really interesting to have this idea materialised, and this will be the starting point for a lot of work.</p><p>Please comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a654ef7c24a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ranking national football teams]]></title>
            <link>https://medium.com/@frestivo/ranking-of-the-football-national-teams-38a6b3db2cdb?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/38a6b3db2cdb</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[pagerank]]></category>
            <category><![CDATA[football]]></category>
            <category><![CDATA[gephi]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Sat, 26 Nov 2022 12:22:07 GMT</pubDate>
            <atom:updated>2024-05-24T11:20:20.687Z</atom:updated>
            <content:encoded><![CDATA[<p>Football competitions use in general one of two types of classification:</p><p>i) all play against all, twice, one game at home and the other away, points being awarded for winning and for drawing,</p><p>ii) in successive elimination rounds until the last two finalists emerge and dispute the championship title.</p><p>But we may ask how could we put together the results of a number of competitions and find an overall winner.</p><p>I found a dataset which covers <a href="https://data.world/evangower/fifa-world-cup-matches">all World Cup matches</a> from Uruguay in 1930 to Russia in 2018 and decided to look at results as interactions between teams in a large network, considering only no-draw results and edges directed to the winning side.</p><p>There are precisely 900 matches between 81 nations, 701 of them with a winner, and some of the teams met more than once, leaving 560 edges between those 81 nodes, with a weight corresponding to the number of times they met.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n531mZffYHpwg1KH6d-jPw.png" /><figcaption>Network of the 81 national teams</figcaption></figure><p>The country with the most wins is Brazil, with a total of 73, and, using <a href="https://gephi.org/">Gephi</a>, I sorted countries according to PageRank, which is a different measure of the strength of each node, and below I list the top 20.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*G2qmkJqsGConTwR3cqKF5Q.png" /><figcaption>Top 20 national teams ordered by PageRank</figcaption></figure><p>PageRank basically favours wins over highly ranked teams, and looking at this table we note that ranking by the number of wins would produce slightly different results.</p><p>PS: I intend to update this article after Qatar 2022.</p><p>I actually updated this table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*nKiBCsGsBy_UKy8oFnvF8Q.png" /><figcaption>Top 20 national teams ordered by PageRank, after Qatar 2022</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38a6b3db2cdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SARS-CoV-2 in the phase space]]></title>
            <link>https://medium.com/@frestivo/sars-cov-2-in-the-phase-space-5aa1b57668c5?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/5aa1b57668c5</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[sars-cov2]]></category>
            <category><![CDATA[phase-space]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Fri, 16 Sep 2022 10:14:10 GMT</pubDate>
            <atom:updated>2022-09-16T20:19:40.494Z</atom:updated>
            <content:encoded><![CDATA[<h4>A two-dimensions view of a complex phenomenon</h4><p>SARS-CoV-2 has generated a considerable amount of visualizations, usually in the time domain.</p><p>When we have information daily — cases, deaths, hospitalizations, vaccination, and so on — people are usually given simple visualizations such as this one, where all published numbers of cases and deaths and their 7-day moving averages are displayed (all data refers to Portugal):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*GxGjdwaMUmTiSPV04XkFxw.png" /><figcaption>Portugal&#39;s daily numbers and moving averages from day 1</figcaption></figure><p>Above, we understand that there were two very serious periods, winter 2021, with a large number of deaths and winter 2022, with a large number of cases, but fewer deaths, thanks to the vaccination campaign, we hope.</p><p>In dynamical system theory, a <a href="https://en.wikipedia.org/wiki/Phase_space"><strong>phase space</strong></a> is a space in which all possible states of a system are represented, with each possible state corresponding to one unique point in the phase space. For mechanical systems, the phase space usually consists of all possible values of position and momentum (or velocity).</p><p>Here, we associate the number of cases to position and the number of deaths to momentum, and display exactly the previous data as trajectories in the (cases, deaths) plane, both daily and 7-day moving average:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*no-vgS40aqTjPDyPlQBwGg.png" /><figcaption>(cases, deaths) trajectories</figcaption></figure><p>Curiously, now is more clear how winter 2021 and 2022 were so different.</p><p>In the next images, we removed the daily values and used colours to mark the three calendar years to which data refers, and made a zoom into the lower left area of the full trajectories, which is where we are now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*ro4I6-EzeUW9iG54kbrGrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*cK-U3OP-OWQWQAwJfMFzCw.png" /><figcaption>10% by 10% zoom of the previous image</figcaption></figure><p>It is interesting to notice that these trajectories are of different sizes but all are travelled in an anti-clockwise direction, that is, deaths come after cases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5aa1b57668c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Football transfer market]]></title>
            <link>https://medium.com/@frestivo/football-transfer-market-2b4d1c7eabcc?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b4d1c7eabcc</guid>
            <category><![CDATA[football]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[transfers]]></category>
            <category><![CDATA[gephi]]></category>
            <category><![CDATA[market]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Wed, 07 Sep 2022 01:09:52 GMT</pubDate>
            <atom:updated>2022-09-13T22:11:39.635Z</atom:updated>
            <content:encoded><![CDATA[<h4>How much money do football clubs pay/receive in the transfer market</h4><p>Every year, millions and millions are paid to player owners, where rich clubs pay enormous amounts of money and less affluent clubs receive smaller amounts in exchange for players they have schooled.</p><p>We found in Kaggle an interesting dataset registering the <a href="https://www.kaggle.com/code/slehkyi/football-transfers-2000-2018/data">top 250 transfers in the football world each year</a> from 2000/01 to 2018/19, which we explored to gain some insight:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9e1w2ZKNJuW7Z1smhNyXLg.png" /><figcaption>There are a total of 4700 lines, each one corresponding to one transfer operation</figcaption></figure><p>We are interested in operations between clubs, so we decided to study the network of clubs related by transfer operations between them, the weights of the edges being the sum of the fees paid by one team to the other.</p><p>We renamed columns (Team_from, Team_to, Transfer_fee) as (Source, Target, Weight) and imported just these three columns to <a href="https://gephi.org/">Gephi</a>, after converting the fees to M€, and using the strategy of merging parallel edges by summing their weights:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYhafShtYDkpvdJrUKZXIQ.png" /><figcaption>Edges merging strategy: Sum</figcaption></figure><p>We end up with 615 clubs and 3710 edges between them, the “missing” edges being related to repetead operations between the same clubs.</p><p>We computed weighted degrees and modulatity classes before trying any layout, just to have a picture of the situation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddnb7r0aZrLzZxDog8OK-w.png" /><figcaption>Weighted in-degree, the volume of acquisitions</figcaption></figure><p>Sorting by weighted in-degree, we can easily find the 20 clubs which spend more money:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPinEDau0rJaThZOCSqpgA.png" /><figcaption>20 clubs which spent more money</figcaption></figure><p>and sorting by weighted out-degree, we can find the 20 teams which made more sales:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-G0FfoTOrVHPXY-G2Kvfw.png" /><figcaption>20 clubs which made more sales</figcaption></figure><p>It is very easy to find the 20 clubs with most positive balance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*1IuX-YdYuG8YrX6IUJzM1w.png" /><figcaption>20 teams with most positive balance</figcaption></figure><p>and the clubs with most negative balance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*toozxBE344SwYGhgZM7VPg.png" /><figcaption>20 clubs with most negative balance</figcaption></figure><p>This is not a financial study, but simply a picture of how much money circulates between clubs just for players buying/selling. Ticket sales, TV rights, publicity, sales for fans, etc. and on the other salaries, prizes, commissions, maintenance of installations, and so on, are not considered.</p><p>But it shows clearly how different different leagues are.</p><p>Fanally, a partial view of the network, where some organization by national leagues may be guessed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DSZsLvhdwZwj6-rth2L7FQ.png" /><figcaption>Partial view of the clubs network</figcaption></figure><p>Please comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b4d1c7eabcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Airport networks]]></title>
            <link>https://medium.com/@frestivo/airport-networks-cb59f83a31ac?source=rss-4c8b28178809------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb59f83a31ac</guid>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[airports]]></category>
            <category><![CDATA[gephi]]></category>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[network]]></category>
            <dc:creator><![CDATA[Francisco Restivo]]></dc:creator>
            <pubDate>Wed, 31 Aug 2022 14:30:27 GMT</pubDate>
            <atom:updated>2022-08-31T14:30:27.628Z</atom:updated>
            <content:encoded><![CDATA[<h4>Looking at world airports globally</h4><p>More and more people are starting to formulate problems in terms of networks.</p><p>In networks, we may translate our problems into distances, paths, neighbourhoods, communities, growth, stability, and so on, and use network analysis to find answers to those problems.</p><p>Networks are made of vertices (nodes, actors) and edges (connections, relations, interactions), eventually with their own attributes.</p><p>Vertices can be social, economic, or biological actors, scientific articles, or authors, or social networks users, or even hashtags, and edges can be import/export, article citation, follow an user, share user contents, whatever.</p><p>Network science is a discipline on its own and the Barabási Network Science <a href="https://www.barabasilab.com/science">book and site</a> are strongly recommended to those interested in.</p><p>Here, we look at a particular network, where actors are international airports and the connections mark the existence of regular air routes between them, in order to evaluate the potential of some tools and measures.</p><p>The <a href="https://www.bts.gov/">Bureau of Transportation Statistics</a> publishes a variety of data for air companies serving the US airports, which have been subject to an interesting stydy, <a href="https://towardsdatascience.com/graphs-101-airline-transportation-network-5548739fd22e">Graphs 101: Airline Transportation Network, A hands-on overview with a real world dataset, by Bruno Gonçalves</a>.</p><p>A quick look at Kaggle.com brought to our attention an interesting <a href="https://www.kaggle.com/datasets/moonnectar/airline-routes-92k-and-airports-10k-dataset">Airline Routes (92k+) and Airports (9k+) Dataset</a>, which we decided do use here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*3loual1NBfst1kdn3Kz_8w.png" /><figcaption>Description of the two csv files</figcaption></figure><p>We downloaded and had a first look at the unique routes file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*6tpeGZJ4Qq4amXLe6b0FTg.png" /><figcaption>Headers and 1st ten lines of table</figcaption></figure><p>If we simply rename (Departure, Destination) as (Source, Target) this file is ready to be imported to <a href="https://gephi.org/">Gephi</a>, a simple, open tool for network analysis and visualization:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jyaO_jtozcsk-RuZXdRZiA.png" /><figcaption>Gephi doesn’t support parallel edges</figcaption></figure><p>After merging parallel edges, there were 50321 distinct edges remaining, and here we show the 4000 nodes randomly distributed in the Gephi Overview tab, after some simple preprocessing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MLfrWAIHxWZrAEh6j5tEeA.png" /><figcaption>Node size is weighted out-degree and node colour is modularity class</figcaption></figure><p>Here we used weighted out-degree, which is the total number of routes departing from one airport, different airlines counting as different routes.</p><p>Next, we used one filter to hide airports with less than 100 departing routes, played with layouts and colour palettes, and finally got a nice picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HA6ExBZXxarKdPB9BRbdcQ.png" /><figcaption>236 airports with at least 100 departing routes</figcaption></figure><p>and exported the final preview</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oo_SHM7tXTw-XJVjIu9FbA.png" /></figure><p>where airports appear magically organized by geography.</p><p>Please comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb59f83a31ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>