MapInfo Pro

 View Only

MapInfo Monday: Density Maps II

  • 1.  MapInfo Monday: Density Maps II

    Employee
    Posted 06-26-2023 06:28

    Happy #MapInfoMonday!

    In December last year, I wrote my first article about Density maps, using a polygon table to calculate the number of "incidents" in the area. I ended that article saying that you can do something similar using raster too. Let's inspect that.

    For this example, I have a dataset with incidents in the Manchester area. This could be crimes, traffic accidents, or other incidents. Heatmaps are used to visualize distributions of dense point data and to show locations where a higher frequency of activity occurs. Heatmaps also allow you to see through overlapping points where it may be hard to see the number of incidents.

    You can create heatmaps in MapInfo Pro from a couple of places. For a basic heatmap, you can access the Heatmap option on the Map tab. This gives you limited control over the heatmap options but is very easy to use. And it is also accessible to users that don't have full access to the raster capabilities in MapInfo Pro.

    We will take this a step further and use the Advanced Heatmap method from the Create Raster dropdown on the Raster tab. You can of course also use any of the other options. It all depends on your need.

    Let me run you through the creation of a heatmap using the advanced method. After you clicked the Advanced control above, the Heatmap panel appears. You now have to set it up. First, you have to select your input data. Click the Select Files button at the top.

    I select my table with incidents to use. Depending on the data selected, I may have to specify other settings. As I selected a native tab file, the coordinates system is automatically detected.
    You can also select a column for your input data. This would be a column holding a value that can be used as the frequency for the heatmap calculation. Heatmaps normally assign the frequency of one to each point but this allows you to give a weight to each point.
    Click OK to get back into the Configuration panel for the heatmap.
    Next up is the Kernel method. Normally, a kernel density estimator (KDE) function is introduced to weigh the input samples - usually as a function of the normalized distance between the sample and estimation positions. It's used to determine how much the distance to the sample points affects their value for each cell.
    For this example, I chose Quartic.
    Heatmap calculation in MapInfo Pro supports a wide range of Kernel methods. You can read more about the different Kernels in the Kernel (Statistics) post on Wikipedia.
    As I selected a column holding a frequency value, I do make sure to check the Use input column as frequency. If you don't check this option, each point will be assigned a frequency of one. A frequency could be the number of victims in an accident or to a crime, or you can use this to assign importance to each point weighing for instance certain crimes like murder higher.
    Next up is how to handle points that are close. In some cases, you may want to treat coinciding points as one point and just use the value from one of these points. In this case, you can control what value to use using the Coincident Points Method. This allows you to use for example the maximum or minimum value from these coincident points.
    In our case, we want to keep and use all the points, even those that lie at the same location. Otherwise, we wouldn't get the true picture of the number of incidents in certain areas as you can have multiple incidents at the same location or address. To use all the points, make sure to select None from the Coincident Points Method.

    The final option, I wanted to draw your attention to, is the Cell Size. In my example, I leave this to Automatic. In this way, MapInfo Pro will decide what resolution will work well for my dataset and for the area they are covering.

    You can change this and set your own Cell Size value but keep in mind that by default all the other settings relate to this value. Changing the Cell Size to a different value can have a drastic effect on the outcome. I would recommend that you first click on the Suggest button to see which Cell Size MapInfo Pro will use. This gives you some bearing on how different your own Cell Size would be. If your size is much higher or lower, you may also want to change other values in the configuration such as the Major Axis Search value. 

    Finally, you just have to give your result a name and hit the Process button to run the heatmap process.

    The resulting heatmap looks like this where the red values represent the locations with a high number of incidents.

    From the Advanced Color panel, you can use Clip Limits and Transparent Clip Limits to get a more clear view of where your hotspots are. In the image below, I have turned on these two options and set the clip limit to remove the values lower than 4.

    In this Support article, you can read more about the heatmap options in MapInfo Pro.

    I hope you found this useful. Stay tuned for more #MapInfoMonday Tips & Tricks.



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