Repository navigation
Conversation
bburns632
marked this pull request as draft
November 16, 2026 03:43
Network visualizations get a dropdown next to "Select by id" that resizes nodes by any numeric column of the nodes table. Node area is proportional to the value (radius 10-50). The default, "none", keeps uniform sizing. Missing/non-finite values and constant columns keep the default size. Sizes are precomputed in R and applied client-side via htmlwidgets::onRender, so htmlwidgets is added to Imports (already a visNetwork dependency). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bburns632
force-pushed
the
feature/size-weighted-nodes
branch
from
November 16, 2026 03:48
4bffabe to
dda0dea
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a "Size by" dropdown to every network visualization (Function, Dependency, and Inheritance reports), next to the existing "Select by id" dropdown. Choosing a metric resizes nodes by any numeric column in that reporter's nodes table. The default, "none", keeps today's uniform sizing.
Partially addresses #169 (from @alistaire47). you can size the dependency graph by
numRecursiveDeps, the issue's "quick 0-dependency" suggestion, and the metric is user-selectable. Package-weight metrics in the style of itdepends (install size, compiled code, LOC, etc.) and a combined score are not part of this PR. Any numeric columns added toDependencyReporterlater will show up in the dropdown automatically.Details
.scaleNodeSizes()) and applied in the browser viahtmlwidgets::onRender().htmlwidgetsis added toImports; visNetwork already depends on it, so users don't install anything new.NAMESPACEwas edited by hand to addimportFrom(htmlwidgets,onRender), matching the new roxygen tag.Testing
tests/testthat/test-plotting.Rcover the scaling function and the data attached to the widget. The plotting and reporter class tests pass locally (135 passed, 0 failed).R CMD check --as-cranon the built tarball: 0 errors, 0 warnings. 2 NOTEs, neither from this change (the.9999dev version, and a local.claude/directory).outDegreegives sizes from 10 to 50, and "none" puts every node back to 25.🤖 Generated with Claude Code