A tidy API for graph manipulation in R, providing dplyr verbs and igraph algorithms for network analysis.
tidygraph is an R package that provides a tidy API for graph and network manipulation. It allows users to work with network data using familiar tidyverse principles by representing graphs as two tidy tables (nodes and edges) and providing dplyr-like verbs for manipulation. The package wraps igraph's graph algorithms, making advanced network analysis accessible within a consistent workflow.
R users and data scientists who need to perform network analysis or graph manipulation as part of their data workflow, particularly those already familiar with the tidyverse ecosystem.
Developers choose tidygraph because it integrates graph manipulation seamlessly into the tidyverse, reducing the learning curve and boilerplate code. It provides a consistent API that combines the power of igraph's algorithms with the clarity and convenience of dplyr verbs.
A tidy API for graph manipulation
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows use of mutate, filter, and arrange verbs on node and edge data, making network manipulation feel like standard tidyverse data wrangling, as shown in the example with centrality calculations.
Wraps almost all igraph algorithms like centrality_degree and community detection, providing consistent outputs that match node/edge sequences without extra boilerplate.
Includes verbs like morph() for temporary graph representation changes and bind_edges() for expanding structure, enabling complex network analyses within a tidy workflow.
Converts various data structures such as phylo, dendrogram, and data.tree to graphs via as_tbl_graph(), facilitating integration from diverse sources.
Requires the separate ggraph package for plotting, adding an extra dependency and setup step for visual analysis, as admitted in the README.
Inherits all constraints and potential issues from the underlying igraph library, such as performance bottlenecks or missing niche algorithms not covered by its wrappers.
Users unfamiliar with dplyr and the tidyverse ecosystem may find the API unintuitive, despite its clarity for insiders, limiting accessibility for broader R audiences.