top of page

How to visualize dynamic network

Recently, I had to visualize dynamic network. More specifically, I had to visualize social contagion (crowdfunding participation) over a social network. I would like to share may experience how to visualize the dynamic network.

I employ animations to incorporate dynamic characteristic into my plot. Basically, I have two options: GIF or HTML. HTML can provide interactive plot, whereas GIF is more easy to be embedded to any environment. Thus, I produce a GIF which dynamically shows the social contagion over network.

Each node represents an individual under a crowdfunding platform. Each edge stands for co-investor relationship between two individuals. Specifically, if two individuals share at least one project in their investment portfolio, then they are connected constituting a co-investor network. The white colored nodes are non-investors, whereas the red colored nodes are investors. Also, the darker the color, the more investment.

The idea of producing GIF is simple. Draw various plots and then combine them. Here are some details.


library(igraph) library(network) library(sna) library(ndtv) library(networkD3) library(animation)

Color Palette

palf = colorRampPalette(c("white", "dark red")) col_list = palf(10)

Network Information Load net2 =, nodes, directed=F) net2 = simplify(net2, remove.multiple = T, remove.loops = T) l = layout.random(net2)

Plot Figures and Combine


t=0 net <-[0,], nodes, directed=F) col <- rep("white", vcount(net)) plot(net, vertex.color=col, layout=l,vertex.label=rownames(nodes),edge.color="grey40")

for(t in 1:ntobs){ net <-[links$time==(t),], nodes, directed=F) net <- simplify(net, remove.multiple = T, remove.loops = T) col <- col_list[temp_cum_nodes[,t]+1] plot(net, vertex.color=col, layout=l,vertex.label=rownames(nodes),edge.color="grey40") } },interval = 0.5,"network_animation_50.gif" )


bottom of page