Contents

requireNamespace("htmltools")
library(data.table)

A dependency graph for all GitHub repos that use the rworkflows GitHub Action.

1 Create

Here is the code for creating the plot.

1.1 Install required packages

if(!require("echodeps"))remotes::install_github("RajLabMSSM/echodeps",
                                                dependencies = TRUE)

1.2 Create graph

res <- echodeps::dep_graph(pkg = "rworkflows",
                           method = "github",
                           shape = "hexagon",
                           exclude = c("neurogenomics_rworkflows",
                                       "neurogenomics_r_workflows"),
                           node_size = "total_downloads",
                           reverse = TRUE,
                           save_path = here::here("reports","rworkflows_depgraph.html"))

1.3 Save data

dgc_out$metadata

saveRDS(res, here::here("reports","dgc_out.rds"))

1.4 Count stars/clones/views

cols <- c("stargazers_count",
          "clones_count","clones_uniques","indirect_clones_uniques",
          "views_count","views_uniques","indirect_views_uniques",
          "total_downloads","indirect_total_downloads",
          echogithub::r_repos_opts())
cols <- cols[cols %in% names(res$metadata)]

metadata_counts <- data.frame(
  total=res$metadata[repo!="rworkflows",
                         lapply(.SD, sum, na.rm=TRUE),
                         .SDcols=cols] |> t()
  )
metadata_counts

2 Show

Hover over each node to show additional metadata.

htmltools::includeHTML("https://github.com/neurogenomics/rworkflows/raw/master/reports/rworkflows_depgraph.html")
visNetwork