MC1

Author

Ye Naing Oo

Published

May 13, 2023

Modified

Invalid Date

Show the code
pacman::p_load(jsonlite,tidygraph,ggraph, visNetwork, tidyverse)
Show the code
MC1 <- fromJSON("data/MC1/MC1.json")
Show the code
MC1_nodes <- as_tibble(MC1$nodes) %>% 
  select(id, type, country)

glimpse(MC1_nodes)
Rows: 3,428
Columns: 3
$ id      <chr> "Spanish Shrimp  Carriers", "12744", "143129355", "7775", "101…
$ type    <chr> "company", "organization", "organization", "organization", "or…
$ country <chr> "Nalakond", NA, NA, NA, NA, NA, NA, "Rio Isla", NA, NA, NA, NA…
Show the code
MC1_edges <- as_tibble(MC1$links) %>% 
  select(source, target, type, weight, key)

glimpse(MC1_edges)
Rows: 11,069
Columns: 5
$ source <chr> "Spanish Shrimp  Carriers", "Spanish Shrimp  Carriers", "Spanis…
$ target <chr> "12744", "21323516", "290834957", "3506021", "Conventionâ", "22…
$ type   <chr> "ownership", "partnership", "partnership", "ownership", "family…
$ weight <dbl> 0.9001396, 0.8458973, 0.9648761, 0.9642126, 0.8234858, 0.893152…
$ key    <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …