Visualization

Leaflet (via leaflet::)

# Create a leaflet map
leaflet(csp) %>% 
  addTiles() %>% 
  addMarkers(
    data = nodes,
    lng = ~Longitude, 
    lat = ~Latitude,
    clusterOptions = markerClusterOptions(
      removeOutsideVisibleBounds = F,
      spiderfyOnMaxZoom = T
    )
  ) %>% 
  addPolygons(
    weight=1,
    label=csp$label,
    color="white",
    dashArray="3",
    fillColor=~pal(csp$value),
    fillOpacity=0.5,
    data=csp
  )

Three.js (via threejs::)

# Create a threejs globe
library(threejs)

globejs(lat = nodes_aggr$lat,
        long = nodes_aggr$long,
        val = 10 * log(nodes_aggr$value),
        pointsize = 0.5,
        atmosphere = TRUE)