“Shaving the yak” is a phrase used to describe the process of programming. It alludes to the fact that you often have to take two, or more, steps backward in order to eventually move one step forward. You want a sweater, so first you need to get some yarn, but to do that you have to… and eventually you find yourself shaving a yak. The reason why you even consider shaving a yak is that, once you’ve shaved said yak, you now have lots of yarn, which allows you to make many sweaters. This colorful analogy has a surprising number of online images, and even an O’Reilly book. It’s a thing.

I have been doing a lot of digital yak-shaving over the past four months. Come to think of it, most of my blog posts consist of yak shaving.

So if you’re interested in learning to code with Python but not sure whether it’s worth it, or if you just want to read an overview of how I used Python and QGIS to create a map like this from a big Word document, then continue reading.

So let’s say you’ve become obsessed with GIS (geographical information systems). And let’s also posit that you’re at a teaching institution, where you rotate teaching your twelve different courses plus senior seminars (three to four sections per semester) over multiple years, which makes it difficult to remember the ins-and-out of all those historical narratives of European history from the 14th century (the Crusades, actually) up through Napoleon – let’s ignore the Western Civ since 1500 courses for now. And let’s further grant that you are particularly interested in early modern European military history, yet can only teach it every other year or so.

So what’s our hypothetical professor at a regional, undergraduate, public university to do? How can this professor possibly try to keep these various periods, places and topics straight, without burdening his (errr, I mean “one’s”) students with one damned fact after another? How to keep the view of the forest in mind, without getting lost among the tree trunks? More selfishly, how can one avoid spending way too much prep time rereading the same narrative accounts every few years?

Why, visualize, of course! I’ve posted various examples before (check out the graphics tag), but now that GIS makes large-scale mapping feasible (trust me, you don’t want to manually place every feature on a map in Adobe Illustrator), things are starting to fall in place. And, in the process, I – oops, I mean our hypothetical professor – ends up wondering what historical research should look like going forward, and what we should be teaching our students.

I’ll break my thoughts into two posts: first, the gritty details of mapping the Italian Wars in GIS (QGIS, to be precise); and then a second post on collecting the data for all this.

So let’s start with the eye-candy first – and focus our attention on a subject just covered in my European Warfare class: the Italian Wars of the early 16th century (aka Wars of Italy). I’ve already posted my souped-up timechart of the Italian Wars, but just to be redundant:

Italian Wars timechart

That’s great and all, but it really requires you to already have the geography in your head. And, I suppose, even to know what all those little icons mean.

Maps, though, actually show the space, and by extension the spatial relationships. If you use PowerPoint or other slides in your classes, hopefully you’re not reduced to re-using a map you’d digitized in AutoCAD twenty years earlier, covering a few centuries in the future:

Instead, you’ve undoubtedly found pre-made maps of the period/place online – either from textbooks, or from other historian’s works – Google Images is your friend. You could incorporate raster maps that you happen across:

Maybe you found some decent maps with more political detail:

Maybe you are lucky enough that part of your subject matter has been deemed important enough to merit its own custom map, like this digitized version of that old West Point historical atlas:

If you’re a bit more digitally-focused, you probably noticed a while back that Wikipedia editors have started posting vector-based maps, allowing you to open them in a program like Adobe Illustrator and then modify them yourself, choosing different fills and line styles, maybe even adding a few new features:

Now we’re getting somewhere!

But, ultimately, you realize that you really want to be your own boss. And you have far more questions than what your bare-bones map(s) can answer. Don’t get me wrong – you certainly appreciate those historical atlases that illustrate Renaissance Italy in its myriad economic, cultural and political aspects. And you also appreciate the potential of the vector-based (Adobe Illustrator) approach, which allows you to add symbols and styling of your own. You can even search for text labels. Yet they’re just not enough. Because you’re stuck with that map’s projection. Maybe you’re stuck with a map in a foreign language – ok for you, but maybe a bit confusing for your students. And what if you want to remove distracting features from a pre-existing map? What if you care about what happened after Charles VIII occupied Naples in early 1495? What if you want to significantly alter the drawn borders, or add new features? What if you want to add a LOT of new features? There are no geospatial coordinates in the vector maps that would allow you to accurately draw Charles VIII’s 1494-95 march down to Naples, except by scanning in another map with the route, twisting the image to match the vector map’s boundaries, and then eye-balling it. Or what if you want to locate where all of the sieges occurred, the dozens of sieges? You could, as some have done, add some basic features to Google Maps or Google Earth Pro, but you’re still stuck with the basemap provided, and, importantly, Google’s (or Microsoft’s, or whoever’s) willingness to continue their service in its current, open, form. The Graveyard of Digital History, so very young!, is already littered with great online tools that were born and then either died within a few short years, or slowly became obsolete and unusable as internet technology passed them by. Among those online tools that survive for more than a five years, they often do so by transforming into a proprietary, fee-based service, or get swallowed up by one of the big boys. And what if you want to conduct actual spatial analysis, looking for geospatial patterns among your data? Enter GIS.

So here’s my first draft of a map visualizing the major military operations in the Italian peninsula during the Italian Wars. Or, more accurately, locating and classifying (some of) the major combat operations from 1494 to 1530:

Pretty cool, if you ask me. And it’s just the beginning.

How did I do it? Well, the sausage-making process is a lot uglier than the final product. But we must have sausage. Henry V made the connection between war and sausage quite clear: “War without fire is like sausages without mustard.”

So to the technical details, for those who already understand the basics of GIS (QGIS in this case). If you don’t know anything about GIS, there are one or two websites on the subject.

I’m using Euratlas‘ 1500 boundaries shapefile, but I had to modify some of the owner attributes and alter the boundaries back to 1494, since things can change quickly, even in History. In 1500, the year Euratlas choose to trace the historical boundaries, France was technically ruling Milan and Naples. But, if you know your History, you know that this was a very recent change, and you also know that it didn’t last long, as Spain would come to dominate the peninsula sooner rather than later. So that requires some work fixing the boundaries to start at the beginning of the war in 1494. I should probably have shifted the borders from 1500 back to 1494 using a different technique (ideally in a SpatiaLite database where you could relate the sovereign_state table to the 2nd_level_divisions table), but I ended up doing it manually: merging some polygons, splitting other multi-polygons into single polygons, modifying existing polygons, and clipping yet other polygons. Unfortunately, these boundaries changed often enough that I foresee a lot of polygon modifications in my future…

Notice my rotation of the Italian boot to a reclining angle – gotta mess with people’s conventional expectations. (Still haven’t played around with Print Composer yet, which would allow me to add a compass rose.) More important than being a cool rebel who blows people’s cartographic preconceptions, I think this non-standard orientation offers a couple of advantages. First, it allows you to zoom in a bit more, to fit the length of the boot along the width rather than height of the page. More subtly, it also reminds the reader that the Po river drains ‘down’ through Venice into the Adriatic. I’m sure I’m not the only one who has to explicitly remind myself that all those northern European rivers aren’t really flowing uphill into the Baltic. (You’re on you own to remember that the Tiber flows down into the Tyrrhenian Sea.) George “Mr. Metaphor” Lakoff would be proud.

I converted all the layers to the Albers equal-area conic projection centered on Europe, for valid area calculations. In case you don’t know what I’m talking about, I’ll zoom out, and add graticules and Tissot’s indicatrices, which illustrate the nature of the projection’s distortions of shape, area and distance as you move away from the European center (i.e. the main focus of the projection):
And in case you wanted my opinion, projections are really annoying to work with. But there’s still room for improvement here: if I could get SpatiaLite to work in QGIS (damn shapefiles saved as SpatiaLite layers won’t retain the geometry), I would be able to re-project layers on the fly with a SQL statement, rather than saving them as separate shapefiles.

I’m still playing around with symbology, so I went with basic shape+color symbols to distinguish battles from sieges (rule-based styling). I did a little bit of customization with the labels – offsetting the labels and adding a shadow for greater contrast. Still plenty of room for improvement here, including figuring out how to make my timechart symbols (created in Illustrator) look good in QGIS.
After discovering the battle site symbol in the tourist folder of custom markers, it could look like this, if you have it randomly-color the major states, and include the 100 French battles that David Potter mentions in his Renaissance France at War, Appendix 1, plus the major combats of the Italian Wars and Valois-Habsburg Wars listed in Wikipedia:
Boy, there were a lot of battles in Milan and Venice, though I’d guess Potter’s appendix probably includes smaller combats involving hundreds of men. Haven’t had time to check.

I used Euratlas’ topography layers, 200m, 500m, 1000m, 2000m, and 3500m of elevation, rather than use Natural Earth’s 1:10m raster geotiff (an image file with georeferenced coordinates). I wasn’t able to properly merge them onto a single layer (so I could do a proper categorical color ramp), so I grouped the separate layers together. For the mountain elevations I used the colors in a five-step yellow-to-red color ramp suggested by ColorBrewer 2.0.

I saved the styles of some of the layers, e.g. the topo layer colors and combat symbols, as qml files, so I can easily apply them elsewhere if I have to make changes or start over.

You can also illustrate the alliances for each year, or when they change, whichever happens more frequently – assuming you have the time to plot all those crazy Italian machinations. If you make them semi-transparent and turn several years’ alliances on at the same time, their overlap with allow you to see which countries switched sides (I’m looking at you, Florence and Rome), vs. which were consistent:

Plotting the march routes is also a work in progress, starting by importing the camps as geocoded points, and then using the Points2One plugin to connect them up. With this version of Charles’ march down to Naples (did you catch that south-as-down metaphor?), I only had a few camps to mark, so the routes are direct lines, which means they might display as crossing water. More waypoints will fix that, though it’d be better if you could make the march routes follow roads, assuming they did. Which, needless to say, would require a road layer.

