Moar Pretty Visualizations

Friday, 20 May 2011, around six in the evening.

If you need to find huge sets of data to work with, you could do worse than the Stack Exchange data dumps. Stack Exchange is a net­work of question/​answer sites that nerds of all stripes can use to get their ques­tions answered. All of the con­tent on the net­work is user-​​generated, and it is all licensed under a very per­mis­sive Cre­ative Com­mons license. Every cou­ple of months, the Stack Exchange guys dump their entire data­base onto the net for any­one who wants to use it. Giga­bytes and giga­bytes (com­pressed!) of inter­con­nected, struc­tured data.

Nerdgasm.

Any­way, I though I’d ingest some of that data and see what it looked like. I picked a small site, because the pop­u­lar sites on the net­work (such as Stack Over­flow) gen­er­ate way too much data to deal with quickly. Their Apple site is pretty small, but with over five and a half thou­sand users, that’s still a bit much for super-​​casual data min­ing. For­tu­nately, each site has a com­pan­ion meta-​​site, where peo­ple can ask and answer ques­tions about the site itself (in other words, if you have ques­tions about your Mac, ask them at the Apple site; if you have ques­tions about the Apple site itself, ask them at the meta-​​Apple site). Far fewer use these meta sites than use their non-​​meta coun­ter­parts, and the meta-​​Apple site only has about eight hun­dred users — a much more man­age­able dataset.

Any­way, long story short, I asked a few of ques­tions. For one thing, how many ques­tions and answers have been asked to date? Four hun­dred and forty four. And there are only about seven hun­dred users who have inter­acted with the site in any mean­ing­ful way. So, a bit under two users per post. Not too bad, I guess. But I assumed that there were some users who are really active on the site, mod­er­a­tors of a sort. Prob­a­bly these users gen­er­ate a lot of con­tent, while other users basi­cally cre­ated their accounts to ask some spe­cific ques­tion, and, hav­ing got­ten their answer (or not), never came back. Map­ping users to the posts and com­ments they’ve gen­er­ated yielded a pretty good visual sense of this. And, inci­den­tally, it’s kind of a pretty pic­ture — really, the only rea­son I wanted to write this whole thing was to post it:

Content owners
Fig­ure 1 | Con­tent Own­er­ship on http://meta.apple.stackexchange.com/

At the cen­ter of each cir­cle is a user, and all the blue lines point to ques­tions, answers or com­ments that user has gen­er­ated. It becomes pretty clear that on a site with eight hun­dred users, about a half-​​dozen of them account for a dis­pro­por­tion­ately large chunk of the gen­er­ated content.

Which isn’t sur­pris­ing, and prob­a­bly isn’t even that inter­est­ing, and I’m sorry you read this far just to learn that.


Euclid’s Elements: A Visualization of Book I

Thursday, 28 April 2011, around six in the evening.

The John­nies in the audi­ence might remem­ber an assign­ment from early in the first semes­ter of Fresh­man Geom­e­try: visu­al­ize the depen­den­cies within the propo­si­tions of Book I of Euclid’s Ele­ments of Geom­e­try. The 48 the­o­rems and con­struc­tions that make up the first book’s propo­si­tions are related through a com­plex set of cita­tions and ref­er­ences: while some stand on their own (such as Propo­si­tion 1: To con­struct an equi­lat­eral tri­an­gle on a given finite straight line), oth­ers use ear­lier propo­si­tions as the premise for their solu­tions. Visu­al­iz­ing these depen­den­cies can be use­ful in under­stand­ing the struc­ture of the work and the the­matic threads that hold each vol­ume of the trea­tise together.

As it turns out, visu­al­iz­ing these rela­tion­ships is not com­pletely straight­for­ward. At least, not if you want the result to be at all use­ful. There are a lot of dependencies.

I don’t remem­ber what my solu­tion looked like, but I don’t think it was very good. Some of my friends’ efforts were bet­ter; and some peo­ple on cam­pus got excep­tion­ally cre­ative with the assign­ment. One woman, whom I don’t remem­ber at all, made a sculp­ture! It con­sisted of 48 wooden blocks with the propo­si­tion num­bers burned into their faces. Each block was con­nected to its depen­dents via a series of wires, and the most frequently-​​cited propo­si­tions were low­est in the sculp­ture, form­ing the base on top of which every­thing else bal­anced. It was extremely cool, but still pretty visu­ally noisy, and not very use­ful as a learn­ing aid (in my opin­ion, which I shared at the time and was accused of being jeal­ous of the cre­ativ­ity the stu­dent had dis­played, which I was, but that was beside the point).

