Skip to main content

How to use web maps to perform spatial analytics

For some time, users have displayed their data on web maps for showing everything from tourist attractions to bus shelters. But did you know that you can perform real-time analytics on your data displayed on the web map? ArcGIS Online provides a range of spatial analysis functions: summarize data, find locations, analyze patterns, use proximity, enrich and manage data, and more. Find out in this blog post how to create and visualize rail accident hot spots using online analytics to help improve transportation safety of Canadians.

Not so long ago, I was working with some staff at Transport Canada on a quick analysis project related to safety issues on the Canadian Railway system. We all remember the safety concerns raised following the Lac-Mégantic train derailment and the resulting devastation. In this pilot project, we were interested in determining if there were any locations with a high concentration of rail accidents; or in other words, if there were any rail accident hot spots.

To conduct a similar or any spatial analytics, we need relevant data, which in this case was available on the federal government’s open data site. For this project, we used the National Railway Network (NRWN) map data that was produced by Natural Resources Canada. The NRWN provides the locations of the railway tracks and other features that are related to the railway such as junctions, crossings, marker posts and stations. Many attributes are also provided for each feature. The dataset was published in 2016, so the rail track features and attributes may not be current in all areas.

The National Railway Network (NRWN) data is downloadable from the federal government’s open data site in shapefile format. Here is a web map of the NRWN data showing the rail tracks, some of the track attributes and other railway-related features.

Next, we used the rail occurrence data that is maintained on a monthly basis by the Transportation Safety Board of Canada (TSB) and is also available from the federal open data site. The rail occurrence file is a spreadsheet of accidents and incidents that have been reported to the TSB from January 2004 to the present. The file contains a linear-reference location for each accident or incident in Canada by type and by date. The data was downloaded, each occurrence was geocoded from a linear-reference location to a coordinate reference location and loaded as points with attributes into the web map.

The TSB rail occurrence data was downloaded, geocoded and displayed in this web map. Note that the rail occurrence data is not current and has been somewhat redacted.

Once the initial data was loaded onto the web map, we used the heat map analysis tool to do an analysis of the rail occurrence data. A heat map is a way to visualize (using various colours) areas with lower or higher densities of the point features of interest. In this application, a heat map was the perfect tool because it showed the locations where there were a larger or smaller number of railway accidents or incidents. Railway safety officials can use this analysis to look for “hot spots” which are locations where there are significantly more rail accidents or incidents than normally would be expected. Once such high-accident prone locations have been identified, the safety officials can examine the map to look for root causes of issues at each of these “hot spot” locations.

The heat map of rail occurrence data for the Québec City-Windsor corridor. Yellow indicates a higher level of occurrences. The densities and colours can be adjusted to suit the application.

The heat map of rail occurrence data centred near Etobicoke, Ontario. Note that the heat map adjusts the output map automatically based on the area being reviewed This is because the heat map analysis is being performed dynamically by ArcGIS Online and as the user zooms or pans around, the analysis changes based on the map display window.

Thus, web maps can be an easy way to create dynamic map analysis that can be viewed and used by many individuals in a community of users. In this case, the rail safety officials are experts in rail safety and may not be willing or able to create a suitable web map including analysis. So, a GIS practitioner could easily create such a map and provide it to their stakeholder community for monitoring, analysis and potential action. When are you going to make a web map with some analytics functions for your user community?

About the Author

Gordon Plunkett is the Spatial Data Infrastructure (SDI) Director at Esri Canada. He has more than 30 years of experience in GIS and Remote Sensing in both the public and private sectors. He currently sits as a member of the Community Map of Canada Steering Committee, GeoAlliance Canada Interim Board of Directors, the Open Geospatial Consortium (OGC) Technical Committee, the Canadian General Standards Board (CGSB) Committee on Geomatics, the University of Laval Convergence Network Advisory Committee and the Advisory Board to the Carleton University Geomatics and Cartographic Research Centre. During his career, Gordon has worked on projects in more than 20 countries and has contributed to numerous scientific conferences and publications. At Esri Canada, he is responsible for developing and supporting the company’s SDI vision, initiatives and outreach, including producing content for the SDI blog.

Profile Photo of Gordon Plunkett