Closed tvelden closed 12 years ago
I sent you sample files, let me know if the graphs are OK
As just discussed, we want to do the graphs for unweighted edges. Yet, another thing: how about including the parameters that you get from
res=lm(log10(f2ne$nodes)~log10(f2ne$edges)) ?
Thanks. I have incorporated resolution to the graph. The graph looks linear now :)
Create a plot that shows e.g. for a time series of networks the evolution of network densification measured by # nodes versus # edges in a network.
Input: The data needed is the # od nodes and # edges in each time slice (e.gh. in a csv file with three columns: 'endyear', 'nodes', 'edges'). From this data (using R) the parameters of the scaling law can be generated with the following command:
f2ne <- read.csv(file="/Users/theresavelden/Networks/StudentProjectSummer2012/git-code/TESTING/ProjectRoot/runs/field2/run1/output/Network/accumulative1991-2010_1years/field2-run1_nodes-edges.csv")
res=lm(log10(f2ne$nodes)~log10(f2ne$edges))
and a plot is generated using the command:
ggplot(f2ne, aes(x=nodes,y=edges)) + geom_point(shape=1) + scale_x_log10() + scale_y_log10() + geom_smooth(method=lm)
The desired output would be a png file with the plot and the scaling parameters displayed (e.g. in title or subtitle). A crude way to display the parameters in the plot is
ggplot(f2ne, aes(x=nodes,y=edges)) + geom_point(shape=1) + scale_x_log10() + scale_y_log10() + geom_smooth(method=lm) + opts(title=res)
There may be more elegant ways...