michalgm / ndtv-d3 Goto Github PK
View Code? Open in Web Editor NEWInteractive Network Graph Visualization for NDTV-generate graphs using D3 animation
Home Page: http://michalgm.github.io/ndtv-d3
License: Other
Interactive Network Graph Visualization for NDTV-generate graphs using D3 animation
Home Page: http://michalgm.github.io/ndtv-d3
License: Other
Somehow the ndtv-d3 player is not positioning things correctly when I generate a network that aggregates over multiple time steps.
R code to reproduce the issue
library(ndtv)
data(windsurfers)
slice.par<-list(start=0,end=24,interval=1,
aggregate.dur=7,rule="latest")
windsurfers<-compute.animation(windsurfers,slice.par=slice.par,
default.dist=3,
animation.mode='MDSJ',
verbose=FALSE)
render.d3movie(windsurfers,vertex.col="group1",
edge.col="darkgray",
displaylabels=TRUE,label.cex=.6,
label.col="blue", verbose=FALSE,
main='Windsurfer interactions, 7-day aggregation')
Should look like:
On windsurfers network, timeIndex[0]['edge.col'] is set to a single-item array, with the value of rgba(169,169,169,1). But since i expect all edge/node properties to be arrays of all active nodes/edges, i am only applying this property to edge id 1. Is this what is intended? I could detect for single-item arrays and apply those values to all edges/nodes - goofy, but I think it would work, since the only overlap with normal behavior is when there's only one item anyway. Ideally, properties that should be applied to all active items should be either in a separate data object, have a decorator on the key (i.e. global.edge.col or something) or a single value as opposed to an array (although that would be tricky due to some values being arrays - I'm already hitting that issue with the graph-level properties).
I think it will be useful feature
Hello,
I am having some issues with rendering the movie using (render.3dmovie). When I use render.animation() I can see each timepoint displayed but render.3dmovie just gives me an empty movie...
Here is what I tried:
`compute.animation(net_dyn, slice.par = list(
start = 2,
end = 20,
interval = 1,
aggregate.dur = 2,
rule = "any"
))
render.d3movie(net_dyn, output.mode = 'htmlWidget', displaylabels=FALSE)`
I provide a sample of my network:
https://github.com/alievakrash/connectivity
need to parse style so it works w/ d3
example of a basic inspector box requested :
http://shiny.rstudio.com/gallery/nvd3-line-chart-output.html
probably could pass in a config object through the options:
From the r side it would look like
inspectionAttributes=list(
vertices=c('id','status'),
edges=c('id','tail_id','head_id','infecting')
)
where 'id', 'tail_id' and 'head_id' are specially interpreted, but other properties are looked up by directly querying the networkObject. active attributes will need to be matched (if 'status' doesn't exist, look for 'status.active') and attributes extract for the appropriate time period. hmm, i guess these would need to be added to the render, so that you won't have to write the time binning code?
which is why the labels are not picking up their san-serif font family even tho it is in the css
position in center of edge
I forgot to include this on the list. It is a very commonly used property (controlling the text size of the label). Should be easy to implement, right?
not sure what that hilite should look like. dim everything else? would probably need to look up linked edges and nodes using the iel and oel lists on the network object.
assuming that drawing circles is faster and simpler, we should change prototype.drawPolygon so that when vertex.sides 50 (default) or greater it just draws a circle. Can also then skip looking up the vertex.rot param.
noticed this on console while looking at other stuff
loadData: 346.41ms ndtv-d3.js (line 482)
I was wondering if you could give me any pointers (or provide an option for future releases) for having labels be displayed as tooltips for graphs that would be cluttered with label displays. I've been looking at the code that displays the tooltips, but I can't immediately see how to change it to display node labels instead of their ids.
someday it would be cool for the user to be able to make the movie pan and zoom by defining how these change over time.
need to be able to disable the green/red color animations (when the edge colors already mean something) and perhaps set what the colors should be. Former probably as a config option, and the later as a css property. Or perhaps having css set stroke-default will work.
this is in short.stergm.sim, where vertices are always present. this is especially noticeable when steping back and forth 1 frame at a time. maybe has something to do with the cached coords?
Need to have some sort of way for people to find out what the tool is and who made it. I think maybe adding the additional 'settings' or 'menu' button with the play buttons, that pops up a menu with an about link. That link could either display the text, or have the link to the LICENSE page on github?
The code below should produce a network in which the main title says "foo" at time 0-1 and 'bar' at time 1-2
library(ndtv)
data(short.stergm.sim)
activate.network.attribute(short.stergm.sim,'label','foo',onset=0,terminus=1)
activate.network.attribute(short.stergm.sim,'label','bar',onset=1,terminus=2)
render.d3movie(short.stergm.sim,main=function(slice){slice%n%'label'})
instead, doesn't load network in browser, and gives
TypeError: value.split is not a function
value = value.split('\n');
file514...f8.html (line 1250, col 24)
and
TypeError: n3.timeIndex[n3.currTime].renderData is undefined
var xlab = n3.timeIndex[n3.currTime].renderData.graph.xlab;
file514...f8.html (line 931, col 8)
currently it has kind of a stop-and-go feeling, some users may want this, but it doesn't match the movies very closely. add a 'animationRule' option to configure this
otherwise, if an edge already has lwd=5, you can't see the hilite 'cause it expands to 5
Doesn't display the github.io page for the site in IE9, works fine in IE11. I don't think we need to support IE9, just marking it here for future reference
currently it stays black
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.