Piperka blog

Piperka Map

Force-directed graph algorithms are fun. Imagine a collection of particles, each repelling each other much like electrical charges do. Add springs between some of the particles, and let them all bounce around until they attain a rest position.

Hence, Piperka Map. I've modelled user data as a force-directed graph and put it available on a map page. The bigger the circle, the more readers it has. Relative closeness means that the comics have common readers. I've deliberately de-emphasized the exact subscriber count from the map. Mouse wheel zooms and the map can be panned by dragging. Clicking a comic opens up controls, where you can open up the comic's info page or, if you are logged in, subscribe to a comic. The quick search dialog is available on the map.

I've added links to the map from comics' info pages and from users' profiles. There's the option of highlighting another user's comic picks. Only comics with readers get a place on the map.

The map viewer code is my own and I haven't paid all that much attention to cross browser compatibility. It's built using SVG, which can require more support from a browser than some other technique. It works best on Chrome, with some glitches on Firefox and I've no idea how IE copes though I'm certain nothing below version 10 would work. The map is a snapshot from today, but I'll enable daily updates later on. I may yet alter the algorithm in ways which would change its layout. This isn't something where there would be some intrinsic right way of doing this, but it's all determined by aesthetics. As for my graph layout program itself, I'm considering releasing it as an independent project.

I suppose Piperka's subscriber data is pretty challenging from a data mining perspective. Most people read xkcd and any algorithm would find that out first. I may yet write about the current related comics algorithm, the one that is still labelled as "experimental". It, too, involves graphs but in a more abstract sense and something alike Gaussian blur from image processing. It's my original work, which rarely is a good endorsement for something like this. I may replace it with something yet, but for now, it stays.

Piperka Map was inspired by Ruslan Enikeev's The Internet map. When I saw it, I got immediately the idea that I had similar data in my hands and wanted to do something similar. With the amount of data I had, I could well do it all with plain old CPU code. Kudos to AMD for my FX-8350 which dutifully crunched numbers during my numerous attempts at getting something sensible looking out. The first thing I did was to make my code run in parallel.

This all doesn't have much to do with catching comics' updates. Then again, Piperka isn't necessarily about that only. It was interesting so I wanted to do it.

Sat, 26 Oct 2013 17:11:25 UTC