statnet / ndtv

ndtv: Network Dynamic Temporal Visualizations in R
https://cran.r-project.org/web/packages/ndtv/index.html
46 stars 5 forks source link

expand ability to specify attribute giving edge weights #3

Open skyebend opened 8 years ago

skyebend commented 8 years ago

(migrated from statnet trac ticket #202)

Should be able to use weighted edges, interpreted as dissimilarity/distance

comment:1 Changed 3 years ago by skyebend

I'm going to add the two params to compute.animation:

weight.attr=NULL

character, (optional) the name of an edge attribute of net containing numeric values to use for edge distances.

weight.dist=FALSE

logical, should the edge values given by weight.attr be interpreted as distances (larger values should place vertices farther apart) ? Default (FALSE) assumes values are similarities (larger values means stronger connection means vertices closer together ).

comment:2 Changed 3 years ago by skyebend

created a functioning version on feature branch with [12203/statnet_commons] One issue is that when inverting the weights from similarity to distance, it only has access to the maximum value in that specific slice. This means that the scaling changes from slice to slice. For static attributes and TEAs, we could potentially first pull out the maximum value of the weight attribute. But activity.count and activity.duration are dependent on the specific slice params so I'm not sure how we could pre-calculate without first generating all of the slice networks.. seems like it would hog memory

comment:3 Changed 3 years ago by skyebend

In a related issue to above, there isn't a means of specifying layout distances as a function (i.e. max, mean) of an existing numeric edge attribute. Merged weight stuff from feature_dev to main branch in [12245/statnet_commons]