Skip to content

Commit 82b5784

Browse files
committed
filter out unconnected nodes from network graph #59
1 parent 790967c commit 82b5784

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: repometrics
22
Title: Metrics for Your Code Repository
3-
Version: 0.1.3.059
3+
Version: 0.1.3.060
44
Authors@R:
55
person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0003-2172-5265"))

R/quarto-dashboard.R

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ get_user_network <- function (data_repo, data_users, range = c (1, 20)) {
104104
dplyr::filter (target %in% nodes$id & source %in% netdat$nodes$id)
105105
netdat$links <- dplyr::bind_rows (netdat$links, links)
106106

107+
# Remove any nodes which then have no links:
108+
netdat$nodes <- netdat$nodes |>
109+
dplyr::filter (id %in% c (netdat$links$source, netdat$links$target))
110+
107111
# Finally add focal repo to those data (if not already there)
108112
this_repo <- data_repo$rm$repo_from_gh_api$full_name
109113
if (this_repo %in% netdat$nodes$id) {

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci-review-tools/repometrics",
99
"issueTracker": "https://github.com/ropensci-review-tools/repometrics/issues",
1010
"license": "https://spdx.org/licenses/GPL-3.0",
11-
"version": "0.1.3.059",
11+
"version": "0.1.3.060",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",

0 commit comments

Comments
 (0)