In a cou­ple of weeks I’m going to go to work full-​​time for a seman­tics research com­pany. Their flag­ship prod­uct is a soft­ware tool that helps ana­lysts and researchers gather, orga­nize and visu­al­ize com­plex sets of struc­tured data. Some peo­ple use the soft­ware to track ter­ror­ists. Oth­ers use it to mon­i­tor money laun­der­ing schemes. In an effort to bet­ter learn to use the soft­ware, I thought I’d see what it could do with Euclid.

The first step was to get the data. I relied on an online ver­sion of The Ele­ments to get a list of the depen­den­cies within Book I, since my copy of the book is in a box some­where and I couldn’t be arsed to get up and look for it. Once I had the data (which I actu­ally gath­ered for the first five books, since it was all there), I needed to for­mat it in a way that would be easy to import into the visu­al­iza­tion tool. CSV files work really well for this, so I made two: one that lists what propo­si­tions belong to what book, and one that lists what propo­si­tions depend on one another. For the sake of com­plete­ness, you can find the scripts I used to gen­er­ate the files here, though I assure you it’s really quite boring.

The sec­ond step was to actu­ally import the data into the visu­al­iza­tion tool. This was the inter­est­ing part for me, since the whole point for me was to get prac­tice with the tool. But, you don’t have the tool, and can’t afford it any­way (nei­ther can I), so we’ll just skip this part and move onto the pretty images.

The visu­al­iza­tion tool has a few dif­fer­ent orga­ni­za­tional pre­sets, and as I have been play­ing around with dif­fer­ent data sets, I’ve been able to see how the dif­fer­ent presents lend them­selves well to dif­fer­ent kinds of data. The first pre­set I tried is the hier­ar­chi­cal view, which most closely resem­bles the visualization-​​as-​​sculpture I men­tioned above (you can click on all these images to get the full-​​sized versions).

Hierarchical
Fig­ure 1 | Hier­ar­chi­cal View

Neato. The propo­si­tions with the most direct and indi­rect depen­dents are at the bot­tom (I.1 and I.4 being notable among these); I.48, on the other hand, is way up at the top.

The visu­al­iza­tion tool can pro­duce other, some­what more com­pact visu­al­iza­tions. This is the star view:

Star
Fig­ure 2 | Star View

Here, the propo­si­tions with the most depen­dents are at the cen­ter of the map, while those with the most depen­den­cies are on the outer edge.

Yet another view con­fig­ures the data in a big cir­cle. I recall that sev­eral stu­dents at St. John’s took this approach, though with­out the touch of putting the most depended-​​upon propo­si­tions in the center.

Circle
Fig­ure 3 | Cir­cle View

Finally, for the sake of com­plete­ness, here’s an orthog­o­nal ver­sion of the star view. I don’t like it as much as the oth­ers, but it might be a lit­tle eas­ier to trace the lines of depen­dency in this con­fig­u­ra­tion, as they’re all hor­i­zon­tal and vertical.

Book I: Orthogonal View
Fig­ure 4 | Orthog­o­nal View

And there you have it. Once I had the data in place, I was able to do all of this with the push of a but­ton. The moral of the story? I like my job!


Spain

Monday, 18 April 2011, around one in the afternoon.

Things I thought about this morn­ing: three places and a per­son, in Spain.

In the sum­mer of 2007, my cousin Travis was liv­ing in Spain. I went to visit him, par­tially, and par­tially I went just to wan­der around for a month with a back­pack and much too lit­tle money. I landed in Madrid, and while Travis was off west in Extremadura teach­ing Eng­lish to kids at a sum­mer camp, I met his then-​​girlfriend-​​now-​​wife Stine, a Dane study­ing in Madrid. Travis and Stine met under cir­cum­stances from which I could only con­clude that my cousin was in fact a James-​​Bond-​​esque char­ac­ter liv­ing a brac­ing life of inter­na­tional intrigue.

Stine met me at the Plaza Dos de Mayo, which she said was one of Travis’ favorite spots. She didn’t seem to know why he was so par­tial to it, but it struck me imme­di­ately as one of those places you just want to be. I didn’t know it at the time, but that plaza is actu­ally the cen­ter­piece of the Malasaña neigh­bor­hood, a cre­ative and coun­ter­cul­tural hub in Madrid, some­thing like New York City’s East Vil­lage. I liked it, and I tended to go out of my way to have lunch or beer (always a caña, because I didn’t know how to order a full glass of beer) or cof­fee there when­ever I was in Madrid and didn’t have any­thing else to do (which was often).

Right off the Plaza was a club Travis took me to one night. The first few times he said the name, I thought he said “La Vida Lác­tica”, which I trans­lated as “The Lac­tose Life”. Didn’t seem like a very good name. Actu­ally, the place is called La Via Láctea (The Milky Way), and is a vet­eran of the hedo­nis­tic movida scene that grew up in Malasaña in the decade fol­low­ing the death of Gen­eral Franco (my fas­ci­na­tion with whom being well known to my unfor­tu­nate friends and family).

