Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an interface for custom weighting of edges and/or nodes #182

Open
bburns632 opened this issue Feb 10, 2019 · 1 comment
Open

Provide an interface for custom weighting of edges and/or nodes #182

bburns632 opened this issue Feb 10, 2019 · 1 comment

Comments

@bburns632
Copy link
Collaborator

Should we provide an interface for custom weighting of edges and/or nodes?

This would allow users more flexibility beyond current pkgnet defaults. Relates to #169.

@bburns632
Copy link
Collaborator Author

More direct way to accommodate this one would be to add optional arguments to the CreatePackageReport function for node and edge tables with vizNetwork formatting values to override. If provided (and indexes aligned, etc), then those values would override the values here:

# Create Plot
g <- (visNetwork::visNetwork(nodes = plotDTnodes
, edges = plotDTedges)
%>% visNetwork::visIgraphLayout(layout = self$layout_type)
%>% visNetwork::visEdges(arrows = 'to')
# Default options
%>% visNetwork::visOptions(
highlightNearest = list(
enabled = TRUE
, degree = nrow(plotDTnodes) # guarantee full path
, algorithm = "hierarchical"
)
, nodesIdSelection = TRUE
)
)

I'm leaning towards not supporting this level of customization directly in pkgnet. If a user is interested in this level of customization, it would be easier to use vizNetwork (or another graph visualization package of their choice) directly. We could write an example in this issue or a small vignette on how to extract the igraph networks from pkgnet and build in vizNetwork with different design choices.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant