Archive | August 2017

Playing around with GIS

More samples of maps I made in a few hours. These are drawn from my War of the Spanish Succession siege dataset, derived from the research appearing in my Vauban under Siege book. In that book I created some maps of the Low Countries theater using Adobe Illustrator – some were decent, others not so much. I’ve posted a few other examples of early modern European military maps here, mostly from the Iberian theater, which I discussed in a Spanish-language article I authored (some examples here).

But now, with QGIS in da house, I can make them a lot quicker. So here are a few examples of my entire WSS siege database mapped, with a few mistakes and a few errors, of course. Ideally, maps like this would’ve been in my dissertation, but that would have meant me graduating in late 2003 instead of late 2002.

The process, for those playing at home: I took my Excel spreadsheet listing 116 sieges (I deleted a few fort sieges because I didn’t want to have to research their lengths and locations), added a column identifying the modern country of each place, converted the spreadsheet into a UTF-8 csv file, then used QGIS’s MMQGIS Geocode plugin to get the lat and long coordinates from Google for each place, placing it as a new layer on top of the Natural Earth base map. I then had to change a few of the coordinates in the QGIS attribute table, mostly because either a) I didn’t specify which Castiglione (or Reggio or Aire) was besieged, or I thought it was Haguenau, Germany, when it was actually Haguenau, France. Fortunately, most of these were pretty obvious from looking at the map, given my knowledge of where the campaigns were conducted. You use the Numerical Vertex Edit plugin to edit coordinates – they cannot be edited in the attribute table. And, fortunately, changing the feature on any level updates it on all other layers.

Then I had to make a new calculated field for the siege length values, because they were imported in as a text string field rather than a decimal numerical field (‘3.8’ instead of 3.8). Once the data was cleaned up, I either used rule-based formatting or graduated symbols to display various attributes about the sieges. Now that I know the procedure, it’ll take just a few minutes to make variations of the map. No more calculating circle diameters in Excel and manually placing them on the map!

First, a map showing 116 siege locations during the war, with black circles indicating those sieges where the besiegers managed to capture the fortress (about 85% overall).

Screenshot 2017-08-27 15.35.04.png

 

Next, the same map (sans the Layers Panel), but with rule-based symbolism where red circles indicate Allied-conducted sieges, and blue circles indicate sieges undertaken by the Bourbons.

Screenshot 2017-08-27 15.31.21.png

Now, the same basic map, but this time we’re using the numerical siege length field to create graduated point symbols, so we can see the relative length of the sieges. I could, of course, define any min-max diameter for the circles, but if they get too large, you lose the smaller sieges.

Screenshot 2017-08-27 15.31.32.png

Of course, if you just want to be goofy, or simulate what my vision will be like in another ten years, you can make a raster heat map, using the Layer Style-Heatmap option, create your own color ramp from transparent to red, and make a smaller radius. That gives you a map that emphasizes regions which saw many sieges:

Screenshot 2017-08-27 15.41.59.png

Miscellaneous Notes:

I turned on the modern political boundaries, which helps distinguish the Iberian vs. Spanish sieges. Digitized early modern boundaries, and other features, will have to wait until sabbatical.

I haven’t offset those siege symbols for towns that were besieged more than once. Thus, for the first two maps, only one symbol is visible. This is particularly germane for Landau near the Rhine, which saw four sieges, but even the third map doesn’t help much, since three of the sieges lasted between 2.3 and 2.8 months and therefore all three have the same-sized point symbol stacked on top of each other. The heat map, however, emphasizes Landau’s four sieges.

That being said, I did change the render oder (Symbol Levels) on map 1 to have the white circles be drawn on top (Layer Order, white = 1, black = 0). I also put a white outline around each black circle for both maps 1 and 3, so you can see when the circles of several proximate, successful sieges overlap each other (for map 3, Layer Order with smallest/shortest circle drawn on top, with largest circle drawn on the bottom).

Most importantly, I haven’t yet figured out how to combine two attributes into one point symbol (e.g. size of circle as length and besieging side as color of the same circle), but you always need to have goals.

