Summary
# NOTE: This Rmd is located in data_out/, so read files locally (NO 'data_out/' prefix)
nodes <- readr::read_csv('nodes.csv', show_col_types = FALSE)
edges <- readr::read_csv('edges.csv', show_col_types = FALSE)
ix <- readr::read_csv('intersection_index.csv', show_col_types = FALSE)
cat('Nodes:', nrow(nodes), '\n')
## Nodes: 2
cat('Edges:', nrow(edges), '\n')
## Edges: 1
Top intersection nodes
ix %>% select(name_en, country, layer, degree_total, layers_touched, intersection_score) %>% head(20)
## # A tibble: 2 × 6
## name_en country layer degree_total layers_touched intersection_score
## <chr> <chr> <chr> <dbl> <dbl> <dbl>
## 1 University of Chines… CN L3_C… 1 1 0.755
## 2 Chinese Academy of S… CN L3_C… 1 1 0.616
Graph preview (light)
if (nrow(edges) > 0) {
g <- graph_from_data_frame(edges %>% select(from_node_id, to_node_id), directed = TRUE)
plot(g, vertex.size=4, vertex.label=NA, edge.arrow.size=0.3)
} else {
cat('No edges to plot')
}
