MapInfo Pro

 View Only

MapInfo Monday: Loading and Mapping Incident Data

  • 1.  MapInfo Monday: Loading and Mapping Incident Data

    Employee
    Posted 05-26-2025 03:33

    I was on a call with Trevor Baldwin from Yorkshire Ambulance Service NHS Trust a couple of weeks ago. They were looking for a tool for analyzing close to a million incident data points they gather yearly. The goal of analyzing the data is to figure out where and when there is a higher chance of needing an ambulance.

    I'll take you on a journey over a couple of articles, discovering how this type of analysis can be done in MapInfo Pro.

    Happy #MapInfoMonday!

    Loading Incident Data from a CSV File

    The first step is to bring the data into MapInfo Pro. The data Trevor is using comes in either CSV or Excel format. I'll show you the steps for loading both these formats into a MapInfo Tab file.

    The data I use here has been anonymized.

    From the Home tab, I click on the Open Table control to launch the Open dialog.

    From the Files of Type list, I select Vector Files (OGR), which will show all the supported file formats. In the image below, you can see that I can select the CSV or the XLSX version of the incident file.

    As I start, I will select the CSV file and click the Open button. I'll come back to the XLSX file later in this article.

    In the Vector File (OGR) Open Options dialog, I can set several options for opening my CSV file.

    I don't need to make any changes, but I want to highlight one thing.

    You can use the XPOSSIBLE_NAMES field and XPOSSIBLE_NAMES field to detect columns with coordinates. Currently, MapInfo Pro has been configured to look for columns starting with "lon" or "x" and "lat" or "y".

    You can change the options if your columns don't match this naming convention.

    The incident files I'm using have columns called X and Y for the coordinates. They match the second option listed for the possible names.

    I click the OK button to continue.
    In the next dialog, Select Tables to Open, here are a few things we need to check.

    First, click the Coordinate System button to ensure the correct projection is used when loading the data.
    The incident data I am loading is based on British National Grid (EPSG:27700).
    You can also set MapInfo Pro up to use a specific projection as the default for new tables and the session in general. You can do this via the Options tab on the Backstage (the Pro tab).
    You can read more about this in this article: MapInfo Monday: 13 Preferences to Configure.
    We also need to check some of the available options. Back in the Select Tables to Open dialog, click on the Options button.
    There are two options I want to highlight here:
    1. The MapInfo TAB File field allows you to specify the name of the tab file created. You can use the Browse button on the right side of the field to specify a location and a filename.
    2. The Save Copy as MapInfo Table option lets you create a copy of your data in a native tab file. This is especially useful if you are loading a large dataset from a text-based file. Saving this into a native TAB file will give you far better performance when viewing and querying the data in MapInfo Pro.

      Now that it all has been configured, you can click the OK button back in the Select Tables to Open dialog.

      MapInfo Pro will now load the data in the background. This happens if you have checked the option Save Copy as MapInfo Table.

      And once done, the data is loaded into MapInfo Pro in the preferred possible view. For the CSV version of the data, it will be shown in a map window.

      Loading Incident Data from an Excel File

      If the incident data are stored in an MS Excel file instead of a CSV file, the process is identical to the process described above.

      In the Select Tables to Open dialog, make sure to click on the Options button so that you can specify the name of the tab file and check the Save Copy as MapInfo Table option so that the data gets saved into a native tab file.

      When the data is loaded from an XLSX file into MapInfo Pro, we do not automatically detect columns with coordinates and create points from these.
      That's an additional step you have to do once the data has been loaded.
      From the Spatial tab, select Create Points from the Create dropdown.

      In the Create Points dialog, make sure to check a few things.
      First, check that you are creating points for the right table. Then check that the Projection matches the projection of your coordinates, and finally check that the columns with the coordinates have been correctly selected from the lists.
      You can also change the symbol you want to use for the points and select a preferred view for the tables once it has been mapped using the coordinates.

      Mapping the Incidents by Attributes

      Now that we have the incidents mapped and shown in a map, we start visualizing certain attributes on the map.

      From the Map tab, click on the Add Theme control.

      You will now be taken through 3 steps for adding a thematic layer to your map.
      You are first asked to select the type of thematic map you want to create. You can find more details about the different types in this article: MapInfo Monday: Getting Started with Thematic Maps.
      We'll start creating an individual thematic map.

      Click on the Next > button to continue.
      Next you will have to select the table and the column for your thematic map.
      I'll create a thematic map based on the station information in the incident. This will identify which station went to which incident. This could help us identify stations that tend to go outside of their normal response area.

      Click on the Next > button to continue.
      In the third dialog, you can change the appearance of the thematic map.
      You can change the styles for the individual stations and configure the legend.
      I won't make any changes as I normally tweak the thematic maps afterwards through the Theme tab.
      Click on the OK button to create your thematic map.
      From the Theme tab, you can now tweak the thematic map. Make sure to select the thematic layer in the Layer List to make the Theme tab appear.
      You could, for example, switch to visualizing the hospital attended.
      From the Layer List, you can turn off the visibility for specific values. For example, the data holds the value "!" for some hospitals. You may not want to display these on the map.
      We will end this here for now. We will return with more articles describing some of the analysis that can be performed using this type data.
      Stay tuned for more!


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