/DTYEG

Tutorial for the UofA HUCO Can You Dig It? 2014 conference

DTYEG

Mapping Tutorial for Can You Dig It 2014

===================================

Part of the Can You Dig It? 2014 Digital Humanities Conference at the UofA

We will be using CartoDB as the mapping tool for this tutorial, so please, while we get going, head on over and sign up for a free account.

This mapping tutorial has 4 components that cover three seperate platforms:

  1. Open Street Map
  2. GitHub as a spatial data platform
  3. CartoDB - points and polygons
  4. CartoDB - temporal points

We will be using OSM data, in conjunction with open data from the City of Edmonton for this mapping project.

Also, you may want to reference my blog on How to make a web map.

Open Street Map

OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world. Two major driving forces behind the establishment and growth of OSM have been restrictions on use or availability of map information across much of the world and the advent of inexpensive portable satellite navigation devices. OSM offers a couple of advantages:

  1. It is open sourced, so;
  2. The data is freely available;
  3. OSM Regional Extracts can be found here
  4. OSM City Extracts can be found here

OSM iD Editor

The OSM iD Editor makes it easy to add spatial data. I am not going to play this video here, but please reference back to this either later today, when there is a break, or later later.

MapBox has a great introduction to iD Editor.

GitHub

GitHub is a web-based hosting service for software development projects that use the Git revision control system.GitHub offers both paid plans for private repositories, and free accounts for open source projects. The site provides social networking functionality such as feeds, followers, wikis and the social network graph to display how developers work on their versions of a repository. Git also offers an easy way to store and visualise spatial data. We will explore more on this later.

The data that we will be working with are stored on GitHub as it offers an easy way to manage and visualise spatial data sets.

Please have a look at and download the following data from Edmonton's downtown (Ward 6) onto your desktop. The data are in the GitHub header, and we will do this together as I would like to show a couple of things.

You may choose to dump them into an unique folder:
<ol>
	<li>Buildings. Data from OpenStreetMap.</li>
	<li>Trees. Data from City of Edmonton.</li>
</ol>

Open Data

"Open data is the idea that certain data should be freely available to everyone to use and republish as they wish, without restrictions from copyright, patents or other mechanisms of control." (from Wikipedia)

The City of Edmonton's open data portal is run a Socrata, also a mapping platform, and currently contains about 240 data sets. While I think that the portal is great, it does not have any really high value data on it. So, you should registr as a user, and request data sets.

CartoDB - Points and Polygons

With the goal of being 'open', I ripped most of this tutrial from CartoDB's tutorial pages. Also, look for CartoDB on Vimeo as they have some useful video tutorials.

Summary

This tutorial will walk you through the basics of CartoDB. It is meant for beginners looking to get started using the platform but still uncertain where to begin. It is also a good tutorial to read through if you just want to know some basic functionality to get started.

Creating a new table

Uploading your own data is easy. CartoDB accepts many common data formats such as CSV, Excel, ESRI Shapefiles, and GPX files. If you use SHP files, be sure to create a ZIP archive of all associated files (.shp, .prj, .dbx, etc) and upload the zip with all the files at once. To upload any supported file, either drag it directly onto the dashboard page of your CartoDB account, or click the Create your first table button, click 'select a file' and locate the file on your system, finally click 'Create table'.

Uplaod both the trees and buildings files.

Creating a map

So now you have datasets you are interested in mapping. Start by selecting the Map view, above your table. A map will appear, and your data will be rendered with the default styles. Okay! Points and polygons on a map, mission accomplished. Play with map views on both tables.

Our first map

Not so quick, let's look around. You can see above the map an option for changing the baselayer of your map. This won't change your data, but it sure can change how your data looks. Click on it and test some of the basemaps we provide as options.

Now let's explore some more options for map customization. To the right of the map you can see a toolbar with several buttons.

Almost at the top is the SQL option which allows you to perform SQL queries on your tables. This is not for us now, but CartoDB offers a tutorial on that.

The next button is the Style option which gives you a menu for controlling the look of your visualizations. In this example, we can use options in the menu to change the fill color, width, stroke, labelling, etc. Play around with some of the settings to see what they do. By clicking the button again, you can close the interface and go back to seeing just your map.

Customization

Next is the Infowindow option, for customizing the contents of the infowindows that are shown when you click your data on the map. You can modify the style of the infowindow and the information that is shown. You can reorder the list of fields in your infowindows by simple drag & drop of the field names in the menu.

Take your time playing with the options until you get familiar how map customization works in CartoDB.

Visualize your map

When you want to visualize different datasets or just share the map, you must create a visualization. Visualizations are where you will set and store all the filters and styles that you want to use in your published maps. Visualizations also let you add layers from multiple maps, mixing the data without having to write any complex code or queries. They also let you reuse data from the same tables in multiple visualizations without any difficulty.

To combine and visualise your two tables, select one map to work from, and simply click the "+" button at the top of the sliding menu drawer and select your other table.

Visualizations are similar to tables, you can quickly tell them apart by looking at the icon beside the table name and the visualization name in the Table View. Now that you have created your visualization, it will be available on your dashboard.

Publish your map

Now that you have a Visualization just the way you want it, let's share it with some friends. Click the green Publish button in the top right of the page. From here you can customize how your published map is presented, including zoom and center, which interface elements to display, toggling layers, social media links, etc. At the bottom you will find a URL to share your Visualization via Twitter, email, or anywhere else. When you share that link, viewers will only be able to explore it on the map, they will not be able to edit any of your data. For more details, take a look at next tutorial. publish map

Torque

If we have some time, we can play with Torque, an easy way to visualise time series data.