In-class Exercise 5

Author

Lee Peck Khee

Published

May 20, 2023

Modified

May 20, 2023

5.1 Loading the required packages

pacman::p_load(jsonlite,igraph, tidygraph, ggraph, 
               visNetwork,tidyverse)

5.2 Loading the dataset

MC1 <- fromJSON("data/MC1.json")
MC1_nodes<- as_tibble(MC1$nodes) %>%
  select(id,type,country)
MC1_edges<- as_tibble(MC1$links) %>%
  select(source,target, type, weight,key)