Random Etc. Notes to self. Work, play, and the rest.

Underwater RainforestJenner, CA.Docklands = SketchupNearly HomeStamen!Fence TwistBoom.

More Multi-touch Links

Here's a nice overview of how touch events are modelled in mobile Safari on the iphone. Here's a student paper detailing some multi-touch code architectures and actual code too.

Here's a nice article on single point gesture recognition for games, here are lovely simple single stroke and multi-stroke gesture recognisers in javascript. Here's the corresponding paper. Here's a paper about modelling gestures using Markov chains.

And here's a gesture recognition discussion thread featuring some of the above links and many more.

Curling is Project Management

Curling is unexpectedly popular again. We're measuring this.

Continuing a four and half year old seed of thought that Matt Webb planted about sporting metaphors, I'm imagining that Curling is project management:

I was going to labour this point a little bit, but wikipedia sums it up nicely. In Curling, "two sweepers with brooms or brushes accompany each stone and use stopwatches and their best judgment, along with direction from their teammates, to help direct the stones to their resting place, but without touching the stones."

And now back to measuring things.

Help Me Think Through Multi-touch Events

We're lucky enough to have a big ass table in the office for a client project. Not a MS one, but an Ideum one that speaks the TUIO/OSC protocol.

I have a GestureWorks license available to me if I need it but I haven't evaluated that yet because I have a little time to experiment and I'm really just curious about how it all works. I'm using Flash, and I'm successfully receiving TUIO messages using udp-flashlc-bridge and tuio-as3 with a LocalConnection. It's working nicely so far, and I already adapted Modest Maps to deal with rotations and got up and running quite quickly.

The reason I'm reaching for my blog for the first time in a while to ask if anyone reading has experience to share about developing software for this kind of platform? Specifically I'm wondering if anyone has hints about how to go from raw cursor information (potentially from several fingers on several hands) and turn that into meaningful motion? What I can do so far works really well with two fingers but I'm wondering where to go from here.

Some of the steps seem simple. For example, if a cursor appears and disappears in a short space of time and doesn't move very much, that's a tap event. If two cursors appear and disappear twice in the same place in a short space of time, that's a double-tap event. If a single finger cursor appears and moves, that's a drag. A fast drag could be interpreted as a swipe. You can code some momentum/physics in there to make it feel right. So far so good. This much is intuitive.

So then... there's the whole task of doing hit-tests on each interactive object on screen so that you don't combine cursors into gestures unless they're acting on the same thing. This is familiar territory for me. But where intuition breaks down for me is if two or more fingers appear and move in roughly the same direction - is that a drag gesture? But how do you define roughly, or should you also interpret it as scaling or rotation? And when do you decide to ignore the scaling?

And then, if several fingers are doing this, potentially in opposite directions, how do you boil that down into a gesture? Or if several people are all mashing the table at once, how do you filter out the noise? Can you? There are some juicy interaction design problems in here that I know I'm not the first person to think about by a long shot (hat tip, hat tip, hat tip, hat tip, hat tip, hat tip etc). But I don't see much discussion of the interpretation of raw touch information into gestures. If you know of good projects that have solved these problems before (in an open way) I'd love to hear about them!

One idea I've had is to use a clustering algorithm like k-means to get two groups of points, and filter out the outliers, and then continue to apply slightly naive two-finger algorithms to build rotation/scale/translate matrices. Are you an old school multi-touch/reactivision hacker? Have you built touch tables for a living? Does all of this sound familiar to you? Let me know your thoughts!

If I Had More Time

"Mr. Micawber was waiting for me within the gate, and we went up to
his room (top story but one), and cried very much. He solemnly
conjured me, I remember, to take warning by his fate; and to
observe that if a man had twenty pounds a-year for his income, and
spent nineteen pounds nineteen shillings and sixpence, he would be
happy, but that if he spent twenty pounds one he would be
miserable. After which he borrowed a shilling of me for porter,
gave me a written order on Mrs. Micawber for the amount, and put
away his pocket-handkerchief, and cheered up."

I am the Mr Micawber of time, being that I'm over-spending just slightly this month. Hopefully I'll make it up this year!

If I had more time I might blog about a small revival in minimal geeky location-based fun stuff that's happening with sites like noticin.gs and blockchalk.com. I might also note that foursquare got funding which is good because even though I'm not particularly attracted to the service it's a better experience than its competitors by a long way (and much less creepy, I think). And I'd note that opengeodata.org has stopped being about OpenStreetMap exclusively and that if you want to get Steve Coast's attention there are a million things he's thinking about these days.

If I had more time to blog and more time to think, I'd stop leaving cranky comments trying to answer Manuel Lima's false dichotomy and Robert Kosara's straw man and I'd stop worrying about definitions of data and aesthetics and analysis and I'd be happy to frame the argument in terms of prickles and goo instead.

"it is inevitable that there will soon be a large number of hybrid designer-engineers that shall radically reconstruct the visual landscape." – John Maeda

This debate isn't new and it's not going away either. John Maeda and friends have been pointing out the rise of gooey-prickles and prickley-goo for years. I wonder if prickly folks at RISD are getting gooier, and vice versa.

