How to create Grid Maps and use it in BI

This example is made using QGIS application which is Open Source and has good support and many add-on’s that we can use in preparation and processing of data.

To begin with, I loaded a vector map of Croatia with a breakdown into municipalities and cities.

From that vector map I prepared a new map:

You may notice that there are too many units and it is very difficult to identify them.

For this reason, the overview by municipalities and cities is not appropriate for this view, and it should go to the higher level, which is the level of County Borders.
I’ll make the data preparation in the QGIS application, which you can download and use for free.

The next step is to rasterize the vector polygons.

Now we need to select the rasterization parameters. That’s a pretty important step!

We need to decide if we want the display to work using Pixels or georeferenced data.
If we are working with georeferenced data, we need to indicate the division between grid points. The optimum distance must be chosen in order to obtain a somewhat similar appearance to the polygon. I used a distance of 7500 meters for a map of Croatia. That’s a lot of points, but it will provide me with a better quality pad. In this step, we can also perform a single-attribute transgender from a vector to a raster, and this can be selected via the field: Field to use for burn-in value.

Attributes can only be transferred from numeric fields, and if the field you want to use is not numeric – translate it into numeric!
We can also limit the area for which we want to do this, and I will use a Vector Layer extend layer.
As a result, we got a raster map in shades of gray:

Now we need to create a grid using the Geoprocessing tool in QGIS.
Selecting Create grid opens a window for creating a grid.

We can create one of the allowed types. Let’s take Hexagon (Polygon) now.
Grid Extent is again taken from the vector layer, while for horizontal and vertical spacing we enter the optimal value. In my case it is 1000 meters.
Horizontal and vertical overlay means that we want to overlay polygons. It’s a good idea to look at how the size of the hexagon adjusts to your map. This is an example with a grid size of 10,000 meters.

Take a good look at this option if we specify horizontal and vertical overlay values ​​at 10% of horizontal / vertical spacing when generating grids.
If we set the transparency of the substrate differently, we now see the overlap area. Such areas can be removed from the view by numerical operations (surface-based classification), thus obtaining a space between polygons.

After attribute transfer, we can classify data, and we now have a basis for export from QGIS in various data types suitable for the BI tool.

I’ll do an Export to CSV while doing the coordinate conversion from ETRS to WGS84 to make Tableau integrations easier.
Let’s open Tableau and link to the file we exported from QGIS.

We see that we got 3 fields: X, Y and Value. X and Y are actually Long and Lat, while Value is the county code.

Now let’s make 2 more fields X1 and Y1 as numeric.

Everything is still up to you.

Whether you want to show it as a Map, a diagram, or some other form depends on you.

Enjoy the opportunities Tableau provides to us!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s