Binning Script

The TatukGIS Editor contains a new script called Binning which can be very useful for data analysis. This blog explains what is binning, its advantages, and how to use this script to perform analysis.

Binning is a great alternative technique for visualizing data density when working with large data sets. It is great for making sense of maps that are otherwise difficult to interpret because there are so many data points. Binning is defined as the process of grouping pairs of locations based on their distance from one another. The points can then be grouped by category to make maps easier to understand.

The most popular methods of binning are rectangular and hexagonal. This script uses the hexagonal method, which is an effective way to aggregate the data. The technique uses hexagon shapes to create a grid of points and develop a spatial histogram. With hexagonal binning, the number of points falling within a particular hexagon in a gridded surface creates different colors to more easily visualize the data.

The images below present a workflow of how the Binning script can be used to aggregate a large point-based dataset into hexagonal polygons. This example uses a world map of major cities.

Running the Binning script invokes the Binning dialog window. It is important to set the Radius value large enough so that at least a few point shapes are contained in each hexagon. The number of bins is calculated on-the-fly. The first example uses the configuration shown below.

Result of the binning operation:

It is easy to see that the darkest hexagon (selected in the picture below) contains the highest points density. We can check this by opening the attribute table of the newly created layer – Binning. This layer contains the DENSITY attribute. The density value for each shape depends on the Count by option selected in the Binning dialog window. The count can reflect the number of point shapes within the hexagon or attribute values of the shapes within the hexagon.

The cities were grouped by category as presented below in the Legend :

The next example presents regions with the highest number of cities with a population of more than 1,000,000 inhabitants. To do this, we must add a restricted query “POP_RANK < 3”.

POP_RANK is one of the attributes in the city layer. The attribute classifies each city based on population ranges.


POP_RANK Number of inhabitants
1 5,000,000 and greater
2 1,000,000 – 5,000,0000
3 500,000 – 1,000,000
4 250,000 – 500,000
5 100,000 – 250,000
6 50,000 – 100,000
7 Less than 50,000

Result of the 2nd binning operation:

a. Both layers displayed.

b. Only the Binning layer displayed.

We hope you now understand how to our new Editor Binning script to make your data less complex!


"Binning in GIS"

Posted: October 31, 2014
Filed under: EDT, SCRIPTING