files supporting the OLITA Digital Odyssey 2015 Workshop on consuming Open Data
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

OLITA Digital Odyssey 2015: Consuming and Transforming Open Data - a hands-on tutorial

Who are you?

I'm Mita Williams. I'm the UX librarian from the University of Windsor. I am copystar on twitter.

Where am I?

Good question. If I gave you directions here, I would tell you we are at 51 Dockside Dr, Toronto, ON M5A 1B6.

But if I wanted to describe the location as a point on a map, I might describe the same location using latitude and longitude: 43° 38' 39.2706", -79° 21' 55.4508" You would read the above as "43 degrees, 38 minutes and 39.2706 seconds, negative 79 degrees, 21 minutes and 55.4508 seconds".

While it’s interesting that we describe a place using units of time (, its also confusing and somewhat unwieldy. So let's describe the same place using longitude and longitude but using decimal degrees instead of minutes and seconds. There are a number of conversion tools available online to do this : 43.644242, -79.365403

What if I wanted to tell people where the 102 library branches the TPL are in the city?

You could make a map using Google Maps of all the TPL Library branches:

How could I make this map?

First you will need the locations of all 102 branches of the Toronto Public Library. These are provided by the City of Toronto from their Open Data Catalogue at:

These location files are in .kml which is a notation for XML that first made popular by Google Earth before becoming standardized. Google Mapping Products happily use kml files. Look at to see how the locations are described:

<Placemark id="LIB02">
Address: 155 Bonis Ave., Toronto, ON, M1T 3W6<br/>Link:
<address>155 Bonis Ave., Toronto, ON, M1T 3W6</address>

Notice that the point coordinates are in the format longitude, latitude. Some geoformats are long, lat and others are long, lat. This makes everyone sad.

Also note that the data in the City of Toronto Data catalogue is out of date. The site provides the location of Library Branch Locations ( and Future Library Branch Locations ( but all the future branches have now opened.

I have already combined these files together into a new file called:

It's also available on drive at:

Task 1: Make a map using the kml file provided

If you get stuck, please put a post-it note on your laptop

Using Google Map

  • create account if you don't already have a Gmail account
  • click on Import Map in top left hand menu (or My Maps -> Create map in some Google Maps UIs)
  • upload
  • explore changing the map features if you would like

Using CartoDB

  • create account if you don't already have a CartoDB account
  • click on Create Map; select Map View at the top of the screen
  • click on the '+' or Add Layer option at the top of the right side menu
  • upload
  • explore changing the map features if you would like

Using Mapbox

  • create account if you don't already have a Mapbox account
  • click on the Data tab at the top right hand corner of the screen; click on import
  • upload
  • select map features if you would like then click on Import Features
  • explore changing the map features if you would like

Bonus challenge: Using Leaflet and Openstreetmap tiles

If you are comfortable with HTML and JavaScript, try making a map from scratch using Leaflet.js ( to attach a set of points to a map made of tiles provided by OpenStreetMap.

You will first need to convert your kml file into GeoJSON. GeoJSON is a file format that is easily digestable by JavaScript. There are many tools that can do this but for this exercise try

      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
      "properties": {
        "name": "Albert Campbell",
        "description": "Address: 496 Birchmount Road, Toronto, ON, M1K 1N8<br/>Link:"

Task 2 : Add the dimension of time

While our map of the Toronto Public Library branches is informative, it can become complex and interesting if we add more the year of establishment to each branch. Doing so will allow the reader to learn the rate of the TPL growth and where this growth occurred. We do have a problem though. The Open Data Catalogue from the City of Toronto does not provide this information.

A list of TPL Branches that does include year of opening can be found on Wikipedia: but this table does not provide the addresses nor the geolocations of each branch.

Combine the kml file with the Wikipedia table of TPL branch opening dates using Google Fusion Tables

Google Fusion Tables is a Google product that adds visualization to structured data. Alternatively, these data tables could be combined using command-line tools or using services such as CartoDB.

First we will import our file

Then we are going to add the Wikipedia Table to our kml file

You can try to import the Wikipedia table into Google Fusion Tables...

  • open the File menu and select Find a table to merge with
  • a window with the heading, *Merge: Select a Table" should pop-up
  • from 'Suggest tables matching on' dropdown menu, select 'name'
  • select the table List of Toronto Public Library branches - Wikipedia in the list and then next
  • you will be asked to confirm the match; click next
  • select all fields to be merged; click next
  • you should have a new merged table of both data tables
  • go to the tab of the Map of Geometry
  • from the File menu, select Download as kml

###... but if that doesn't work, import the Wikipedia table this way...

###... and if all else fails...

Task 3 : Let's make a time map (again!)

You should now have a downloaded kml file of the 102 branches that now includes the year of opening. If not, use this file

We are now going to create an animation of this branch openings using

  • create account if you don't already have a CartoDB account
  • click on Create Map; after the information screen, select Connect Dataset from the Dataset page
  • select and upload upload Merge-of-TPL-Library-Branches-and-Wikipedia.kml
  • click on green Connect dataset button at the bottom of the screen
  • select Data View at the top of the screen
  • under the Built column, mouse over the word string; then pull down the menu to select number; confirm the action
  • select Map View at the top of the screen
  • from the right hand menu, click on the paintbrush icon (wizards)
  • from the list of visualizations, click on the right arrow until you see and select the option Torque
  • from the next line, activate on the Cumulative switch
  • from the next line, select built from the drop down menu for the Time Column
  • an animation should begin in the main map screen
  • explore changing the map features if you would like

Here be dragons.

This presentation is cc0. The data provided falls under the Open Government License - Toronto: