Source code

The visualisation is powered by the grapher package


# get cran network data
deps <- cran_deps_graph(
  format = "igraph",
  include_base_r = FALSE

# compute graph metrics
graph <- as_tbl_graph(deps) %>% 
  activate(nodes) %>% 
    in_degree = centrality_degree(mode = "in")

# build and save graph
graph(graph) %>% 
  graph_offline_layout(steps = 100, gravity = -20L) %>% 
  hide_long_links(280) %>% 
  scale_node_size(in_degree, c(10, 80)) %>% 
  scale_link_color_coords() %>%
  capture_node_click() %>%  

CRAN Dependency Graph

Each node is an R package on CRAN, connections represent dependencies Depends Imports and LinkingTo.

You can navigate the graph with the w a s d and the arrow keys ( ) to rotate the camera a e will rotate it.

Click on a node to reveal more information about it.

Type the name of a package in the search box in the top left corner to zoom in on it.

While all packages are visualised not all dependencies are, to avoid a hairball graph edges that are over a certain length are hidden. This allows keeping sight of smaller communities.

You view the source used to build the visualisation here

with 💕 by John Coene