This script samples N
nodes from the graph, and assigns nearest neighbors to the sampled
nodes using color. Nodes are sampled based on either longest shortest distance between
all previously sampled nodes or with probably proportional to the shortest distance.
See more scripts here
To initialize it, load a city in the city-roads, and enter the following command in the developer console.
let city = await requireModule('city-script');
The city
object is your access point to all the scripts in the current repository.
city.splitToParts(3);
This will split a city into 3 parts:
Play with your city here: https://anvaka.github.io/city-roads