Author

Lim Li Ying

Published

May 13, 2023

Getting started

Installing and loading R packages

Click to show/hide the code
pacman::p_load(igraph, tidygraph, ggraph, visNetwork, lubridate, clock, tidyverse, graphlayouts, jsonlite)

Loading the data set

Click to show/hide the code
MC1 <- jsonlite::fromJSON("data/MC1.json")
Click to show/hide the code
MC1_nodes <- as_tibble(MC1$nodes) %>%
  select(id, type, country)
Click to show/hide the code
MC1_edges <- as_tibble(MC1$links) %>%
  select(source, target, type, weight, key)