Instead of {tidygraph} we use {igraph}, with layout = “kk”: layout.kamada.kawai
library(ggraph)
library(igraph)
hs_graph2 <- igraph::graph_from_data_frame(highschool)
layout <- create_layout(hs_graph2, layout = "kk")
class(layout)
## [1] "layout_tbl_graph" "layout_ggraph" "tbl_df" "tbl"
## [5] "data.frame"