I did not, at the time, feel at home in a club like that. I still don’t.

One painful mem­ory from that night: going up to the bar to order dos chupi­tos — two shots, of Jack prob­a­bly, or some­thing equally ter­ri­ble. I wanted to leave a tip, which was already an uncom­fort­able propo­si­tion because to this day I don’t under­stand the eti­quette of tip­ping in for­eign coun­tries, and since I was feel­ing self-​​conscious I fum­bled and acci­den­tally flung the coins onto the bar and watched in hor­ror as the very small amount of money (by Amer­i­can tip­ping stan­dards) bounced off of the lady serv­ing drinks and landed at her feet. She picked up the money and word­lessly gave it back to me. Try­ing to recover, I wanted to say “no, sorry, I just meant to leave a tip”, but since my bad Span­ish was ham­pered by awk­ward fright and self-​​consciousness, I instead said sim­ply “it’s yours” — or prob­a­bly just “it’s you”, because, again, bad Spanish.

I fled, back to Travis and a few posh Lon­don women we were hang­ing out with for some rea­son, all of whom were way too cool for me.

Another night, on that same trip, Travis took me to this bar called Begin the Beguine. It was an entirely un-​​advertised hole in the wall some­where in the labyrinth of streets between Calle de las Huer­tas and Calle de Moratín, run by a guy named Tony who remem­bered my cousin imme­di­ately, even though it had been a while since Travis had last visted. Tony’s caipir­in­has are the drink of choice there — sug­ary lemon cock­tails served in huge square glasses — and the house tapa is cher­ries on ice. Tony him­self was wear­ing a tight black-​​and-​​white striped shirt like some kind of French car­i­ca­ture, and he only smoked these long, skinny cig­a­rettes that I’d never heard of before.

The doors opened late and closed early, and if you didn’t arrive dur­ing that brief win­dow, you were out of luck. For those who did man­age to make it in, once the doors closed there was a gen­eral feel­ing of “what hap­pens in Beguine stays in Beguine”. Being a total dork and utterly uncom­fort­able with myself, I only saw the preva­lent sub­stance abuse from a cau­tious dis­tance. About 5:30 AM, Tony came around and served scram­bled eggs to all the patrons who had stuck it out that long; at 6 AM, he politely told us all to get the fuck out, because the trains were run­ning again and we no longer had any excuse for being there. I gath­ered that such is the usual rou­tine in Madrid clubs, per­haps except­ing the free breakfast.

Maybe a week later, Travis and I were hitch­hik­ing west­ward from Málaga along the south­ern coast, try­ing to get to Cádiz. Some­where just out­side of Estepona, we man­aged to catch a ride with a crazy lady named Ruth, who had two dogs and an old van that had the weird­est trans­mis­sion sys­tem I have ever seen. I let Travis do all the talk­ing, because my Span­ish is bad, and because I’d only ever really used it to write essays in school, and writ­ing essays is very dif­fer­ent from explain­ing to crazy ladies named Ruth who we were and where we were going and what we were all about. So, I had lots of time to sit and watch her work the van’s trans­mis­sion, which was con­trolled via a row of old-​​style radio but­tons on the dash­board. Ruth appar­ently made most of her money dur­ing the Spain’s fes­ti­val sea­son, trav­el­ing around sell­ing drugs and cloth­ing to hip­pies. That served her well enough that she could just do what­ever dur­ing the fall and win­ter months, which we were head­ing into.

Ruth and her two dogs dropped us off in Tar­ifa, where we ate a bunch of fried things for lunch and reflected on the fact that we could see the moun­tains of Morocco on the hori­zon. It was one of the more sur­real moments of my life, eat­ing lunch with my cousin from East Texas and stop­ping occa­sion­ally to point and say: dude, that’s Africa.


Speaking of Birdhouse

Thursday, 24 March 2011, around four in the afternoon.

Speak­ing of Bird­house, here’s what’s in my bird­house right now:

@zbrimhall

Took me a sec­ond to real­ize that the schizo guy at the bus stop wanted to know which iPhone I had before I got my iPhone 4.
 — 012511 14:27, 0 stars

When a writer jumps the shark writ­ing about a sane uni­verse, you get the last sea­son of Bat­tlestar Galac­tica. When a writer writes sanely about a uni­verse that has jumped the shark, you get The Dark Tower.
 — 011311 23:01, 0 stars

Was think­ing of donat­ing my old bike, but it turns out some­one stole it from me. What’s that, like, “pay­ing it side­ways”?
 — 100110 20:34, 0 stars

