A Raster-Based Game of Life Using Python in QGIS

Blog post authored by Richard Wen and Claus Rinner

A great way to demonstrate the manipulation of geospatial raster data is Conway’s Game of Life [1]. The “game” starts with a grid (“board”) of binary cells, which represent either alive (populated) or dead (empty) states. Each cell interacts with its eight adjacent neighbours to determine its next state. At each iteration of the game clock, the following rules are applied [1]:

  • A live cell with less than two or more than three live neighbours dies (under-population, overcrowding).
  • A live cell with two or three live neighbours continues to live.
  • A dead cell with three live neighbours becomes alive (reproduction).

The free and open-source Geographic Information System (GIS) software package QGIS [2] offers support for scripting with the Python programming language (pyQGIS module), which enables the use of powerful libraries such as NumPy and GDAL for dealing with raster data. Numerical Python (NumPy) [3] is a package developed for Python that is geared towards scientific computation with support for multi-dimensional arrays and matrices. The Geospatial Data Abstraction Library (GDAL) [4] is a library for translating raster and vector geospatial data formats available as a binding for Python.

Using NumPy, GDAL, and pyQGIS, we implemented the Game of Life, where NumPy manipulates the arrays, GDAL handles reading and writing of the raster data, and pyQGIS visualizes the rasters and their relative changes. The source code was written by Master of Spatial Analysis student Richard Wen with input from Dr. Claus Rinner and is available at https://github.com/rwenite/QGIS_RasterArray. The project was inspired by Anita Graser’s visit to Ryerson’s Lab for Geocomputation in October 2014, during which Anita developed a vector-based version of the Game of Life in QGIS (see http://anitagraser.com/2014/11/16/more-experiments-with-game-of-life/).

Our implementation takes an object-oriented approach, in which an object of a Game of Life class is instantiated and the gaming board is updated with the cycle() method using the QGIS python console. The core function is the manipulation of individual raster cells based on a coded algorithm – in this case, the rules defined by the Game of Life.

Let’s start by initializing and cycling a gaming board using default parameters:

# Instantiate a starting board
x = GameofLife()

game-of-life_fig1a

# Cycle the board twice
x.cycle(2)

game-of-life_fig1

The gaming board may be initialized with a random raster, a filled raster, a custom raster, or from a pre-defined raster file:

# The default is a random raster, we can set the width and height as well
x = GameofLife(width=3,height=5)
# Cycle the board
x.cycle()

game-of-life_fig2

# Fill a cells object with 1s
y = Cells(inRaster=1)
# Create a raster with the filled cells object in the directory
y.toRaster("path\\to\\filledraster\\file.tif")
# Instantiate a starting board with the filled raster
x = GameofLife(raster="path\\to\\filledraster\\file.tif")
# Cycle the board
x.cycle()

game-of-life_fig3

# Generate a raster from a list of tuples
y=Cells(inRaster=[
(0,0,0,0,0,0,0,0),
(0,0,0,0,0,0,0,0),
(0,0,1,0,0,1,0,0),
(0,0,0,0,0,0,0,0),
(0,0,1,0,0,1,0,0),
(0,0,0,1,1,0,0,0),
(0,0,0,0,0,0,0,0),
(0,0,0,0,0,0,0,0)])
# Create a raster with the custom cells object in the directory
y.toRaster("path\\to\\customraster\\file.tif")
# Instantiate a starting board with the custom raster
x = GameofLife(raster="path\\to\\customraster\\file.tif")

game-of-life_fig3b

# Instantiate a starting board with a raster
x = GameofLife(raster="path\\to\\raster\\file.tif")

game-of-life_fig4a

Date source: City of Toronto Open Data [5]

Some other interesting features include changing animation speed, jumping cycles, and applying customized layer styles:

# Adjust delay to 3 seconds
x.speed=3
# Cycle 10 times normally
x.cycle(10)
# Cycle 5 times and display every 2nd cycle
x.cycle(5,2)
# Set the style to the defined qml file
x.style = “path\\to\\qml\\style\\file.qml”

This post focuses on the functionality of the program, while its inner workings can be grasped from comments in the Python source code posted at https://github.com/rwenite/QGIS_RasterArray. The code was written and tested for QGIS 2.6; feedback on any issues is most welcome. The use of a NumPy array to iterate through the grid cells was found in an answer by user “gene” on GIS StackExchange [6]. Reading and processing raster data does have its challenges. When dealing with large grids, reading raster data in blocks rather than as a whole is advisable, because there may not be enough RAM to store an entire file at once [7].

