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).
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.
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.
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.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------