Package d3net provides visualisation for networks, by creating a Shiny application with interactive SVG graph.

D3.js properties

The graph is being generated based on R object data using JavaScript library D3.js. For more information, visit page: d3js.org. Application is using force-directed layout for the graph. It's properties can be changed using the controls in section d3 properties.

Available properties are:

More information on force-directed layout: Force Layout

R properties

Network objects does not only contain data regarding nodes and edges, but also regarding their properties. D3net application reads the available properties and enables to reflect them on the graph.

Those graph elements can reflect object properties:

igraph and network objects visualisation

Static network object are visualised with the properties described above.

You can change d3 and R properties, zoom the graph and drag the nodes. To see all the details on the tooltip, simply move your mouse over the node.

networkDynamic objects visualisation

Comparing to static networks, dynamic network visualisation has few extra controls. In d3 properties there's time interval control, by default set to 3000ms. It states how fast does the timepoint last during animation.

Animating the graph is available through the controls below the graph. Control buttons enable to play, pause or replay the animation, user can also move the slider's thumb to change the timepoint.

Large networks

For visualisations with large number of vertices, predefined nodes size can be pretty small. For this reason, there is a zooming control that enables changing the scale as well as moving the whole graph in every direction.

As zooming gestures may be interferring with the dragging, it's not possible to drag the nodes when zooming is on.

Examples

To launch examples, use the example datasets provided for each object type.

igraph

library(igraphdata)
data(karate)
d3net(karate)

network

library(network)
data(flo)
#create network object from sample data
nflo <- network(flo, directed = FALSE)
d3net(nflo)

networkDynamic

library(networkDynamicData)
data(harry_potter_support)
d3net(harry_potter_support)


mbojan/d3net documentation built on May 22, 2019, 12:21 p.m.