#' Plot events and names in the Norway Digital Archives
#'
#' Plot events and names using a force directed network graphic
#'
#' A wrapper for `code{forceNetwork}` with some basic defaults.
#'
#' @param net A list with nodes and links from \code{\link{create_network}}
#'
#' @return A network graph
#'
#' @author Chris Stubben
#'
#' @examples
#' \dontrun{
#' s1 <- advanced_search(1638, first="Siv*", last="Lars*", residence="Stub*")
#' sivert <- get_records(s1)
#' net <- create_network(sivert, highlight="Stub")
#' plot_network(net)
#' }
#' @export
plot_network <- function(net, ... ){
networkD3::forceNetwork(net$Links, net$Nodes, Source = "source",
Target = "target", Value="value", NodeID = "name", linkDistance=30,
Group = "group", ...)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.