h1

Beautiful timetables

November 11, 2007

Because I wanted a clear and compact way to display the timetable of the tram nearby, I created a small project. My goal was to have something more ‘visual’ than a list with numbers. I am interested in new ways to display information and what’s nice about it and why.

Preview of output

I think the result is something that has a bit of a learning curve and is therefore less suitable for ‘one-time’ usage. On the other hand, because it’s more of a picture and not a bunch of numbers I think it’s much easier to learn the timetable by heart for regular users.

For specification I wanted a small and simple language and preferably not start with writing a parser, so I decided to hitch a ride with Haskell first.

I’d love to hear your opinion, both a first reaction and after experimenting with it.

ยป Download it

(view readme or view haskell module)

About these ads

6 comments

  1. Nice. One little coding hint:

    mapM_ f xs = sequence_ $ map f xs

    there’s also the forM_ variant with arguments reversed.

    You might also look at the Text.Pretty library for an IO-free way of doing the rendering of documents from Haskell values. An example is the generator for the haskell weekly news, http://www.cse.unsw.edu.au/~dons/code/hwn/utils/publish.hs


  2. That looks cool, and the code is still pretty small. Nice work!


  3. That’s lovely! Maybe you can increase readability by coloring the dots and adding a light-gray finer-grained horizontal grid.

    Maybe I’ll take a shot at it, but I’m not familiar with Tikz at all. Yet.


  4. @dons: thanks, I guess the code can use some refactoring ;)

    The code doesn’t do much, actually. I forgot to tell something about the ‘features’ in the post but some thing it does:

    * Minimize the width of timetable by splitting at the biggest ‘gap’ (and not at midnight).
    * Calculate all sets of days, sorting them on the number of days.
    * The colors of the sets go from dark to light. So, the darker the dot, the more days it accounts for.

    @Ben: the reason the dots are gray is mainly that it should be printable on my laser printer ;)


  5. Hee tof, maar hoe kan ik hiermee aan de slag?
    groet van een trambaangenoot.


  6. Hee Pim, het is op dit moment nog allemaal een beetje sterk gekoppeld met Haskell. Je hebt dus een Haskell compiler (zoals http://haskell.org/ghc/) nodig. In de zip zit een README.lhs met een klein voorbeeldje en verdere uitleg, had je die al gezien?



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: