MapInfo Pro

 View Only

MapInfo Monday: Using a Symbol to illustrate Change on a Map

  • 1.  MapInfo Monday: Using a Symbol to illustrate Change on a Map

    Employee
    Posted 08-14-2023 04:07

    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.

    Converting Polygons into Points

    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.

    Creating an Arrow Thematic Map

    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.
    From the Field list, I scrolled to the bottom and clicked on Expression... which brings up the Expression dialog where you can write an expression to be used in your thematic map.
    The expression can be built in multiple ways. First, you need to decide what the base for your thematic map is. The growth can be expressed in the form of actual values, as a percentage change, and you can also make the change depend on the area of your polygons. I chose to use a percentage change, comparing the change to the population.
    My table already has a column holding the difference between the years but you can also easily calculate this in the Expression dialog simply by subtracting one year's population from another year's population.
    My expression looks like this: DIFF2008K1_2009K1 / INDB2008K1 * 100. DIFF2008K1_2009K1 is the change from 2008 to 2009 and INDB2008K1 is the population in 2009. If you didn't have the column holding the difference, the expression could look like this: INDB2009K1 - INDB2008K1/ INDB2008K1 * 100. DIFF2008K1_2009K1.
    The dialog Create Thematic Map - Step 3 of 3 shows you how the thematic map will look. We will have to change this completely.
    Click the Ranges... button to change the ranges through the Customize Ranges dialog.
    If you want to use the same ranges for multiple years, I'd recommend using Custom Ranges. In that way, you can set some ranges that will work for numbers across multiple years. Otherwise, the ranges will typically change as you switch between years and that makes it harder to see how the population changes over the years.
    For my population growth, I have set the ranges very close around 0 and then set the outer limits high to also catch potential outliers. As you can see for the selected year, the changes are mostly within -0.5% and 1.0%.
    Next, we change the style. Click the Styles... button to open the Customize Range Styles dialog.
     For each range, we need to set it to match the arrow symbol we want to use. When you click on the symbol button, the Symbol Style dialog appears. Select the Font, the Symbol, the Color, and the Size. Also, check the Background options and potential Effects.
    Back in the Create Thematic Map - Step 3 of 3, your thematic map now looks like this:
    Click OK to see the actual thematic map on your map.
    You can also clone your map and in that way create another map to focus on a specific area. In this case Copenhagen.
    Let's see what we started with in the form of just one color thematic map.
    And how does this work: only the arrows showing growth?
    I hope this has given you some ideas on how you can add additional ways to show a change in your maps.
    Feel free to share your example below


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------