But wait, there’s more! There’s probably some way I could split the Allied and Bourbon into separate layers, make a raster heat map for each of those, and then overlay them.

Just spitballin’ here, but you could also calculate a siege index (maybe number of siege-days) and map that, possibly as a raster heat map. If you run the raster heat map on the siege length layer, you get a rasterized version of map 3:

Screenshot 2017-08-27 15.58.53.png

And, of course, the beauty of GIS is that you can combine this data in any way you’d like, combine it with other data, and focus on subsets of the data. Maybe you want a separate map for each campaign year. Throw in field battles, or the amphibious landings. Add in roads, fortresses, logistical centers, and so on. Maybe you want to spatially analyze these features. The world’s your oyster. Mine too.

Twenty-two years ago, a map was born

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:

 

Screenshot 2017-08-23 15.19.50.png

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.

A more basic base-map that I can use for note taking (in Notability on my new iPad Pro 12.9″) looks like this, with a jaunty little rotation added for good measure:

Crusades basemap.png

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.

Took me long enough.

Jumping on the eclipse bandwagon

Since the whole US seems to be aflutter with today’s solar eclipse, I might as well jump on the bandwagon, and introduce an earlier solar eclipse and how it was interpreted. That would be, of course, the eclipse of the Sun King – le Roi Soleil himself, Louis XIV – during his annus horribilis of 1706.

In a way, Louis XIV asked for it. After all, he was the one who choose to dance as the sun god Apollo in ballets at Versailles, and he was the one who bestowed upon himself the moniker of the Sun King. (Even before twitter, it was still a good idea to think about how your brand could be twisted by your opponents.) Appropriately, the Sun King would see his most visible eclipse in the twilight of his reign, during the exhausting War of the Spanish Succession (1701-1714).

356 3-L14 France SP17.png

France’s Sun King saw his military forces eclipsed most spectacularly in 1706. The failure of the Bourbon attempt to recapture Barcelona lead to the occupation of Madrid by mid-year. The 23 May battle of Ramillies allowed Allied forces under the Duke of Marlborough to sweep through the poorly-defended Spanish Netherlands and then conduct a series of successful sieges of Franco-Spanish fortresses along Louis’ northern border. As if these two reversals weren’t humbling enough, the Bourbon siege of Victor Amadeus of Savoy’s Turin capital turned into catastrophe when Prince Eugene of Savoy attacked French defenders in their trenches in early September. Within months, the French were forced to abandon Italy.

And what did early modern Europe make of such sudden and unprecedented reversals of fortune in multiple theaters? Helpfully, the deistic Supreme Being himself prophesized the upcoming eclipse of the Sun King. It just so happened that 12 May of that very year witnessed an actual eclipse of the Sun. The path of totality passed through Montpellier, France, encouraging a local professor of mathematics there to publish his own calculations of the event against empirical observation:

Screenshot 2017-08-21 13.43.38

For non-scientists natural philosophers, the events offered more than just an opportunity to improve the astronomical sciences. Contemporaries hardly needed the excuse of astrology, or of Huguenot prophecies, to draw the parallel between a real solar eclipse and a metaphorical Sun King eclipse. With the irrefutable proof of post hoc ergo propter hoc, literal and figurative solar eclipses became intertwined – a Protestant God couldn’t have provided a better PR opportunity, nor could anti-Bourbon powers ask for a better one. The parallel was obvious to all. One letter from Spain, published in the Present State of Europe, noted the connection:

“But what is remarkable, too, according to the course of the Planets there is no wonder in [the victory], is, that this Morning about a quarter past 9 a Clock, when the Enemy’s Army was in full march and Confusion, the Sun was eclipsed for 6 Minutes, so that the Day look’d like Night. Thus the Crown of France, which has the Sun for its Device, loses its Force before Barcelona; and must at last restore to the King and lawful Sovereign of Spain all the Monarchy usurp’d from him.”

