mnot’s blog

Design depends largely on constraints.” — Charles Eames

Friday, 17 December 2004

Australia Web XML

Tufte would be Proud

The Australian Bureau of Statistics has released a very cool SVG-based animated population pyramid ( non-SVG preview) that very nicely visualises the change in that country’s population over time. While the pyramid technique is fairly common, the addition of a fourth dimension — time — and the ability to track a cohort through it really brings the data to life. Try the “highlight surplus of males or females” feature to see when you’ve got the least competition.

Interestingly, the data behind it is a file full of javascript arrays, so I have to wonder why they used SVG instead of Flash; isn’t the whole point of SVG that it enables you to use XML for the underlying data, thereby exposing it for easy reuse?


Jim Ley said:

I don’t think that’s the whole point of SVG, if you’re using javascript anywhere, using XML is a real mistake, it’s so slow to parse and access we don’t want to do it. Most people transform XML into javascript object notation (Or don’t bother putting it in XML in the first place)

Incidently I think the graphs were originally created by the UK national statistics office, but you can see other countries data in the same format from

Sunday, December 19 2004 at 11:42 AM

Damian Cugley said:

If your data is easily available in XML, there are several approaches to using it in SVG. First, it may be easy to generate the SVG automatically from it using XSLT (mainly the case for fairly static charts). Second, you can embed XML in the SVG and process that using the DOM functions: I used this technique for the dealer for my SVG-based tarot deck 1.

Storing data as JavaScript objects also makes perfect sense. If it is embedded in the file it probably makes little odds one way or another. If the data has to be downloaded separately (e.g., using some technique similar to that used by Gmail) then JavaScript might indeed be faster to parse.

Monday, December 20 2004 at 8:45 AM