It’s sur­pris­ing that they have Dunkin’ Donuts but not mag­a­zines in the Panama City Air­ports.
 — 091510 11:30, 0 stars

It occurred to me this morn­ing that I need to learn elec­tri­cal engi­neer­ing so if I get sucked into the past I can invent com­put­ers.
 — 033110 19:19, 0 stars

Occa­sion­ally, to remind me who’s in charge, my lap­top does this thing where it pre­tends to be cat­a­stroph­i­cally bro­ken.
 — 032610 1:39, 0 stars

Con­fes­sion: when­ever a song from GTA Vice City comes on the radio, I
 — 031410 21:34, 0 stars

Con­ver­sa­tion with Tara started with “what does it mean when audio is ’16 bit’?” and ended with the fun­da­men­tal dif­fer­ences between the x86 and m68k micro­proces­sor archi­tec­tures. This is why we’re friends.
 — 030310 15:35, 0 stars

Huh, some of that was actu­ally kind of funny.


A Favorite Bit of UI

Thursday, 24 March 2011, around two in the afternoon.

One of my favorite lit­tle bits of user inter­face design can be found in Bird­house, a lit­tle app writ­ten by Adam Lis­agor and Cameron Hunt. Bird­house (“A Notepad for Twit­ter”) is an app for peo­ple who like to write drafts of their tweets, or who have ideas for tweets that they don’t have time to pol­ish but also don’t want to for­get. It saves your tweet drafts in a list, and allows you to pub­lish them when they’re ready, from within the app.

Composing a tweet in Birdhouse
Fig­ure 1 | Com­pos­ing a tweet in Bird­house

Pretty straight­for­ward, and a nice-​​looking UI for all that. But the bit that I love love love comes when you tap that big “Pub­lish” but­ton on the bottom-​​right cor­ner of the screen. The bot­tom nav­i­ga­tion bar turns a darker shade of blue and dis­plays a very sim­ple ques­tion: “Pub­lish?” You can can­cel the action, or tap the “Pub­lish” but­ton again to actu­ally do the deed.

Confirming your decision to publish a tweet in Birdhouse
Fig­ure 2 | It’s as if to say, “You sure about this, ass­hole?“

Love it. Sub­tle, yet obvi­ous. It forces you to make a con­sid­ered deci­sion, but unlike a modal alert box, it does so with­out rudely yank­ing you out of the con­text in which you were doing all your work. I don’t know about you, but I hate rude soft­ware. Bird­house isn’t rude; how­ever, it is direct, and I like to think that that one-​​word con­fir­ma­tion ques­tion — Publish? — is being asked of me by some­one who knows that, likely as not, the thing I’m think­ing about post­ing is snarky, or rude, or overtly clever, or self-​​involved in any of a mil­lion dif­fer­ent, unbe­com­ing ways. Some­one who wants to know, is this the best I can do? And of course it usu­ally isn’t.


Kind of a Typical Dream for Me

Thursday, 24 February 2011, around one in the afternoon.

In which my mom and sis­ter sat there vis­i­bly, painfully bored, while I dis­cussed Orwell’s take on US and Ger­man involve­ment in the Span­ish Civil War, and why the loy­al­ist Repub­li­cans ulti­mately lost to Gen­eral Franco’s Nation­al­ists. There were con­sid­er­able his­tor­i­cal inac­cu­ra­cies, as well as a kitten.

I need to get out more.


How to Lose 20 Pounds Without Even Trying

Saturday, 19 February 2011, around two in the afternoon.

  1. Go back­pack­ing for a month. Live off half-​​rations of rice and beans because you’re broke as shit.
  2. Return home, con­tin­u­ing to live off rice and beans because you con­tinue to be broke as shit.
  3. Drop out of school to work in a cof­fee shop, so you’re on your feet all day; walk to work because you don’t have a car.
  4. Get dumped. Be sad a bunch.

Trust me, I haven’t looked this good in years.

(Ladies.)


Winter”

Wednesday, 12 January 2011, around one in the afternoon.

Winter.png


Nigger”

Saturday, 8 January 2011, around one in the morning.

Seoul­Brother:

To edit the word from our lit­er­a­ture we actu­ally decrim­i­nal­ize the cli­mate and con­text in which it was used. We allow the roman­tic notion of The Good Ol’ Days to go unchecked. If we let that hap­pen slav­ery gets reduced to young Anakin Sky­walker pout­ing because he can’t get time off to com­pete in the Pod-​​races, big­otry becomes a red­necked, chew spit­tin’ car­i­ca­ture instead of the well dressed, even-​​toned bank man­ager deny­ing a loan and racism becomes some­thing that used to happen.

I have noth­ing to add. Go read it.