Those of a more cynical bent placed more faith in Man than Heavenly constellations, one skeptic noting that on the retreat from Barcelona the French march “was overcast this morning with the darkest eclipse of the sun as almost ever was seen, by which the superstitious here portend the eternal setting of the Bourbon son, but I believe the attendance of the enraged Miguelets [Catalan partisan bands] from the mountains will prove most fatal in their way to Girone, whither we hear they are marched in very great confusion.”

Whether through powers divine or human, the outlook remained dark for Philippe V’s Spanish forces for months afterwards.

Meanwhile, to the north, an English soldier fighting in Marlborough’s Flanders army was unaware of the great events to come, and therefore chronicled more prosaically that “over a great heath there happened a greate eclipse of the sunn wch. begann about 9 o clock in the morning and held till half an hour after 10, vizible unto us and was the strangest and greatest that ever I beheld or could heare of by any souldier or officer amongst us.” Within weeks, the victory of Ramillies would make the eclipse’s meaning for the northern theater clear.

Since war is fought with pens as much as with swords, the eclipse was also enlisted into service in the visual war for hearts and minds. Yet perhaps interpreting visual metaphors isn’t as simple as it might seem. Two examples of how propagandists used the eclipse metaphor will suffice. The first is an English copy and translation of “cuts from beyond the Sea,” illustrating the symbolic eclipse, with Louis presciently commenting to his wife: “The Sun, my Dear, Is now eclips’d, and bodes some Ill, I fear.”

Pages from A Collection of some Satyrical Prints (Poems_on_Affairs_of_State).png

The second, more interesting example, comes from the Dutch,* whose had a long pedigree of mocking the pretensions of that tyrant Louis (see: Romeyn de Hooghe). The top half of the page consists of an image illustrating England’s Queen Anne siting on her throne, surrounded by courtiers and action scenes from the year’s military victories.

De groote eclipsis in de zon (Koninglyke Almanach 1706) crop.jpg

(See a version of the entire page here.)

The accompanying text, in both Dutch and French, first situates the event within the growing age of Enlightenment. It starts by noting that:

“Although it seems that we are no longer in the time of miracles, and that in such an Enlightened century as this, we know that everything that occurs on earth results from natural causes, nevertheless people naturally stray into superstition, seeing in the eclipse of the Sun which took place May 12 much similarity to the Eclipse of the grandeur of Louis XIV who take the Sun as his emblem…”

It continues by extending the metaphor: the Sun is being eclipsed by his “sister” the Moon, just as the terrestrial Sun King is eclipsed by his “soeur” Queen Anne:

L’Eclypse qui parut au Ciel l’autre semaine,
Fut aux yeux des Mortels un parlant Phenomene
D’une terrestre Eclypse, un Divin Precurseur
C’est celle de Louis, le Soleil de la France
Qu’aujourd’huy nous voyons tomber en defaillance
Par l’entremise de sa Soeur

But deconstructing the imagery takes a bit more work, which the editor is happy to assist us with, at least to the best of his abilities. Obviously enough, the editor suggests, the lunar eclipse of the sun drives the successive events. “You also see two astrologers who, with the assistance of a telescope, attempt to teach us some kind of new discovery” [Unfortunately, the editor remains silent as to whether a mirror, held by two characters on the opposite side, can serve the same protective purpose as eclipse glasses.] Queen Anne sits on her throne underneath the royal coat of arms adorned with English lions, Irish harp and French fleur-de-lis. She appears to be clipping the wings of the French coq “so that it cannot fly so high and so far from its own home.” What exactly all those courtiers want is admittedly uncertain, presumably something more than just clipping wings. Even less certain is the point of the fleet scene, though it “seems to me to represent those of Admirals Leake and Wassenaar” generically preventing the Comte de Toulouse from ruling the Two Seas. And we know that the combat scene has to represent the battle of Ramillies “because I see the Judoigne village church tower.” After another sonnet on the neutralization of the universal hegemon’s plans, we come to the final frame. What do you see happening with those people in the upper left? “I see,” continues our guide, Madame de Maintenon lecturing her husband (and his court) about the courage, strength, and abilities of his enemies, and of the need to extricate France from its losing war. Which, I suppose, is as good an interpretation of that single-frame snapshot as any.

