Wednesday 29 October 2014

European airports dashboard - improving usability

Gradually adding more countries, but focusing more on the usability of the airport-comparison dashboard.

Tried out hierarchical menus in Tableau (countries, then airports), but not very smooth, and as I saw someone else comment, this can slow things down. 

So instead I settled for letting you search for airports and then tick them - this seems quite forgiving. Coupled with the fact that I've merged ICAO 4-letter airport codes and airport names to help readability, you can search on both at the same time.

Enjoy.



Monday 27 October 2014

Tech - Eurostat data

I take back what I said about the difficulty of accessing Eurostat data, having discovered SDMX, their web service method for extracting their data. Yes, it's still not trivial to use, but thankfully some kind folk from the Bank of Italy have provided an R package, RJSDMX: Attilio Mattiocco, Diana Nicoletti, Gianpaolo Lopez, thanks a lot!

So, look forward to a broader range of data becoming available soon.


Sunday 26 October 2014

Tableau - first flights

The Eurostat data on flights, seats and passengers aren't the easiest thing to handle. But here's a first attempt - a dashboard that is intended for comparing a small handful of airports.

This is a test, only Ireland, Belgium and Denmark are currently loaded. Some of the values need further checking. Oh, and I've only loaded data up to 2012 since recently it seems there was some problem with 2013.



Saturday 25 October 2014

Tableau - Energy dashboard

Still trying to get the date axes to zoom - without success. But improved formatting, including working out how to get two curves on the same axis, and get rid of the default which is then for the right and left axes to scale differently.

As a result, something which I had not realised - how close the night and day consumption of electricity actually is.

Also found

  1. That the dashboard updates in the blog automatically when I add to it.
  2. That you can get drill down up (see the bubble plot) in certain circumstances.



Tableau tech - converting from reading to rates

Technically, I didn't make my life easier by starting with an irregular series of meter readings of electricity and gas for plotting in Tableau. 

I was determined that Tableau should do all the work. I just provided a .xls file with dates and meter readings, rather than tidy up in Excel/OpenOffice. Tableau read and understood the file happily enough - though it thought 'Day' was a date rather than a reading of daytime electricity, it was simple enough to move the variable from the 'dimensions' to the 'measures' section.

I had to convert the data from readings into some sensible units within Tableau: I chose daily consumption rates.

This took 2 steps:
1) Convert the dates of the readings into number of days:
Define the measure 'DayDiff'  as 

DATEDIFF('day',lookup(Max([Date]),-1),max([Date]))

2) Then calculate the rates. For gas there is a multiplier to get to kWh (9.8805 according to my supplier)

GasRate
9.8805 * (Max([Gas]) - lookup(max([Gas]),-1))/[DayDiff]

Why you have to have the aggregate function (Max) around the variable, I don't know, but Tableau insists.

First steps with Tableau

I wanted to try out Tableau, and chose to start with some data of my own. 

After quite a lot of trial and error, I ended up with this:



Pretty, though not interactive as I thought it might have been.
I wonder whether I'm much further on than I was when I was using R to explore the same data, and got this:
In some ways, I prefer the step graph in R, but I'll come back to that.