Happy #MapInfoMonday!
In today's post, I will show you how to add a symbol to your map to illustrate change.
Typically, when creating a thematic map showing change, you will use a Ranged Thematic Map using colors. These colors will go from light to darker color. If your change values hold both negative and positive values, you should consider using diverging colors. This would have the negative values shown in one color, say red, and the positive values shown in another color, say green.
Here's a typical example of such a map. The growth is shown as a percentage compared to the first year in the period.
How about adding some arrows to the map that help bring out that information? Arrows pointing up for growth, arrows pointing down for decline, and an arrow pointing ahead for no big change.
The benefit of adding the arrows is that it will make the change even more clear to the readers of your map.
Let's see how you can get that done.
First, we need to create a copy of our polygon table and replace the polygons with points. To use points in a thematic map, you need a table of points.
You can of course create a physical copy of your table by saving a copy of it and then converting the polygons to points.
I will, however, create a copy using SQL. The copy will be a query and will always get refreshed when you open your workspace or rerun the SQL Select statement. In this way, you don't have to worry about keeping your copy up-to-date.
From the SQL Window, I run this query:
Select m.*, Centroid(m.obj) Object
From Danske_Kommuner_2008_2019 As "m"
Into Municipality_Centroid
I'm selecting from my table Danske_Kommuner_2008_2019
that I give a Table Alias, "m"
.
I'm extracting all the columns from my table using this expression: m.*
. And, I'm using this expression to add a new spatial column to my result that I want to use as the spatial object.: Centroid(m.obj) Object
. The MapBasic function Centroid()
extracts the Centroid from the object passed to the function. That's an easy way to convert a polygon or linear object to a point. Note the Object
keyword. This keyword tells MapInfo Pro to use the spatial expression in front of the keyword as the spatial object in the resulting query table.
Adding the resulting query Municiapality_Centroid
to the map shows the centroids for all my polygons.
This step will use the same expression for the thematic as I used for the ranged thematic. I will also adapt the thematic map to use the same ranges as the ranged thematic map. In that way, the two will match.
After starting the Create Thematic Map process by clicking on Add Theme on the Map tab, I get the Create Thematic Map Step 1 of 3. I select Ranges as the Type. From the list of Templates, I select a Point Ranges template. It's not that important which you select as you will modify this anyway. If there is one using the color you want for your arrows, I'd suggest using that template. I picked Point Ranges, Five Cities.
In the dialog Create Thematic Map Step 2 of 3, I select the layer to use and I specify the expression to use too.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------