Cette page appartient aux archives web de l'EPFL et n'est plus tenue à jour.
This page belongs to EPFL's web archive and is no longer updated.

Counter for tumblr
Website Stats

Visualise US LCI database in R

This is an example code to visulize US LCI database in R


g1 <- graph.adjacency(B ,mode='undirected',diag=FALSE

V(g1)$label<-lp1  # set lp1 (degree of freedom) is  frequency of a process being used as input

V(g1)$label.color <- rgb(0, 0, .2, .8) # set color scheme

V(g1)$size=k*0.3  # change node size 

V(g1)$label.cex <- 1*V(g1)$size / max(V(g1)$size)+ .2  # change text size 

#split screen

split.screen(c(2,1))-> ind

#screen( ind[2])

#plot(g1,vertex.label=NA, layout=layout.auto)

screen( ind[2])

plot(g1,vertex.label=lp1, layout=layout.reingold.tilford)

plot(g1,vertex.label=NA, layout=layout.random)

For dynamic visualization, check out a network visualization (force-directed graph) of the 2012 industry-by-industry US Input-Output Table (15 sectors) provided by BEA.


Posted by Xun Liao on Tuesday 25 August 2015 at 14:54