Show/Hide Toolbars

MPCluster for Maptitude

Navigation: Examples

Example: Finding Clusters of UK Restaurants

Scroll Prev Top Next More

This example shows you how to use MPCluster to find clusters of restaurants in the UK. This could be useful if you were a catering supply company and wished to find suitable shop locations or find territories for your sales representatives.


The sample data consists of street addresses for restaurant locations throughout the UK, including islands and bailiwicks. Business names and contact information have been removed.


The source data file is called restaurants.xlsx and contains one worksheet called restaurants. It can be found in the MPCluster examples file:


It is assumed that you are familiar with basic Maptitude operations. Import this worksheet into Maptitude as data views. This can be performed using the Create-a-Map Wizard or File->Add on the main menu. The resulting map will look something like this:




The blue star markers are quite large and hide a lot of potential clusters, but our zoomed out image already shows some clustering around conurbations (e.g. around London, Birmingham, Manchester, and Glasgow-Edinburgh).


We wish to find clusters in this data in order to efficiently allocate shops or sales representatives with areas that have the most restaurants. Start MPCluster by selecting MPCluster on Maptitude's Tools->Add-ins menu. This will display MPCluster's main panel. Set the parameters as follows:




This tells MPCluster to search for up to 30 clusters that fit the data points in the Restaurants dataset. Clusters must have at least 20 points (restaurants) in them, and have a maximum radius of 30 miles.


We have also selected the Hierarchical algorithm. This is a deterministic algorithm that will produce reliable results. See the Cluster Finding Algorithms page for information for the differences between the Hierarchical and K-Means algorithms.


The display options are set so that all clusters are drawn with boundary outlines and central coordinates. This is set using the Write clusters to layers check box. This will create two layers called cluster_CTR and cluster_BDR (the 'cluster' prefix is set in the options). These mark the cluster centers with solid triangles, and the cluster boundaries with solid lines. The centers and boundaries use matching colors. These layers are overwritten if they already exist. You must make sure they are write-able. Set the Draw Labels check box if you wish to label the boundary shapes. Draw Cluster Circles will create a third layer (cluster_CIR) of circles around each cluster at the maximum requested radius - clear this check box.


The Write allocations to a data view check box creates a data view that lists all of the data points and their cluster allocations as a number. Typically this is then joined to your input data, and have a theme allocated to it. This theme colors each data point according to its cluster allocation. Set the Apply a Join to the input data points and Apply a Theme check boxes to do this automatically.


MPCluster can also write the allocations to an Excel workbook, but we have not selected this option here.


Next press Start on the main panel to start processing. MPCluster will prompt you for the FFA file for the new data view that stores the cluster allocations and will be joined to your input data. You can use any name you want. Here we use rest_alloc:




Then it will ask you for the output file prefix for the new data layer (i.e. cluster centers and boundaries) DBD files. Here we use clusters:




Next press Start on the main panel to start processing.  MPCluster will then display a dialog box indicating clustering progress:




This dataset contains almost 25,000 data points and it will take a few minutes for MPCluster to create the clusters. This dialog box will disappear when processing has completed and the clusters have been drawn on the map. Here are the results, zoomed out:




Most of the larger cities and urban areas have been identified as clusters. The larger built up areas (e.g. the Midlands and South-East England) have clusters covering most of the land.


Further details on how to control the clustering parameters can be found on the Changing Clustering Behavior and Setting Options page.