Not to mention applying spatial analysis to the results. And animation. And…

Three years into my graduate school experience at Ohio State, this student of History went out on a limb and took Geography 580: Cartography. I recall that the professor was a bit of an eccentric tyrant – he’d berate students for chewing gum, and even made one male student take his ball cap off in the classroom. While I enjoyed the subject, the detail was, at times, a bit too much: I ended up getting a B+ in the course because even though I was able to trace a map of Australia into a CAD program via a digitizing tablet and puck, I refused to memorize the details of additive color systems and printing processes (this was 1995, after all). While my interest in mapping Australia’s population evaporated at the end of the semester, I retained the fascination with mapping. So much so that I forged ahead in creating my own maps for research, even as I knew that there was more to mapping than AutoCAD and, later, Adobe Illustrator. Though I will admit to spending several hundreds dollars in order to purchase a royalty-free vector map of Europe.

And now, some twenty-two years later, I’ve finally accomplished at least part of what I’d set out to do those many years ago. After about ten days of intermittently playing around with QGIS (free, open-source Geographical Information System software), I finally have a passable first draft of a map I’ll use for my upcoming Crusades course. Drum roll please:

First I downloaded Natural Earth base-maps. Second step was to create a list of significant towns, look up their coordinates and import them into QGIS, and then set up rule-based formatting to display the major cities in a larger, upper-case font (and a larger, square icon). Next, I scanned and georeferenced one of the maps from Nicolle’s Atlas of the Islamic World, then traced the (approximate) boundaries of Christian and Muslim states as polygons (snapping to adjacent polygons to avoid slivers) while keeping a wide berth of the coasts, before finally clipping the polygon layers to the coastline layer.

Not too bad, though the georeferencing goes awry once we reach the Baltic – but that’s why you only rely on the georeferenced map for the borders, and not the cities or coastlines. The labels need tweaking (both font style and positioning), and of course it lacks all the info expected of a professional map: scale, title, key, etc. But it’s good enough for showing in class (once I add a scale), and, what’s more, it will serve as the basis for tracing territorial changes over the various Crusades.

Practicing with maps of the Crusades this semester will prepare me for even more fun next semester, when I teach my European Warfare, 1337-1815 course again. So I’ll finally be able to combine my crazy timecharts with ‘bespoke’ maps. After that, hopefully, a year-long sabbatical when I’ll be able to trace military operations in Flanders over the course of the War of the Spanish Succession in gory GIS detail. But I’ve gotta pace myself. There’s still a battle book to be written.

I spent the last few days playing around with small multiple maps in Adobe Illustrator:

Alliances, War of the Spanish Succession, 1701-1703

Blue is Bourbon (vertical lines are allies, of which there are various kinds); red represents Allied countries; gray are neutrals; explosions are revolts. The bright colors (bright red and bright blue) indicate a change that occurs in that year, so you can not only see the overall alliance composition in any given year, but also focus on which changes occur in each year.

Still a work in progress: need more details on some of the minor powers, cut-off dates are a bit complicated, not sure how I’ll emphasize the change when the revolts go away, may add combat point symbols (e.g. circles for sieges, x’s for battles)… But you get the idea.

I find myself at the end of most semesters brainstorming on how I might ease my teaching burden. I teach about eight different upper-level courses on early modern Europe in rotation, on subjects, periods and places ranging from the Renaissance through Napoleon (in addition to Western Civ). Almost every course usually covers 100 years or more, as well as several different European countries. Heck, my Religion, War and Peace course even takes it back to the Old Testament. Since I only teach each course perhaps once every two or three years, I often only vaguely remember the details of many events. Memory really does benefit from repetition, it appears.

So as I reflect on the semester just ending, I wonder for the umpteenth time how I can make it easier to remember a myriad of historical details. I hate the fact that I’ll forget many of the details I covered this semester, and will have to relearn them when I teach the same course again in a couple of years – even rereading my notes requires a lot of time I’d prefer to save for other things. I want, in short, to efficiently prep for class by reviewing a visualization of my notes on the campaign or war or theater or commander or historical event under discussion, and then narrate off of it in class (and provide the visual to students for their own notes). Is that asking too much? Read More…

A comment by a reader on a previous post (contrasting my Ottoman timechart with Minard’s famous map of Russia 1812) merits further discussion. Warning: theoretical discussion of the visual display of (not just) quantitative information follows.

Napoleon’s march into and out of Russia, 1812 (Minard)

Minard’s map is considered successful because it makes a *very* simple and focused argument using high-information variables. Let me explain. Read More…

Perhaps you’re like me. You tend to think about things visually and perhaps after a cartography course and a Tufte book or two you appreciate that visualizations can be far more data dense than an equivalent area of prose. Preferring to think visually is indeed great, except when, like me, you have practically no artistic skills. So you don’t really use it very much because you can’t draw a smiley face, much less a semi-respectable outline of Europe.