Maps — Lightening talk at Hacks/Hackers MCR

09 December 2014

I did a quick introduction to digital maps at Hacks/Hackers Manchester in November. Here’s the instructions and links for reference.

Geocoding

A quick and simple process for getting the latitude and longitude for a column of addresses.

  1. New Google spreadsheet – Columns: Location, lat, lon
  2. Tools->Script Editor
  3. “Create new project”
  4. “Blank Project”
  5. Paste in this script – https://gist.github.com/robertocarroll/a819e8b625d73068bc15
  6. Publish->Deploy as Web App
  7. Spreadsheet -> select rows -> Macros-> Geocode Selected Cells Worldwide
  8. Each address should now have co-ordinates

Export

Geojson is a good format for the data. It is flexible and allows you to add your own data to the structure. It’s quite easy to read, but it can be inefficient with large data sets and polygons (consider Topojson if project can work with modern browsers <IE8)

To export:

  1. Tools -> Script Editor
  2. “Create new project”
  3. “Blank Project”
  4. Paste in this script -https://raw.githubusercontent.com/mapbox/geo-googledocs/master/MapBox.js
  5. Publish->Deploy as Web App
  6. Spreadsheet -> select rows -> Geo -> Export

Display

  1. Try using http://geojson.io
  2. Cut and paste the geojson data exported above into the text window.
  3. Your points will appear on the map
  4. Table view is good to see and scan your data
  5. Use Github pages – free hosting and version control. Update the data using http://geojson.io
  6. Lots of ways to customise how the map looks and behaves, eg Tilemill (no programming skill required) or Mapbox JavaScript API (you need to know some JavaScript)

Tutorials

Data sources

Interesting examples

Digital maps tend to follow certain formats, but these examples show different and interesting approaches: