The other day, as part of my job, I had a met with a psychotherapist. My people are not generally therapy people, so I feel compelled to explain why I was talking to a shrink.

And yet, I learned a lot in that meeting that’s helped me since. We were talking about a project involving teaching transferrence and counter-transferrence. These words weren’t new to me, but I didn’t understand the concepts behind them. While I’m still not sure I understand them, I have a better sense of what they mean in theory and practice, as well as of some of their constituent parts.

This helped me recently to pay attention to my affect in a situation with my child, a time when I found myself extremely frustrated with what I thought was performance below their abilities. I’m still not convinced they were doing their best, but I also paid better attention to myself at the moment, tried to consider better my child’s perspective and likely thoughts and feelings at the moment, and likely averted a bunch of unpleasantness and reinforcement of exactly their actions and mindset that I want to control. Which is possibly the bigger problem, anyway, my ridiculous expectation that I can control another human being.



Langston Hughes, Democracy

Democracy will not come
Today, this year
Nor ever
Through compromise and fear.

I have as much right
As the other fellow has
To stand
On my two feet
And own the land.

I tire so of hearing people say,
Let things take their course.
Tomorrow is another day.
I do not need my freedom when I’m dead.
I cannot live on tomorrow’s bread.

Is a strong seed
In a great need.

I live here, too.
I want freedom
Just as you.

Via PoemHunter


No Promises

One thing I’ve learned from my own blog here (and lack of same) as well as from reading others’ is to never make promises about what you’re going to do with a blog. It’s a lot like New Year’s resolutions, and I suspect these days “I’m going to (start / keep up) a blog!” is right up there with going to the gym or being kinder in resolution frequency.


Workflow for Georectifying Large Map Images

The other day, I was trying to figure out what I would do about georectifying images of historic (C19 CE) maps from an Ottoman-era atlas held by the Library of Congress. The TIFF files were too big to upload to MapWarper, my preferred space, and the JPEGs were too low-res, even the large ones. It occurred to me that I have used libtiff‘s tiffcp in the past to reduce TIFF filesize, and a workflow was born. (Though I don’t use Homebrew for package management on my machines, I do have it installed on my home laptop and it made getting libtiff set up easier.)

  • Download 254MB TIFF from, page 61
  • Install libtiff from Homebrew and process the TIFF using tiffcp. Parameter explanation:
    • -r sets the strips per row. Don’t ask me what this really means, but I got away from an error by setting this.
    • -c sets the kind of compression. Similarly, I’m not real deep on compression algos, but I knew I wanted a JPEG output
    • :75 sets the compression quality. If you’re used to working in a graphics editor GUI
  • brew install libtiff
  • tiffcp -r 16 -c jpeg:75 {/path/to/your/download/file}.tif {/path/to/your/output/file}.jpg

Upload the file to or your preferred georectification service and rectify, producing the conformed map.

From there, I can use{z}/{x}/{y}.png in a Leaflet map overlay (which is what I’m going to do).


Web Map with No Baselayer

In my MA thesis project (I can’t get my head around calling it a thesis, since it’s not just a printed textual destination), I’m making some web-based maps to illustrate and further my argument for privileging or at least equally including histories of Islamic and vernacular education in the histories of education in the C19 Senegambian region. At the moment, I’m thinking I’m going to want a georeferenceable space to make a claim about ca. 6th century AH Islamo-Arab world maps. However, those maps are south-up maps, or at least all the ones I’ve seen are. in order to do things like drop markers on the map and talk about how long western African people included Arabia and/or the greater Islamic world as part of their cosmology, I want an image of one or more of these maps in a map-like web space.

Nicely, Leaflet lets me do this. When I started researching, I assumed that this would have to be done as a hack or by making my own tileset from an image of the color I want to use. The latter is roughly the answer opted for in a Stack Overflow Q/A. Reading that, though, reminded me I hadn’t — as I often don’t — thought of the Occam’s Razor version. When I went back to look at the code for adding a map in Leaflet, it turns out you can just not add a baselayer. The Leaflet 1.2.0 spec only says that you have to pass the creation method either a DOM ID to the DIV element that will contain your map or an HTMLElement. You may pass map options, but they are optional. a-hah-hah.

