A Map of Archaeogaming

Andrew posted a mindmap of the kinds of things that fall under the ‘archaeogaming’ rubric. He mentioned that it’d be nice to have it with that xkcd aesthetic. The different kinds of archaeogaming were laid out like a ‘Reingold-Tilford’ tree

As it happens, there’s a package for R that will take the standard plot() commands and format the output – complete with stickfigures – like an xkcd comic.

I took Andrew’s original map and turned it into a standard network list, with source and target columns separated by commas. I thought maybe Raw might be a good solution:archaeomap1

It was pretty enough, but not that xkcd flavour I was looking for. A bit more rooting around and I realized that the various network packages for R would get that layout (see this great tutorial) but, by this point, I’d come across this d3 network package and I thought I’d try it out. It’s quite straight forward, and could make the simple network quite easily from my csv. But I wanted what d3network calls a ‘diagonalnetwork’ – which required (or seemed to require? The fact that I’m asking this shows that I have just enough knowledge to get myself into trouble, and not enough to solve my problems) my data in json format. I used a csv to json converter, which did me no good. So I carefully studied the example data, and turned my csv into json flare by hand. Here’s the file so you can do something with it.

At this point, it would’ve been easier to draw the damned thing by hand, and scan it in. But anyway.

So – to install xkcd in R – see this script. That also has the code for grabbing the json, and slapping the xkcd font on it. Now, if I wasn’t using d3network to make that graph – which outputs interactive html, remember- but instead using some of the standard network packages in R, then it’s fairly straightforward to customize all of the regular plot options to make something really cool – eg

But anyway. I ended up with a graph, it uses the fun xkcd font, and then a little cut’n’paste later we get a map of archaeogaming