So what, pray tell, is the lesson for those of us dealing with our own solar eclipse in 2017? Can we hope to interpret our celestial event and predict our own future with any greater certainty than our struggling art critic interpreted his?

My takeaway from the eclipse of August 21, 2017?

Tyrants beware!

Further Reading:

Claydon, Tony, and Charles-Edouard Levillain, eds. Louis XIV Outside in: Images of the Sun King Beyond France, 1661-1715. Farnham, Surrey, UK; Burlington, VT: Ashgate Publishing, 2015.

* It’s worth noting that the imprint at the bottom claims the print is based on a copy from London (and Jean Mosse), raising the possibility that this Anglo-centric illustration is, in fact, an English (Huguenot-exile-related?) creation being translated for dutcho- and franco-phone audiences, which might explain the [editor’s?] rather curious inclusion of the Dutch admiral Wassenaar alongside the English Leake. Undoubtedly, further research on the source would turn up additional details and context. Boy, History can be complicated.

Where have you been all my life?

Seriously though. I’ve known about the concept of ‘regular expressions’ for years, but for some reason I never took the plunge. And now that I have, my mind is absolutely blown away. Remember all those months in grad school (c. 1998-2000) when I was OCRing, proofing and manually parsing thousands of letters into my Access database? Well I sure do.

Twenty years later, I now discover that I could’ve shaved literally months off that work, if only I’d adopted the regex way of manipulating text. I’ll blame it on the fact that “digital humanities” wasn’t even a thing back then – check out Google Ngram Viewer if you don’t believe me.

So let’s start at the beginning. Entry-level text editing is easy enough: you undoubtedly learned long ago that in a text program like Microsoft Word you can find all the dates in a document – say 3/15/1702 and 3/7/1703 and 7/3/1704 – using a wildcard search like 170^#, where ^# is the wildcard for any digit (number). That kind of search will return 1701 and 1702 and 1703… But you’ve also undoubtedly been annoyed when you next learn that you can’t actually modify all those dates, because the wildcard character will be replaced in your basic find-replace with a single character. So, for example, you could easily convert all the forward slashes into periods, because you simply replace every slash with a period. But you can’t turn a variety of dates (text strings, mind you, not actual date data types) from MM/DD/YYYY into YYYY.MM.DD, because you need wildcards to find all the digit variations (3/15/1702, 6/7/1703…), but you can’t keep those values found by wildcards when you try to move them into a different order. In the above example, trying to replace 170^# with 1704 will convert every year with 1704, even if it’s 1701 or 1702. So you can cycle through each year and each month, like I did, but that takes a fair amount of time as the number of texts grow. This inability to do smart find-replace is a crying’ shame, and I’ve gnashed many a tooth over this quandary.

Enter regular expressions, aka regex or grep. I won’t bore you with the basics of regex (there’s a website or two on that), but will simply describe it as a way to search for patterns in text, not just specific characters. Not only can you find patterns in text, but with features called back references and look-aheads/look-backs (collectively: “lookarounds”), you can retain those wildcard characters and manipulate the entire text string without losing the characters found by the wildcards. It’s actually pretty easy:

Read More…

The Summer of Digital

Yep, it’s been a computational summer. Composed mostly of reading up on all things digital humanities. (Battle book? What battle book?) Most concretely, that’s meant setting up a modest Digital History Lab for our department (six computers, book-microfilm-photo scanners, a Microsoft Surface Hub touch display, and various software), and preparing for a brand new Intro to Digital History course, slated to kick off in a few weeks.

I’ve always been computer-curious, but it wasn’t until this summer that I fully committed to my inner nerdiness, and dove into the recent shenanigans of “digital humanities.” Primarily this meant finally committing to GIS, followed by lots of textual analysis tools, and brushing up on my database skills. But I’ve even started learning Python and a bit more AppleScript, if you can believe it.

So, in future posts, I’ll talk a little less about Devonthink and a bit more about other tools that will allow me to explore early modern European military history in a whole new way.

Stay tuned…