Next step is to see if I can manipulate the color that shows up absent a baselayer.


PhantomJS Failure During Mirador Install

Today I tried to install Mirador in a dumb Docker container, partly to make a point to some devs that what I wanted them to do wasn’t very hard. (That is, if I could do it from scratch in a day knowing very little about Mirador, IIIF, NodeJS, and Docker, surely they didn’t need to take the half-week I was quoted. From being a full-time web dev, I know that logic does not hold rigidly, but it’s not too far off.)

My first blocker was a failure of PhantomJS to install. It’s possible my next post will be that I was installing a dev version of Mirador that I didn’t need to install, but we’ll see. In any case, what I think was the material portion of the error spew was

npm ERR! phantomjs-prebuilt@2.1.15 install: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.15 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! 	node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! 	npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 	npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.

Since my knowledge of all these things is very shallow, it took me longer than it might have to figure out what phrase from that to search on, but eventually I landed upon — natürlich — a Stack Overflow response to a more generic question about installing Node packages on Ubuntu that helped me. Indeed, running sudo apt-get install nodejs-legacy allowed the npm install portion of the Mirador process to continue to a successful conclusion.


Local 33 Protest, 22 May 2017 (Yale Commencement)

This was taken through a 75-year-old window intentionally made slurrily to mimic being even older. Also, apologies for the verticality. I don’t take a lot of quick-reaction video, so I forgot to horizontalize. York Street, New Haven, CT.


Kristallnacht Timeline

Made for HIS 575, Spring 2016, Southern Connecticut State University, Professor Troy Paddock


Some Working SPARQL

Since I’m trying to work on learning SPARQL (and Learning SPARQL) with a goal of working with data from the Yale Center for British Art, I’m testing what I know in their SPARQL endpoint. This is just a log of some currently working queries.

Get everything about one item (id = 499) and then find every other YCBA object with which it shared an exhibition.

	ycba:object\/499 ?p ?o .
	?s crm:P12i_was_present_at ?o .

This query could be collapsed into one line, but exploding it like this highlights the way the natural language works.

Or, if I know an exhibition ID, show me every object that was in it.

   ?s crm:P12i_was_present_at ycba:exhibition\/7 .

Next I’ll try to combine these notions and start with an exhibition name or similar, and work out the web of shared objects.


Learning LOD

For a side summer project, I’ve taken on figuring out how to obtain and work with Linked Open Data (LOD). The Yale Center for British Art transformed their collection data into LOD a couple years back, so they provide a nice local source for the data. As far as I can tell right now, the project entails learning (just enough of) SPARQL and RDF parsing, and possibly improving my Gephi or Cytoscape chops. Meaning, of course, that the third part is needing to figure out what can be done with YCBA’s data and learning how to do that.

Off the cuff, I think these are the most relevant pre-existing factors affecting whether this post is comprehensible and useful for you:

  • MacBook Pro from late 2014; 2.2 GHz processor, 16 Gb RAM
  • Python 2.7.6
  • pip 7.0.1
  • Experience writing code as well as working with relational databases and SQL
  • Experience administering a server
  • Perhaps most importantly, before this week I spent a little time with Bob DuCharme’s Learning SPARQL from O’Reilly. Also possibly available at a library near you.

What I did today to get meaningful results:
First I needed to give my Python the capability of addressing a SPARQL endpoint and parsing the results.
sudo pip install rdflib (this also installs isodate, SPARQLWrapper, and html5lib)
sudo pip install simplejson
Then I executed some this Python fragment from Semantic Web:

from SPARQLWrapper import SPARQLWrapper, JSON

sparql = SPARQLWrapper("")
    PREFIX rdfs: <>
    SELECT ?label
    WHERE { 
      ?label .

results = sparql.query().convert()

for result in results["results"]["bindings"]:
      print result["label"]["value"]

And got back these results:

منطقة أستورياس
Asturië (regio)

With that in hand, I played around with the SPARQL query a bit to get other parts of the DBPedia entry. (After a brief visit to Wikipedia to learn a bit more about Asturias.)

This feels good enough for today. Next thin, I think, is to press some more on Learning SPARQL and see what else I can ask DBPedia.

Update 12 June: Fixed omission of sudo before second package install. Added that I have Pip, and where to get it.