Network Visualization - R code - Which Package is needed?


I'm trying to create a network visualization to study the flights to and from a certain airport.

My data consists of 123000 rows in this format:

Origin_ID    Destination_ID    Frequency
  1726            3504           40000
  3504            4517              40
  5616            7205              38

I'm trying to create a image similar to this:

enter image description here

Basically, I want to be able to see the strength of the relationship (based on the frequency) and identify which combinations are most common in that airport.

Can it be created in R using this format? Or do you suggest any other open source platform to create this visualization?

Pedro Alves

Posted 2016-11-30T11:26:35.583

Reputation: 347

The igraph package, or the network package. library(igraph); igraphdemo("cohesive") – knb – 2016-11-30T15:54:04.923

Igraph in R will help you out with this problem. Below link might help you.

– Chintak – 2016-12-03T10:45:04.017

perfect :) exactly what I want :) – Pedro Alves – 2016-12-04T02:11:33.780



The visNetwork R package is the best I've worked with. It renders with the vis.js Javascript package right in your RStudio window. Nodes and edge visualization is fully customizable and may be data-driven. They implement click-functionality on your graphs, so you can rearrange them or highlight a node and its neighbors. I've found people really enjoy this in presentations, and the highlight functionality is great for making static PowerPoint presentations or figures.


Posted 2016-11-30T11:26:35.583

Reputation: 754