Live Labs Pivot meets Flickr for the 12×12 Vancouver Photo Marathon

Guest post by Ole Rand-Hendriksen.

So my brother Morten came to me with this idea about making a pivot project for the 12×12 Vancouver Photo Marathon 2009 where he basically wanted to be able to sort the images in categories, photographer, gender, winners and so on. He hadn’t really looked into how pivot works, but he thought this could be something that I could probably figure out in a couple of hours or something.

I followed the links he gave me to the pivot site and some instructional demo videoes. But i didn’t really have the patience to go through them all. So I did what i normally do; which is take half a look at the specifications and then just try it out.

I started by downloading pivot from www.getpivot.com and looking at how it works, which is still a bit confusing to me because of the seadragon technology and the image sorting, but I’ll get into that later.

Then i started reading about how pivot works, and the data part is actually quite straight forward. It’s basically just xml files where each item has some properties, and in the beginning of the file, it says what kind of properties and if you should be able to use them to sort by.

The more confusing part is the deep zoom collection part, which is the part that makes all the trouble. Basically deep zoom collections aren’t dynamic at all (someone please prove me wrong), which is very anoying. Since it means that you have to host all the images locally on the server where you have the pivot collection.

And then i started to read up on how to make pivot collections. There are according to the pivot site 3 ways of making them;

by using the commandline tools

by using the excel tool

by making the tool yourself.

Since i concidder my self proficient in excel i decided to use that method on this project. So I downloaded the tool and installed it (link).

Then i went on to figure out how to get all the data I wanted from the 12×12 Vancouver Photo Marathon Flickr sets. The easiest way i could think of was to use the rss feeds and try to parse them in some way or other. I ended up using a rss parsing library for python from http://feedparser.org/ and i wrote a very simple script that went through all the set feeds and parsed them into a more usable .csv file.

The pivot plugin for excel is a bit buggy, so you can’t really import data directly into the fields, but when you have the data in another document, you can just copy each column in where you want it. It takes some time for the previews to load though when you are working with a few hundred images that are all online, so be prepared to spend a few hours doing something else if you try.

Another bug that’s nice to be aware of, is that if you by accident make too many rows in your collection, you won’t really be able to remove it. When you’ve added all the data you want, you just push the publish pivot button, and then save it where you want to. This can also take a few hours. When it’s done, pivot will open and you can view your collection.

Since pivot utilizes Deep Zoom and Seadragon, the images are sorted into a gazillion small files that will take forever to upload to a webhotell by ftp. so make sure you are using as many connections as you can. Also it’s very annoying that deep zoom is almost completely static unless you trick seadragon by using the api like Lang Dengdid for deep zoom images with his project, though i don’t know if there’s an easy way of doing something like that for deep zoom collections.

I’ve got some ideas for further pivot projects but I don’t know if they are possible to make yet.

So to make a dynamic collection, you have to make the image handling yourself and fit it into the very strict form of the deep zoom pyramid.

I see that the Wikipedia collection doesn’t have layers higher than 9, so the images themselves aren’t really deep zoom. I haven’t really found out if the images are generated on the fly or not.

Making dynamic cxml files actually looks quite intuitive and shouldn’t be that hard once you have an idea about how to make it.
But collection and tile handling is not what i would call intuitive. The hello world example on the bottom of the hosting page doesn’t really tell me that much since it doesn’t really generate any images http://randriksen.net/collections/PivotCollectionFiles/HelloWorld.cxml

And from what I read about it, it’s not supposed to for some reason since it’s really only an explanation of how one could make a collection and tile handler, and it doesn’t really seem to do anything. Which i find sort of confusing since hello world examples usually actually demonstrate that the code works.

I’d really like to see a code example of a dynamic collection with only 3 or 4 images, with the code to a collection and tile handler that I can see and dissect into something usable. It would be a lot of help since I’m not really that into image handling.

There have been a few products/prototypes out there that do dynamic deepzoom collections. Deepzoompix was one of them (http://en.wikipedia.org/wiki/DeepZoomPix). I know there was another that let you just point to a flickr account, but I can’t find it atm.