# Seeing Data

## Visualising the New Zealand Budget 2011 with TreemapsChris McDowallMay 20

It is really difficult to grasp the significance of lots of big numbers. It is even trickier when the numbers are organised in a hierarchy. For example, yesterday afternoon Bill English, the Minister of Finance, delivered his third budget, outlining the nation’s revenues and expenses. The budget includes details such as how the government plans to spend \$21 billion dollars on social development in the coming year of which \$9.5 billion will be spent on superannuation, almost \$1.9 billion on the domestic purposes benefit, nearly \$1.6 billion on accommodation assistance… and I’m already lost.

Treemapping is a technique for visually comparing groupings of numbers. A treemap represents a hierarchy of numeric values as a set of nested shapes – usually rectangles. I’m fond of this technique for several reasons, not least because it plays on existing associations. Big rectangles represent big numbers. Rectangles inside other rectangles indicate that one thing is part of another thing. Rectangles can even be shaded to depict an additional variable, for example, an increase or decrease over time.

Last night, with the assistance of Keith Ng, I created an interactive treemap of the New Zealand budget. It is available here. I encourage you to have a play with it. Unfortunately, given the large volume of data that needs to be processed and rendered, the visualisation struggles on every browser except Google Chrome. If you have Chrome on your computer, I highly recommend that you use it to view the visualisation.

There are two levels to the treemap. The top level shows the breakdown of various expenditure areas. The bigger the rectangle, the more money is being spent. Green rectangles indicate that spending has significantly increased since the last budget; red rectangles indicate a decrease. When you click on any spending area, the visualisation will dive into that area and show a detailed breakdown.

If you are interested in learning more about treemapping, I suggest you read Ben Shneiderman’s account of how he developed this class of visualisation and Thomas Kerwin’s survey of treemap techniques. Wikipedia has handy list of software if you want to create your own treemaps.

## An animated map of Auckland’s public transport networkChris McDowallJan 20

I grew up in Auckland and spent many years using the city’s public transport system to get from place to place. While sitting on a bus, I sometimes wondered what the transportation network would look like if we could see the movements of the individual vehicles from the air. I would try to visualise the aggregate trajectories as each vehicle carved a path through space-time. After a few moments I would get hopelessly overwhelmed and go back to reading my book.

Last year Auckland Transport published its Google Transit Feed data on the MAXX website and I realised it provided the information I needed to make the map I used to daydream about. The data is a series of (large) spreadsheets, each describing a different aspect of the bus, train and ferry network. Last week I downloaded the spreadsheets and wrote some software to transform the data into an animated map.

As usual, I recommend you full screen the video and watch it in high definition.

The animation begins at 3am on a typical Monday morning. A pair of blue squiggles depict the Airport buses shuttling late night travellers between the Downtown Ferry Terminal and Auckland International. From 5am, a skeleton service of local buses begins making trips from the outer suburbs to the inner city and the first ferry departs for Waiheke Island. Over the next few hours the volume and frequency of vehicles steadily increases until we reach peak morning rush hour. By 8am the city’s major transportation corridors are clearly delineated by a stream of buses filled with commuters. After 9am the volume of vehicles drops a little and stays steady until the schools get out and the evening commute begins. The animation ends at midnight with just a few night buses moving passengers away from the central city.

Some things to note:

• The steady pulse of the Devonport Ferry.
• The speed at which buses hurtle down the Northern Motorway’s new bus lanes.
• The interplay between buses and ferries on Waiheke Island.
• The sheer mind-boggling complexity of the system.

Please note that there are a few quirks in the animation. A couple of ferry services pass across the land and there is at least one erroneous harbour crossing. These errors are not problems with the MAXX schedule – they are errors introduced by missing geometries. I will attempt to rectify these issues at a later date.

## So what is an API and why does it matter that Trade Me just released one?Chris McDowallSep 30

This afternoon Trade Me announced the release of their developer application programming interface (API).

This is really cool news … but why?

An API is a set of programming instructions and standards that enable different software applications to interact. Hmmm …. that’s the sort of description that probably only makes sense to people who already know what an API is. Perhaps it’s easier to look at a couple of examples.

In recent years many organisations have released interfaces for other software developers to use to build cool new things. One reason you see Google maps all over the web is because Google have a rich, well-documented, easy to use family of mapping interfaces available for people to make custom maps with. Using Google’s APIs, developers can embed interactive maps into their websites and access many geographic services, such as driving directions and adress geocoding.

Closer to home, DigitalNZ is an initiative led by the National Library of New Zealand to help people find, share and use digital content from government departments, publicly funded organisations, the private sector, and community groups. Something that is really neat about the DigitalNZ API is that you don’t need to be a programmer to use it. For example, you can create your own custom search engine and embed it in your own website. Give it a try – it’s fun!

I am excited about the release of a Trade Me API for two reasons. First, creative people will make new web and mobile applications that work with Trade Me’s data and services to do useful and clever things. Second, there is an opportunity for people interested in data visualisation. Trade Me has become an important aspect of our collective consumption habits. The API opens a door to this data and I hope we will see inventive mash-ups and visualisations over the coming days and weeks.

P.S. If you do start playing with the Trade Me API, be sure to follow the terms and conditions.

Network-wide options by YD - Freelance Wordpress Developer