- First, I attended Adam Crymble's masterclass at the IHR on how to use Python to extract keywords from a text and geo-code the places. The lesson is on his Programming Historian - http://programminghistorian.org/lessons/extracting-keywords
- The second is Mauricio Giraldo Arteaga's tutoral for the New York Public Library on creating online interactive maps using geojson with Leaflet and Mapbox Studio: http://www.nypl.org/blog/2015/01/05/web-maps-primer
It took me a couple of weekends to get through the latter, and I finally achieved this result, with a little more tweaking and reading the Leaflet tutorials to work out how to layer more than one map on top of each other: http://protesthistory.org.uk/mcr1794trial.html
|locations of United English delegates, 1799-1801, plotted on Green's 1794 map of Manchester & MapBoxStudio map|
What's been my experience of following these tutorials?Good points:
The tutorials are great - and both Adam's programming historian tutorial and the NYPL tutorial take you step by step through everything you need to do a specific task.
However, therein lies the quandry for such tutorials that take you through making something. People like me probably fall into difficulties when instructions in some tutorials aren't clear - i.e. telling you to insert a line of code without showing exactly where it should go. We don't understand the whole language of the code, so attempting to do something different causes problems.
Tutorial writers - Please show all steps of the code in a picture or a video, rather than leaving it to us to work out what the end result looks like! So when you've instructed, 'Take out the middle bit of that code you've just copied, and replace the first half of it with this...', we want to see what that looks like. This especially seems to be the case regarding indents in Python, which is where some of the participants in the IHR workshop stumbled.
I also get confused when they skip over the *reasons* why all the steps are necessary or what they actually do. It's like learning a foreign language by learning set phrases but without going through all the grammar or explaining the parts in the sentence that are grammar. This makes it hard to change the code to fit what you want to do. So you might learn 'Ich möchte einen Apfel', but then don't know how to say 'I don't want an orange' in the same language.
Most tutorials use a case study or set piece to work on, but often when you then want to adapt it to your own work (in my case historical maps and geographical data), and it's then when you come into problems. For example, I successfully completed the NYPL tutorial, which uses historic Bogota as its case study, and (testimony to how good it is), I also managed to do the same with my 19th century Manchester maps and data. However, it only showed me how to have separate layers of basemaps, like so:
But I wanted to know how to have both maps showing at the same time (i.e. the 1794 map layered on top of the contemporary map), and the instructions didn't do this. So I then had to appeal to twitter, and kind digital geographers pointed me to the right section on the Leaflet helppages. It then took another half hour of experimentation until I'd got the code right (moving the 1794 map from being a basemap to an overlay).
Here are the webpages and services used in the mapping:
- http://geojson.io/ - for testing the geojsoncode
- https://www.mapbox.com/studio/ - for creating a modern basemap
- https://api.mapbox.com/mapbox.js/v.2.3.0/mapbox.css and https://api.mapbox.com/mapbox.js/v.2.3.0/mapbox.js - for the CSS and JS for the modern map
- http://leafletjs.com/examples.html - Leaflet tutorials