The aim of implementing the Game of Life with Python and QGIS is to demonstrate some fundamental concepts of raster data analysis and cellular automata modeling, both of which have important applications in Geography and GIS. Existing QGIS functionality and scripts for raster processing seem to focus more on low-level input/output operations than higher-level analysis functions. For example, we did not find advanced local and focal raster operations in QGIS’ raster calculator. Thus, we envision that the RasterArray code could serve as a basis for expanding raster analysis in QGIS. The code will also be used in a yet-to-be-written lab assignment in GEO641 “GIS and Decision Support” in Ryerson’s BA in Geographic Analysis program.

 

References:

[1] Wikipedia, Conway’s Game of Life
http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

[2] QGIS
http://www2.qgis.org/en/site/

[3] NumPy, Numerical Python
http://www.numpy.org/

[4] GDAL, Geospatial Data Abstraction Library
http://trac.osgeo.org/gdal/wiki/GdalOgrInPython

[5] Toronto Open Data, Regional Municipal Boundary
http://www.toronto.ca/open

[6] How to do loops on raster cells with python console in QGIS?
http://gis.stackexchange.com/questions/107996/how-to-do-loops-on-raster-cells-with-python-console-in-qgis

[7] Chris Garrard, Utah State University, Reading Raster Data with GDAL
http://www.gis.usu.edu/~chrisg/python/2008/os5_slides.pdf

 

Ryerson Geographic Analysis students put restaurants, airports, cities, and cropland on the map!

Blog post authored by Claus Rinner and Victoria Fast

In response to a recent lab assignment in GEO441 “Geographic information Science”, 49 second-year Geographic Analysis students selected a crowdmapping application and actively contributed valuable geographic information.

The most popular choice was the global OpenStreetMap initiative (http://www.openstreetmap.org). From updating the name and hours of their favourite restaurant or adding their local bank to a plaza, to identifying community gardens, adding a newly built hospital or geocoding new condos, the students used their local knowledge of the GTA to update and expand the freely accessible OpenStreetMap dataset.

sdiz-osm-changeset

For example, second-year Geographic Analysis student Stephanie Dizonno added a restaurant, George’s Pizza, to a set of businesses already represented along Toronto’s Dundas Street East.

ksmith-osm-airportSome of the more unusual edits were made by GEO441 student Kyle Smith, who is a recreational pilot. Kyle corrected and added key features to a local airport, such as a taxiway, the airport restaurant, and the apron, which we learned is the paved area used for aircraft parking. An essential part of his contribution was to update “crucial attribute data about the airport’s characteristics using the Canadian Flight Supplement,” writes Kyle.

In addition to OpenStreetMap, other students elected to contribute to Wikimapia, Cropland Capture, Night Cities, and the David Rumsey Map Collection. For example, instead of the point, line, polygon, and/or attribute data added to OpenStreetMap, the Cropland Capture online game (http://www.geo-wiki.org/games/croplandcapture/) has ‘players’ indicate whether or not a given satellite image includes agricultural land. Mooez Munshi highlights the relevance of his contribution: “The geographic data collected will help in building a map that shows all of the world’s cropland.”

dbocknek-historical-maps-overlay

Geographic Analysis student Daniel Bocknek elected to geographically reference a 100-year old map from the David Rumsey Map Collection (http://www.davidrumsey.com/view/georeferencer) showing the Aberfoyle area in Scotland. After identifying at least three control points on both the historic map and a contemporary basemap such as OpenStreetMap or Google Maps, the historic map is automatically geo-referenced and can be integrated with other GIS data as shown in Daniel’s screenshot above.

A similar approach is used by the Night Cities application (http://crowdcrafting.org/app/nightcitiesiss/) to geo-locate photographs of world cities taken at night by astronauts on board the ISS. In his GEO441 assignment, Navdeep Salooja explains that this project involves “citizen scientists”, like himself, in research about global night-time light pollution.

Overall, the 49 Ryerson students contributed important bits (and bytes) to the growing body of volunteered geographic information, while experiencing the broad applicability of geographic knowledge and principles of geographic information science to real-world issues.

Thought Spot – Crowdmapping of Mental Health and Wellness Resources

Thought Spot is a project designed by post-secondary students to support mental health and wellbeing among Toronto-area youth. The main feature is the online map at http://mythoughtspot.ca/, which is based on the Ushahidi crowdsourced mapping platform. The Thought Spot project was initiated at the Centre for Addiction and Mental Health (CAMH), in collaboration with the University of Toronto, OCAD, and Ryerson. The map allows students to find mental health and wellness resources in ­their geographic area, without the need for an intermediary (parent, teacher, physician). The mapped information originates from ConnexOntario and Kids Help Phone data as well as data that were crowdsourced from members of the target audience.

thoughspot-screenshot

Ryerson Master of Spatial Analysis (MSA) candidate Heather Hart took a lead role in designing the Thought Spot map (shown above), bringing unique geospatial expertise to the table of the project’s student advisory board. Through her MSA practicum placement with a different research group at CAMH, Heather got in contact with the Thought Spot team and brought the funding for her own summer position to Ryerson, to devote half of her time to ensuring that the project’s crowdmapping would be successful. Heather’s involvement culminated in co-organizing a Thought Spot hackathon at Ryerson’s Digital Media Zone in October 2014, which led to the ongoing development of a mobile version of the Thought Spot map.

photo-thoughtspot-heather

This photo shows Heather at GIS Day at Ryerson on November 19th, 2014, presenting the Thought Spot project to an interested University audience. In collaboration with Environmental Applied Science and Management PhD candidate Victoria Fast, Heather has now also submitted a conference abstract about “Crowd mapping mental health promotion through the Thought Spot project”. The abstract brings together Victoria’s extensive expertise in volunteered geographic information systems and Heather’s on-the-ground experience with the Thought Spot project. Their presentation at the annual meeting of the Association of American Geographers in April 2015 is part of the “International Geospatial Health Research” theme.

It is wonderful to see two enterprising Geography graduate students contribute to supporting mental health and wellbeing on campus, a goal that the University is committed to. At the same time, the Thought Spot project informs Heather’s thesis research on the role of maps in evidence-based health care decision-making and Victoria’s dissertation on crowdmapping of local food resources.

Toronto’s Traffic Lights Re-Visited and Animated

My map of Toronto’s traffic signals described in a post on April 4th, 2014, was recently published on the title page of Cartouche, the newsletter of the Canadian Cartographic Association (CCA). This is my first-ever published map that is stand-alone, not included in an article or other text document! Here is a screenshot of the newsletter title:

screenshot-cartouche-title-spring2014

Motivated by this unexpected outcome and using the occasion of the launch event of Maptime Toronto on May 29th, 2014, I wanted to try animating the dots representing the traffic signals. More precisely, each traffic light should iterate through a green-yellow-red sequence, and each mid-block pedestrian crossing should go through an off-blinking-off sequence. I was aiming for an animated GIF image with ten frames displayed in a continuous loop.

To create the colour sequences for each dot in QGIS, I copied the last digit of an existing  feature ID from the City of Toronto traffic signals data table into a new field to act as a random group assignment. Using a suggestion by Michael Markieta, I then created nine additional integer fields and cycled through the group numbers by adding 1. To keep these numbers in the 0…9 range, I used QGIS’ “modulo” function, e.g. Cycle1 = (“Cycle2” + 1) % 10. I then assigned the green, yellow, and red dot symbols from the static traffic lights map as a categorized “style” to different group numbers. Finally, I manually iterated the symbology through the ten group columns and took a screenshot each time. I put these together in the animated GIF shown below.

animation_25

I must admit that I am not super convinced of the outcome. Maybe, ten frames are not enough to overcome the clocked appearance of the traffic signal system. But at least, things are moving now :)

It is important to note that this animation does not show the real-time status of the traffic lights! In fact, there is only one dot for an entire intersection that would include two to four sets of vehicle traffic lights, plus pedestrian lights, etc. – all represented by the same green-yellow-red cycle on the map. I also made the assumption that the green and red phases are the same length (4 out of 10 ticks each, with the remaining 2 ticks used for the yellow phase). You will note that the mid-block crossings have an active phase with three on-off cycles followed by a longer off phase. In this case, it would be fancier to individually control each crossing and have it come on randomly.

 

Ryerson Geographers at the Upcoming CAG Meeting

Guest post by Dr. K. Wayne Forsythe:

The Canadian Association of Geographers (CAG) 2014 Annual Meeting will be held at Brock University from May 26-30. It is part of the larger 2014 Congress of the Humanities and Social Sciences.

A number of Ryerson Geographers are taking part. The papers and sessions are as follows:

1) TUE-08:30 POSTER SESSION – Physical Geography, Environmental Geography, Climate Change (Mackenzie Chown Complex C407). Posters will be displayed all day.

K. Wayne Forsythe, Meghan McHenry, Stephen J. Swales, Joseph M. Aversa, Daniel J. Jakubek, Ryerson University.
Bathymetric Visualization of Contaminated Sediments in Lake Ontario

2) TUE-13:30 Geographies of Health and Wellbeing I (Mackenzie Chown Complex D400).
Chair: Gavin J. Andrews, McMaster University

Eric Vaz, Ryerson University; Michael Cusimano, University of Toronto; Tony Hernandez, Ryerson University.
Spatial heterogeneity of self-reported health in Toronto: Exploratory analysis of anthropogenic land use phenotypes

3) TUE-15:30 Geographies of Health and Wellbeing II (Mackenzie Chown Complex D400).
Chair: Allison Williams, McMaster University

Peter Kedron, Rajiv Lalla, Adam Mckay, Ryerson University
A Study of Within Group Inequality in the Geographic Distribution of HIV/AIDS in Thailand

4) WED-10:30 Selling the City (Mackenzie Chown Complex D400).
Chair: Phillip Gordon Mackintosh, Brock University

Chris Daniel, Tony Hernandez, Ryerson University
Scale effects on retail co-location analysis

5) WED-13:30 Critical Legal Geographies (Mackenzie Chown Complex D303).
Sponsorship: Indigenous Peoples Working Group; Historical Geography Study Group; Social Justice Research Institute (SJRI), Brock University
Special Session Organizers: Vanessa Sloan Morgan, Dalhousie University; Laura Schaefli,
Queen’s University
Chair: Vanessa Sloan Morgan, Dalhousie University

Valentina Capurri, Ryerson University
The Chester Case: the Canadian Immigration Act and the interconnections between law and spatiality in the lives of immigrant applicants with disabilities

6) WED-15:30 Possibilities and Limits of Scholarly Activism In and Outside of the Classroom II: How to Bring Academy to Activism (Mackenzie Chown Complex C405).
Sponsorship: Social Justice Research Institute (SJRI), Brock University
Special Session Organizers: Ebru Ustundag, Brock University; Emily Eaton, University of Regina
Moderator: Ebru Ustundag, Brock University
Panelists:
Fran Klodawsky, Carleton University
Valentina Capurri, Ryerson University
Vanessa Sloan Morgan, Dalhousie University
Emily Eaton, University of Regina

7) THU-10:30 Urban Inequalities in Canadian and US Cities – Exploring the Interconnections among Housing, Food Insecurity, and Environmental Justice I: Exploring the Links Between Housing and Food Security (Mackenzie Chown Complex C405).
Sponsorship: Social Justice Research Institute (SJRI), Brock University
Special Session Organizers: Sutama Ghosh, Peter Kedron, Ryerson University
Chair: Peter Kedron, Ryerson University

Brian Ceh, Tony Hernandez, Ryerson University
Measuring food deserts and implications of local, independently-owned grocers on the food landscape: The case of Toronto, Ontario

Discussant: Sutama Ghosh, Ryerson University

8) THU-13:30 Urban Inequalities in Canadian and US Cities – Exploring the Interconnections among Housing, Food Insecurity, and Environmental Justice II: ‘Mapping’ Links Between Housing and Environmental Justice (Mackenzie Chown Complex C405)
Special Session Organizers: Sutama Ghosh, Peter Kedron, Ryerson University
Chair: Sutama Ghosh, Ryerson University

Victoria Fast, Ryerson University
Building collaboration into the Food Security Equation: Participatory Mapping of Local Food Systems using Volunteered Geographic Information (VGI)

Heather Hart, Peter Kedron, Ryerson University
Understanding the statistical bias of geographic scale in environmental inequity research

Cosmin Marmureanu, Ryerson University
Poverty, Housing, and Urban Forestry: Interrogating Intertwined Social and Environmental Justice in Toronto’s Inner Suburbs

Discussant: Peter Kedron, Ryerson University

9) FRI-15:30 Thinking About Learning (Mackenzie Chown Complex C407)
Chair: Dragos Simandan, Brock University

Rajiv Lalla, Ryerson University
Proximity to LGBT Social Resources as a proxy for defining Queer Communities in Ontario: A GIS Perspective


The presentations span the breadth of Geography, Environmental Studies and GIScience, and involve students/alumni from the Geographic Analysis and Master of Spatial Analysis (MSA) programs, in addition to students in the MAsc and PhD in Environmental Applied Science and Management. See you in St. Catharines!


K. Wayne Forsythe  Ph.D.
Professor, Program in Geographic Analysis, Graduate Program in Spatial Analysis, and President, Canadian Association of Geographers – Ontario Division (CAGONT)
Department of Geography, Ryerson University, 350 Victoria Street
Toronto, Ontario,  CANADA   M5B 2K3

http://www.geography.ryerson.ca/wayne/forsythe.htm

Infomap or Cartographic? My Take on Mapping Toronto’s Traffic Lights

Toronto writer/blogger Chris Bateman recently publicized a beautiful white-on-black map of all Toronto traffic lights, which was created by our very own Master of Spatial Analysis (MSA) student William Davis. Chris’ brief yet insightful post on blogTO can be found at http://www.blogto.com/city/2014/03/a_map_of_every_traffic_signal_in_toronto/. Inspired by William’s idea and the creative map designs by several MSA students in my cartography course in the fall semester, I thought I’d give the traffic lights map a try. Another trigger for my experiment was a comment from blogTO reader “Red Menace” about the traffic lights, complaining that “Most of them are red too.” Here is how I proceeded:

  1. Visit the City of Toronto’s open data catalogue, click on “GET THE DATA”, and find “Traffic Signals Tabular”. I would love to provide a direct link, but they changed URLs to include some lengthy session IDs, which I cannot post here – currently, http://toronto.ca/open still works as an entry point.
  2. Download “All traffic signals – CSV”, “Traffic signals with APS – CSV”, and “Pedestrian crossovers – CSV”. According to the readme file, APS refers to “active traffic signal enabled with sound (Accessible Pedestrian Signals)”. CSV is a tabular file format (Comma-Separated Values).
  3. Start the open-source geographic information system QGIS 2.2. In the Layer menu, use “Add Delimited Text Layer…” to open each of the three CSV files, discarding the first line and assigning the Longitude and Latitude fields to the x and y coordinates respectively.
  4. Upon preliminary display, change the coordinate reference system of the QGIS project to UTM Zone 17N and display all traffic signals as red dots, pedestrian crossovers as yellow dots, and sound-enabled signals as green dots.
  5. In QGIS’ print composer, add new map, rotate by +18 degrees, set background to black, and fiddle with map extent and scale until everything fits. Then export as image, et voila!

traffic_signals_10p

Click image to open larger version.
Contains information licensed under the Open Government Licence – Toronto. 

With red dots representing “normal” traffic lights, green dots overlaying those lights that are friendly to visually impaired pedestrians, and yellow dots showing the locations of mid-block crosswalks, my map focuses a bit more on conveying thematic information than on a fashionable graphic design. While I am afraid that design gurus (in particular our trend-setting students!) may sniff at it, I like to think of it as an “infomap” or “cartographic” (read: carto-graphic), analogous to the now ubiquitous “infographic”.

Update 10 April 2014: I want to share another version, in which I created a halo around the red and yellow dots by defining a semi-transparent, 1mm wide outline of the same colour.

traffic_signals_halos_zoom

Click image to open full version.
Contains information licensed under the Open Government Licence – Toronto.

Ryerson Geographers gearing up for Tampa

A record number of Geography faculty and graduate students are going to attend the Association of American Geographers (AAG) annual meeting 2014 in Tampa, Florida, next week. Here is the line-up of our research presentations (alphabetically by presenting author):

  1. David M Atkinson*, Paul Treitz, Neal Scott
    Modelling Biophysical Variables and Carbon Dioxide Exchange in Canadian Arctic Tundra Landscapes Using Remote Sensing Data
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=59749
  2. Harald Bauder*
    Possibilities of Open Borders and No Border
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=55376
  3. Brian Ceh*, Tony Hernandez
    A New Urbanism: Evidence from Canadian Cities
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57532
  4. Victoria Fast*
    Building a Virtual Climate Change Adaptation Community to Promote Urban Agriculture Initiatives
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=56481
  5. Wayne Forsythe*, Meghan McHenry, David M Atkinson, Joseph M Aversa, Stephen J Swales, Peter Kedron, Daniel J Jakubek
    Utilizing Bathymetry Data for the Geovisualization of Contaminated Sediment Patterns in the Laurentian Great Lakes of North America
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57372
  6. Christopher S. Greene*, Andrew A Millward
    Quality or quantity? Investigating the role of tree canopy density to moderate temperature in the urban microclimate
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57624
  7. Mary Grunstra*, Brian Ceh, Eric Vaz
    Spatial Distribution of Disinfection Byproducts in Drinking Water: Case of Ontario, Canada
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57534
  8. Claus Rinner, Heather Ann Hart*, Suzanne Kershaw, Cara Mirabelli, Elizabeth Lin, Alexia Jaouich
    The Role of Maps in Mental Health Care System Improvement and Policy Input
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57391
  9. Tony Hernandez*, Maurice Yeates
    E-Retail and the Future of the Canadian Mall
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=58108
  10. Peter Kedron*
    Firm Value-Chain Reorganization, Regional Industrial Transformation, and the Geography of Innovation in the Canadian Biofuel Industry
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=55919
  11. Bradley D Macpherson*
    A Web-based Visualization of Weighted Centrality Scores Using TileMill and MapBox
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57835
  12. Claus Rinner, Michael Markieta*, Kruti Desai, Marcy Burchfield, Rian Allen
    Widgets for Wicked Problems: The Neptis Geoweb Tool and Datasets
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57390
  13. Colleen Middleton*, Stephen Swales, Wayne Forsythe
    The Use of Geographical Information System (GIS) Analysis to Delimit a Protected Area for the Old-Growth Red Pine Forest in Wolf Lake, Temagami, Ontario, Canada
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=59344
  14. Andrew Allan Millward*, Michelle Blake
    The Potential for Perennial Vines to Mitigate Summer Warming of an Urban Microclimate
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57207
  15. Claus Rinner*, Duncan MacLellan, Krista Heinrich, Kathryn Barber
    Place-Based Policy-Making with Area-Based Composite Indices – Conceptual Challenges and Community Uptake of “Wellbeing Toronto”
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57736
  16. Vadim Sabetski*, Andrew Millward
    Virtual Daylighting: Documenting Urban Tree Root Locations Using Ground-Penetrating Radar (GPR)
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57576
  17. James W. N. Steenberg*, Andrew A. Millward
    Urban Forest Ecosystem Classification using City Neighborhoods
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57176
  18. Stephen Swales*, K. Wayne Forsythe
    Evaluation of the Geography of Demand in Canada Using Diverse Data Sources
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=58362
  19. Eric Vaz*, Brian Ceh
    A Spatial Analysis of the influence of urban centrality for the business landscape of Mumbai, India
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=57057
  20. Lu Wang*
    Exploring ethnic variations in healthcare access in Canada: a comparison among multiple ethnic groups
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=59028
  21. Shuguang Wang*, Tony Hernandez
    Conceptualizing Ethnic Retailing
    http://meridian.aag.org/callforpapers/program/AbstractDetail.cfm?AbstractID=55980

The presentations span the breadth of Geography, Environmental Studies, and GIScience, and involve students and alumni from the Master of Spatial Analysis (MSA), MAsc and PhD in Environmental Applied Science and Management, and PhD in Policy Studies. We are looking forward to meeting geographers from around the globe in Tampa!

Normalization vs. Standardization – Clarification (?) of Key Geospatial Data Processing Terminology using the Example of Toronto Neighbourhood Wellbeing Indicators

In geospatial data processing, the terms “normalization” and “standardization” are used interchangeably by some researchers, practitioner, and software vendors, while others are adamant about the differences in the underlying concepts.

Krista Heinrich, newly minted Master of Spatial Analysis (MSA) and a GIS Analyst at Esri Canada, wrote her MSA major research paper on the impact of variable normalization and standardization on neighbourhood wellbeing scores in Toronto. More specifically, within a SSHRC-funded research project on multi-criteria decision analysis and place-based policy-making, we examined the use of raw-count vs. normalized variables in the City of Toronto’s “Wellbeing Toronto” online tool. And, we explored options to standardize wellbeing indicators across time. Here is what Krista wrote about these issues in a draft of her paper:

In most analysis situations involving multiple data types, raw data exist in a variety of formats and measures, be it monetary value, percentages, or ordered rankings. This in turn presents a problem of comparability and leads to the requirement of standardization. While Böhringer, & Jochem (2007), emphasize that there is no finite set of rules for the standardization of variables in a composite index, Andrienko & Andrienko (2006) state that the standardization of values is a requirement.

Several standardization techniques exist including linear scale transformations, goal standardization, non-linear scale transformations, interval standardization, distance to reference, above and below the mean, z scores, percentage of annual differences, and cyclical indicators (Dorini et al, 2011; Giovanni, 2008; Nardo et al., 2005; Malczewski, 1999).  It should be noted however, that there is inconsistency among scholars as to the use of terms such as normalization and standardization.

While Giovannini (2008) and Nardo et al. (2005) categorize standardization solely as the use of z-scores, they employ the term normalization to suggest the transformation of multiple variables to a single comparable scale. Additionally, Ebert & Welsch (2004) refer to Z score standardization as the definition of standardization and place this method, along with the conversion of data to a 0 to 1 scale, referred to as ‘ranging’, as the two most prominent processes of normalization. According to Ebert & Welsch (2004), “Normalization is in most cases a linear transformation of the crude data, involving the two elementary operations of translation and expansion.” In contrast, other scholars classify the transformation of raw values to a single standardized range, often 0.0-1.0, as standardization (Young et al., 2010A; Malczewski, 1999; Voogd, 1983) while Dailey (2006), in an article for ArcUser Online, refers to the normalization of data in ArcMap as the process of standardizing a numerator against a denominator field. […]

In this paper, we employed the term standardization to define the classification of raw values into a single standardized scale and in particular, through the examination of linear scale transformations and their comparison with Z score standardization.  The term normalization is used in this paper to describe the division of variables by either area or population, as is referred to by Dailey (2006), therefore regularizing the effect that the number of individuals or the size of an area may have on the raw count values in an area. “

In other words, the way we use the two terms, and the way we think they should be used in the context of spatial multi-criteria decision analysis and area-based composite indices, standardization refers to making the values of several variables (indicators, criteria) comparable by transforming them to the same range of, e.g.,  0-to-1. In contrast, normalization refers to the division of a raw-count variable by a reference variable, to account for different sizes of enumeration areas.

Unfortunately, I have to admit that in my cartography course, following the excellent textbook by Slocum et al. (2009), I am using the term “standardization” for the important concept of accounting for unit sizes. For example, choropleth maps should only be made for standardized (i.e., normalized!) variables, never for raw-count data (a great rationale for which is provided at http://www.gsd.harvard.edu/gis/manual/normalize/).  Furthermore, high-scoring blog posts at http://www.dataminingblog.com/standardization-vs-normalization/ and http://www.benetzkorn.com/2011/11/data-normalization-and-standardization/ define normalization as the rescaling to the 0-to-1 range (our definition of standardization) and standardization as the z-score transformation of a variable. Oops, did I promise clarification of these terms ?-)

In case you are wondering about Krista’s results regarding the Wellbeing Toronto tool: It depends! She discusses an example of a variable where normalization changes the spatial patterns dramatically, while in another example, spatial patterns remain very similar between raw-count and normalized variables. Standardization was used to make wellbeing indicators from 2008 comparable to those from 2011, as we will report at the Association of American Geographers (AAG) annual meeting in April 2014. Our abstract (URL to be added when available) was co-authored by Dr. Duncan MacLellan (Ryerson, Politics and Public Admin department), my co-investigator on the above-mentioned research grant, and Kathryn Barber, a student in Ryerson’s PhD in Policy Studies program.

Research Plans for GeoThink Theme 4: “Open Everything”

I wrote the following blog post for the Web site of our 2013-2018 SSHRC Partnership Grant on “How the Geospatial Web 2.0 is Reshaping Government-Citizen Interactions”, also known as “GeoThink”. The post first appeared at http://geothink.ca/open-everything/.

Hello, I am Dr. Claus Rinner, an Associate Professor in the Department of Geography and program director of the Master of Spatial Analysis (MSA) at Ryerson University. My research focuses on the decision support function of maps and geographic information systems (GIS), and the underlying concepts of cartography, geovisualization, public participation, and multi-criteria decision analysis. I plan to contribute to the GeoThink research partnership through students at all levels of study.

Edgar Baculi, a second-year undergraduate student in Ryerson’s BA in Geographic Analysis, is co-funded by Geothink and the Ontario work-study program. Edgar started an exploration of the City of Toronto’’s open data portal, toronto.ca/open, with attention to the data formats and data types available for download. He found that 91 of Toronto’’s 133 open datasets have a geospatial component. About one half of these are available in ESRI’’s shapefile format. Edgar plans to extend his contents analysis to the open data catalogues of other municipal partners of GeoThink. This complements a planned longitudinal survey of municipal open data initiatives by two other GeoThink researchers, Dr. Peter Johnson and Dr. Pamela Robinson, within Theme 4. Edgar will also start to examine the demand side of open data in terms of their use by local journalists in news reporting and by Ryerson professors in Geography classes and GIS labs.

Together with Dr. Pamela Robinson of Ryerson’’s School of Urban and Regional Planning, I am also collaborating with the Neptis Foundation, a key GeoThink partner. With funding from Neptis, incoming MSA student Michael Markieta has upgraded and installed the Neptis Geoweb tool on a Ryerson server for use in research and by other GeoThink partners. The tool includes a mapping interface with a rich collection of datasets for the Toronto region, including a settlement development layer that Neptis combined from the individual land-use plans of dozens of Ontario municipalities. The tool also includes a discussion forum, and Michael’’s Master’’s research will examine the analytical and decision support function of such participatory Geoweb tools.

My PhD student Victoria Fast will also be involved in the GeoThink project. Victoria recently presented a novel framework for understanding volunteered geographic information (VGI) through a ““systems perspective”” (http://digitalcommons.ryerson.ca/geography/47/). On this basis and a survey of existing VGI projects, Victoria wants to outline a path for effective deployment of the Neptis Geoweb tool in climate change adaptation planning, an important consideration for municipalities and regions worldwide.

If you’ would like to participate in research around mapping tools for land use planning and decision support, open data formats, implications of participatory mapping for news media, or tools for urban and regional climate change adaptation, please contact me at crinner at ryerson dot ca.

Geographic Analysis student makes a splash with global flight maps

Ryerson University’s graduating Geographic Analysis and incoming Master of Spatial Analysis (MSA) student, Michael Markieta, is making a splash in the UK and North-American media with his beautiful maps of global flight connectivity.

On May 23rd, the UK Daily Mail asked “Can you spot your holiday? The incredible images that reveal exactly where we fly every day” (http://www.dailymail.co.uk/sciencetech/article-2329443/The-incredible-images-reveal-fly-New-images-worlds-flight-paths.html). The next day, the Toronto Star picked up the map images and wrote “Ryerson student produces stunning images of every flight in the world. Our highly interconnected world becomes apparent in a project mapping all the flight paths on the planet” (http://www.thestar.com/news/gta/2013/05/24/ryerson_student_produces_stunning_images_of_every_flight_in_the_world.html).  Metro News Toronto included one of the maps and a short text entitled “Have a visually nice flight” in their May 24th print edition. On May 27th, BBC News posted the series of nine global flight paths visualizations (http://www.bbc.co.uk/news/in-pictures-22657086), followed by a collection of “Five interpretations” by an art critic, environmentalist, aviation consultant, data visualization expert, and philosopher (http://www.bbc.co.uk/news/magazine-22690684). Fox News has published yet another perspective on “Amazing images show airline flight paths across the globe” (http://www.foxnews.com/travel/2013/05/29/amazing-images-show-airline-flight-paths-across-globe/).

Michael first created maps from the OpenFlights airport and airline route databases in September 2011 for his personal blog at http://www.spatialanalysis.ca/2011/global-connectivity-mapping-out-flight-routes/. On his parttime position with global transportation planning and engineering firm Arup’s Toronto office, he redesigned the maps, which were first posted on Arup’s online magazine at http://www.arupconnect.com/2012/12/14/global-flight-paths/.

It is no surprise that a graduate of Ryerson’s Geography department is able to produce intriguing visualizations of a large geospatial dataset. The same data have been mapped by others, and there are alternative ways to look at air traffic, including live mapping of actual flight routes and airplane positions. The journalists reporting on Michael’s maps have somewhat exaggerated the practical uses of such maps, e.g. for communicable disease tracking. However, the blog post by James Cheshire, a lecturer at University College London (UK), on “What’s so Great About a World Flight Paths Map?” at http://spatial.ly/2013/05/great-world-flight-paths-map/ explains three elements that make Michael Markieta’s work so appealing and popular (with the BBC news approaching 15,000 social media shares at the time of my last update, see screenshot below).

markieta-arup-maps_shared-on-BBC