GVM Demonstration


The applet below requires a browser with support for Java 1.5 (or above) to run. If you can't view the applet for any reason there are always the screenshots, or you can download the demonstration as a Java application.

Use the slider to change the number of clusters. The number of cities being clustered is necessarily constrained by a desire to keep the applet download small. The largest city in each of the largest 20 clusters is indicated with a separate marker.

This demo requires Java 1.5


All the cities put into one cluster. Shanghai is the largest city and so is choosen in the demonstration as the label for the cluster.
Two clusters results in the Asian cities being essentially being treated as the densest set of outliers, split away from a larger central cluster of cities.
With three clusters, the cities become broadly clustered by longitude.
Four clusters results in the American cluster being split across the two land masses.
Five clusters, and the Euro-African cluster fragments, with South Africa's populous cities being split away.
With 25 clusters, all of the continents become represented. The lower population of Saharan Africa starts to become observable.
Increasing the number of clusters demonstrates that with this data set, the algorithm exhibits linear scaling (78ms for 100 clusters, 156ms for 200 clusters) with the number of clusters – not the n log n worst case.


You can download this demonstration in the form of a Java application you can run locally:


If you already have Java 1.5 (or above) there is nothing to install. Simply download the above jar file and then double click on it, or execute the following command line:

java -jar cluster-demo-1.0.jar

Source Code

Source code for the demonstration is available from the Google Code project for this site. You can browse it online at:

Thanks to the GeoNames project for freely providing an accessible source of geographic data.