My money's on the middle ground too, which is why I find narrow and divisive definitions so frustrating. Why can't we have aesthetically pleasing data analysis? (Of course there will be pure analysis with no emphasis on aesthetics, just as there will be pure aesthetics with no emphasis on data. Sometimes the latter with be art to make a point. That's cool!)

If I had more time to think and blog, I'd have told you about our intern Amy Martin and how she worked with us over the summer on some Wikipedia stuff to hone her hybrid designer-developer skills, and how that seems to be paying off nicely. And I'd mention the new GAFFTA space in San Francisco that is running workshops also recognising this kind of work without worrying overmuch about definitions. We'll be there next month.

Gosh. If I had more time I'd never blog.

Interviews! Everything!

This week, Eric and Geraldine updated the Stamen homepage to include a list of Everything, Everything and Kicker Studio's Jennifer Bove posted an interview with me and Boris Anthony from Dopplr about information visualisation for Creativity Online.

Before that, but I've been slow to update, Tish Shute posted a long and detailed write-up of Where 2.0 and WhereCamp featuring a couple of quotes from me and a lot more from Aaron Cope.

js-vector-maps on github

I've been experimenting with some javascript classes that mimic the structure of mapnik's Layer/Style/Rule classes and render OSM data (via GeoJSON) to a <canvas> element. I've also finally taken a look at how github works, so I've decided to share the initial code there in case people are interested. If you don't want to check the code out for yourself there's a demo page here (tested in Firefox and Safari only, so far).

Historical Hurricanes & Oakland Crime

Continuing three years of exploration and development at the intersection of mapping and time; a quick post about two new things I've been working on at Stamen.

Last week we released a Historical Hurricane map for msnbc.com, a follow up to our forecast tracker from last year which was recently accepted into the SIGGRAPH Information Aesthetics showcase. You can read more about the historical map on the Stamen site, or just go ahead and explore the finished thing:

Further to our updates earlier last month, we just released another round of improvements to Oakland Crimespotting. Mike and Eric have full details. I'm particularly pleased that we're able to open up our archive of around two years worth of data, but also that we're able to try something new with an interface for filtering by time of day.

We jokingly started calling this a time pie, and now we're stuck with it... in a good way. I'm still not 100% sure it's intuitive, but I think that working the real sunrise and sunset times in there should help. The only comparable interface I could find was this:

If you know of any other similar ways of selecting/filtering 24 hours, let me know in the comments!

Cloudspotting

We've been working on some updates to Oakland Crimespotting recently and Mike released the first iteration today. The most significant change is a switch to base maps using OpenStreetMap data. We're using the Pale Dawn cartography that we (Stamen) designed for CloudMade exactly as it's intended: a subtle backdrop for data that still includes the richer local information that OpenStreetMap contributors (like Mike) cover best.

Other changes we've made include numerous small performance optimisations, new sliders in the marker info-bubbles, date labels on the timeline and the crime-type filters now double as a full legend. The whole thing has had a design overhaul too thanks to Geraldine.

We've got a few more features planned for release soon, and we've started a blog to keep track of new developments. Now is a great time to let us know if you have suggestions or feature requests! Feel free to leave a comment here or email info@crimespotting.org if you prefer.

Android Tinkering

I got an Android dev phone. Geeks talk.

I've heard it said that this would be the best phone in the world if it wasn't for the iPhone*. I can believe it. So this is the second best phone in the world, and you write software for it using Java and (optionally) Eclipse. I know Java and I use Eclipse all the time for writing Flash apps, so this is a tempting prospect: world class hardware, easy to use software. Let's go!

* We can debate what it means to be the best phone in the world at the moment - suffice to say that I know that hardware alone will never do it. Apple's retail experience, customer support, iTunes store, developer tools etc. all leave Android and others with a lot of work to do. But it is a nice phone, certainly. I also haven't been using the phone for voice, nor have I been syncing my emails and calendar with the phone... so this isn't a review by any stretch of the imagination.

There's a brand new update available for the Android OS, version 1.5 aka "Cupcake". My phone came with 1.1 and despite some prodding it wouldn't go ahead and upgrade itself. So I had to download the 1.5 updates and do it myself. That page is full of long and complicated explanations but basically you're just copying files, renaming them to update.zip and rebooting the phone, twice. (Mine got confused in the middle because it finally started to automatically update itself and I let it. If that happens just ignore it and continue with the manual process and everything should be fine.)

My main focus with tinkering with the phone has been to get the API demos running so I can get a sense for how easy it is to work with the Google MapView classes and also how much boilerplate code I need in order to load data over the network and draw pretty things with OpenGL. The Hello World tutorial worked straight away: if you have the phone plugged in it automatically installs your app and runs it on the device, if not then it fires up an emulator. Getting the API demos up and running was a little trickier because it involved importing the project from android-sdk-mac_x86-1.5_r1/platforms/android-1.5/samples/ApiDemos first, but it did work after I upgraded to Cupcake.

For the MapView to work you need to jump through some app signing hoops before you can get a Google Maps API key that will allow the device to load map tiles. The documentation is quite dense but if you're just playing around in Eclipse you can sign things with your debug key; in this case the API key signup page tells you what to do. Just be sure to log in with the same Google account you'll be using in the Android Marketplace, if you get that far.

Once I'd kicked the tyres with the demos I decided to jump straight in and try my hand at an app that loads data from a web service and displays it on a map. The learning curve was OK, here's a list of things I wish I'd known about before I started:

All in all it took me just over a day to get to the point where I felt confident that the phone was doing what I was telling it, and that there wasn't too much magic and surprise crashes were rare. The next thing I want to investigate is the OpenGL ES implementation, which I'm hoping is as slick as the iPhone's. I've been keeping a list of android links I think are worth reading at del.icio.us/TomC/android - let me know if there are any other neat/essential APIs in the Android universe that you think I should take a look at.

Dataviz Salon SF #1

Michael Driscoll of Dataspora invited a few people to a Dataviz Salon yesterday evening. Mike and I went along and huddled in a brick-built basement in SoMa to listen to the following:

Thanks to Michael for putting on a great event and getting everything together at such short notice. Hopefully there'll be another one soon!

← Before