-
Notifications
You must be signed in to change notification settings - Fork 0
/
visualise_network.Rmd
44 lines (35 loc) · 1.09 KB
/
visualise_network.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: "webademic"
author: "Nic Fox"
date: "01/05/2021"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Visualise how papers are connected with an interactive network visualisation.
- each node is a paper
- you can click on a node to see more details about the paper
- you can click on a line between 2 papers to see how the papers are connected
- you can zoom in and out
- you can move nodes (papers) around
```{r import_packages, warning=FALSE, include=FALSE}
library(visNetwork)
library(tidyverse)
```
```{r import_nodes, include=FALSE}
nodes <- read_csv("nodes.csv")
```
```{r import_edges, include=FALSE}
edges <- read_csv("edges.csv")
```
```{r visualise_network, message=FALSE, echo=FALSE}
network <- visNetwork(nodes, edges) %>%
visEdges(arrows = 'to') %>%
visNodes(shape = "box", color = "#6b1773", font = c(color="white")) %>%
visEdges(color = "black")
# save network as an html file
visSave(network, file = "network.html", background = "white")
# view network
network
```