Friday 13 November 2015

Using Show Me without using Show Me

At The Information Lab we are rather lucky to have so many certified Tableau trainers. This means that we get the chance to teach either complete newbies the FUNdamentals of Tableau or how to leverage some of the more advanced features of Tableau very often as there are not that many trainers out there. We also get the chance to teach each other so much that we won’t otherwise come across. Why is this important you rightly ask? Read on…

This week I the chance to teach some very bright analysts how to make the most of their skills with Tableau. Whilst teaching the attendees about the Marks Card through a technique that I call ‘Whiteboard Tableau’ (more on this soon), one attendee Natasha corrected me about the way to create a Stacked Bar chart without using the Show Me panel.

Normally I would say add your discrete field (blue pill) that you want to be your bars on to the Column or Row shelf (depending on whether you want a vertical or horizontal bar chart respectively) and add the measure (green pill to the opposite Shelf you placed the discrete pill. To create a stacked bar chart you can then drop what you are dividing each of those bars by on to the Colour Shelf of the Marks Card. Easy.

But I heard… “Just drag the new discrete field on to the bars and it colours the chart”. I froze, not wanting to say “No Tableau doesn’t work that way” as I have learnt you never say that as someone has always found a way. Despite using Tableau heavily for the last three years, I never had come across this technique before. I got Natasha to talk me through the technique and it worked a treat.


I posted it on Twitter and got eight favourites and a retweet. The tweet even got a reply from my favourite English Zen in America:
Most people I have showed didn’t even know of this technique until I showed this guy:

(note the ‘guy’ in question is that clever one on the right not that other floppy haired fella on the left)

For those who haven’t come across Robin. I’m sorry. The man is a Tableau legend and always knows a trick or two to get you round that surreal blending issue or why that Table Calc won’t add itself to your Filter Shelf.

Robin instinctively knew the solution, “well, Tableau’s using Show Me”. Uhh? No, it’s not? I’m dropping it in to the view. Robin has an amazing teaching patience and didn’t call me the imbecile that I deserved to be regarded as. Watch the gif closely as the mouse reaches the View, it changes to have the Show Me logo pop-up.

What Tableau is doing here is using the Show Me logic that decides what is the best way to visualise the data you have selected. What I would have expected Tableau to do is treat this drag-and-drop in the same way that it would if you would double click this new discrete field (in the gif example ‘Category’). I would expect Category to be added to the right of Region (the discrete value dictating the bars). But no, Show Me is assessing that the best way to visualise this data when dropping this new discrete pill in to the view is to use it on colour.

How else can you make use of this?
Well understanding what Tableau is going to do in certain situations is key so the table below details what else happens when the Show Me logo pops up as you drag something in to the view

Starting Point
Type of new pill
Result
Basic bar – one discrete pill on columns and one continuous pill on rows
Discrete
Stacked bar – new pill used as colour
Basic bar – one discrete pill on columns and one continuous pill on rows
Continuous
Shaded bar chart – new pill used as colour as well but as it is continuous the colour is a scale rather than categorised
Basic Line Chart – Date on Columns, Continuous pill on rows
Discrete
Depends – if there are less than 20 Discrete Values then Table picks colour, if there are more then it just add the new field to Detail and created multiple lines
Basic Line Chart – Date on Columns, Continuous pill on rows
Continuous
Colours the existing line by the new data field
Part to Whole Chart (Treemap, Packed Bubble or Pie Chart)
Discrete
Creates additional rows using the new data field but retains the marks type
Part to Whole Chart (Treemap, Packed Bubble or Pie Chart)
Continuous
Creates additional rows retaining the marks type also but uses Measure Names and Measure Values to form the new rows

So next time you use Tableau, go a little slower and see what Tableau is doing is you might uncover something that you think is normal behaviour but isn’t, it could lead you to other time savings!  

Wednesday 4 November 2015

Keynote 4 – Data & Me - Hannah Fry



Maths is clean, data is not Mark J (a Wikipedia game) – you keep clicking on the 1st link on a Wikipedia page. Everything gets you back to ‘philosophy’. 95% of Wikipedia searches will take you through to Philosophy.

Mathematicians see 2 separate worlds – the real world and the mathematical world that can describe what is going on around you. Data provides the link between the two worlds. OK Cupid intentionally build in data collection elements. Men’s rating of women is a nice bell curve. Only 1 in 6 women rate men as above average HF started to focus on data with Google Trends – mistyping Google as Googlw is increasing massively. But why are people Google, Google anyway?

London Cycle Hire – spikes found in usage as people cycle downhill but won’t cycle as much back uphill Visualisation of transport mapping for every transport type in London is fantastic. Analysis done on worst place to have an issue and it was found to be Highbury & Islington. There are very few options of a different route if there is an issue there.




Data isn’t the end of the story it’s only the beginning Team collected gelocated tweets to see the second language in London and where they are located. A French community actually turned out to be one Frenchman tweeting a lot in just French. This led HF to think about the ‘Trough of Disillusionment’ and about what data you leave in or takeaway. Can lead to misleading conclusions.

Austerity issue – economic theory – you don’t grow when you have high debt as a country. New Zealand had only one year (1951) of high debt but didn’t weight the data so the New Zealand result skewed the results hugely. With mathematics you can only have absolute truths where data can be cut in different ways.

‘Street Bump’ app to detect when your car goes over a pot hole so the local government can find road quality issues. But this twisted the results as only the more affluent had smartphones and the inclination to download and use the app (or have a car to ride in). The challenge of encryption is tough but geolocation on your apps show your normal behaviour. Ie when you leave home and posting any gelocational tweets or messages.

The data revolution can give you new insights. A 17 year old boy wearing an Apple Watch showed his heartbeat was very high and remained high after exercise. He went to the doctors only to discover he was having heart and liver failure.

Prediction is the holy grail. Humans have a prediction addiction. “We can predict everything but the future”. HF doesn’t think anyone has made good predictions about the future. Likely is possible but exactly is not possible. Probability is the only way we can really predict what is likely to happen. 

Serial killer, Dr Harold Shipman chart of his patients’ deaths showed a massive increase in deaths in the afternoon in comparison to all other doctors. Police want to be able to search through events and find potential suspects. You are looking for trends that rely on very few assumptions. This can be used on infectious disease or bomb factories.


Wednesday 21 October 2015

Web Data Connectors

Craig Bloodworth

There are many data sources that would help us understand the world around us that are still only exporting .csv so how do you automate these? Web Data Connector

There are resources out there. You need the Simulator and SDK. Don’t be afraid to google and use other people’s code.

The WDC allows you to use a connection that is hosted on a webpage (and been written by someone else) and works just like a Driver for a database.

HTML – the building blocks of the page
CSS – the styling of the page
Javascript – the engine that is running in the background.

In Javascript there are Variables (like a Parameter in Tableau), Objects (a Variable that has many properties) and Functions (the elements that do the work)

HTML DOM – native set of functions to Javascript
J Query – a bit quicker to write

Event Listeners – waiting for certain user actions like a click

Arrays – like a shopping list
AJAX – how to connect to an external web service
JSON – hopefully the data will be in JSON as it is made for Javascript
Loops & Logic – need to be able to loop through those

Recommended read: Javasccript & Jquery by Jon Duckett

Major components: 1. User interface, 2. API interactions & config, 3. Decalre column names and data types, 4. Build data table
Major Compnents in coded order: 1. Declare column  names and data types, 2. build data table, 3. API interactions & config, 4. User interface.


Build through adjusting an existing WDC to help you see the changes you are making to see the effects.

50 Shades of Data

Matt Francis

1666 Isaac Newton was looking at Optics when he discovered the Spectrum. Split out 7 colours, he chose 7 as there are 7 musical notes.

This led to the idea of the colour wheel. This developed in to colour theory.

Colour is a fantastic tool.

Las Vegas uses colour to draw your attention to suck the money out of your pockets.

Colour theory: 3 primary colours (fundamental). The colour wheel helps us pick complimentary colours. Complimentary colours are those that are on the opposite side of the colour wheel. Orange & Blue contrast nicely. Used in film posters a lot sun / sky.

When picking colours you have to be careful about the perception of colour. Colour should always enhance the visualisation.

People see colours differently. Should we use Red / Green? We understand Red is Bad and Green is Good. MF’s says yes you can use it. If you use it for yourself but if it goes public then you should avoid it. You can use high contrasting colour.

Use vischeck.com to check your visualisations for colour blind tests. Stepped colour makes it easier to use as tone can be distinguished.

Colour has associations and so can act as a short cut. Colour is one of the first things we see so those associations happen before we have read the content.

Colour highlighting has two types: 1 Biased highlighting (something is wrong) and 2 Impartial highlighting (interesting)

Colour can be used to bring emotions out. Downward bar chart to show gun deaths. Make it red and it adds the emotional element.

Colour Themes – Matt’s viz about fast food calorific content was perfected through colour choice. 

The colour matches the theme. Chart colours need to fit the theme and relate well to the theme of the overall dashboard.

Tabpal.co – upload an image and it lets you select a colour palette. Add these to your custom colour palettes in you preferences file (My Docs > My tableau Repository > Preference.tps)

Colour theory gets us 90% of the way there but we should play with colour too


Using the medium default colour palette is a nice tip to avoid overly contrasting colours.   

Data15 Keynote 2 – Daniel Pink

New style of work – free, independent from the Corporate fixed roles where you are passionate for what you do

Books include: “A whole new mind”, “Drive”

Today’s session we will look at “what motivates us” from a data driven perspective

Two types of knowledge: 1. Explicit knowledge (you know it and can show it) 2. Implicit knowledge (you know it but you don’t know you know it)

The laws of motivation are very evident. If you reward behaviour you get more of it. If you punish behaviour, you get less of it. You don’t need a hypothesis to test to understand this. If your unlying laws are a little off then you will misread situations. Punishing behaviour doesn’t always result in less of that behaviour.

4 economists did 9 tests in America and India. Everyone was treated the same way across a series of challenges except the reward they were given. Participants got 3 different levels of reward for good performance. India’s reward was a lot higher relatively. For mechanical tasks the highest reward group performed the best. “But once the task called for even rudimentary cognitive skill, a larger reward led to poorer performance”

Controlling contingent reward – if / then rewards – great for simple and short term work. Humans love rewards (it’s the definition of the word!). Rewards get our attention and focus. If / then rewards are not great for long term and complex tasks. Great for algorthymic tasks (ie follow a simple set of steps). If you are solving a creative task then you need an expansive view where you don’t have that laser-beam focus where you narrow your thinking. This contradicts our Implicit knowledge so this is why we don’t find this in every day society.

Animals are implicitly aware of fairness. If you have uneven pay levels, you will get rebellion. You have to pay people enough.

If you are getting people to do long term complex work, then you want them to stop thinking about the money

Autonomy, Mastery and Purpose – are the 3 key elements of work

1. Autonomy – let’s think about management – DP argues that management is a technology designed in the 1850s to produce improvements in task completion. You still need compliance but people don’t produce their great work when they are compliant, they do it when they are ‘engaged’. 2 in 10 people are actively disengaged in the workforce. You have to have sovereignty for your employees if you want engagement.

Zappos is the extremem version where there is no hierarchy or management.

Netflix is less extreme – their expense policy is “Act in Netflix’s best interest”

If you have autonomy on Time, Technique, Team and Task then this sovereignty gives you much higher engagement.

Atlassian – Australian Software company. Each week you have a ‘Ship It’ where devs work on what they want as long as they show it to the rest of company

Columbia Credit Union – one manager gives an hour each week to go and do something different than answer the phone. Called the ‘Genius Hour’

Manchester University – have ‘Friday Evening Experiments’ that “You’re allowed to do whatever you want as long as it is not boring” – no funding just try stuff. Led to Graphene discovery and a Nobel Prize.

So the message is carve out a few ‘Islands of autonomy’ – create space to try something different.

2. Mastery – “making progress in meaningful work” has been found as the key element. Feedback is vital to showing the progress is being made. Millennials have grown up where they have information at their fingertips the whole time. In organisations, the feedback disappears and is done every 6 months.

Two ideas – 1. weekly one-on-ones with a twist. Every monthly meeting ask ‘Love and Loathe’ rather than what you are working on. Career long term or Removing Barriers. 2. Progress Rituals – Humans create rituals to understand the world. Write down 3 good things that happened each day.

3. Purpose – How / Why – if you are struggling and find out the How it gets focus. Why gives the focus as it creates a purpose to deliver against. Have 2 fewer conversations about How and have 2 conversations about Why.


We have the chance to run organisations that work with the grain of how humans work.

Tuesday 20 October 2015

Minority Report in Tableau

Allan Walker, Anya Ahern and Jeffrey Schaffer

Preface: There are not enough words that I can use to describe this session. The experimental work done by these amazing Tableau Zens is phenomenal. I have given hints at what the content is below but until you see some of the techniques the team have come up with, you can only use your imaginations. That is what this session is about. Using the fundamentals in Tableau and setting up experiences to allow you to interact with the tool in an entirely new way.

_____________________________________________________________________________ 

Where it started: Tableau Reader was all there used to be until Tableau Server arrived. But that wasn’t enough!

The Javascript API allows you so much access to try to do anything.

The CSS set-up allows you to do a whole lot of fun interaction.

The team have created the ability to take the visualisations from Tableau Server and create your own webpage.

Reveal.js – can create slide transitions but loads the visualisations up front

The team have used Leap Motion to interact with visualisations by just hand movements (and not with a mouse!)

Anya has taken inspiration from the James Bond film Skyfall to create real time crime, traffic, fire and weather data. All pulled together and controlled using voice and Leap Motion control.

I wish there was a video of this session as there is so much possible and it really is the future!
What the team wanted to do was to get the Minority Report all built in Tableau. And the team actually has. Wanted to build parallel processing, animated, movable and resizable and they nailed it.

Fighting Ebola with Tableau

Peter Gilks, Nelson Davis and John Mathis

The Tableau Foundation deployed Zen Masters and software to help fight Ebola

Tableau foundation began in 2012 and 2013 IPO of Tableau created funding for the Foundation. Aim 'to encourage the use of facts and analytical reasoning to solve the World's problems'. Does Mission Grants, Community Grants, Disaster Response and Employee Service & Giving.

The President of Guinea said “the Tableau Foundation work helped to transform the fight against Ebola”.

Volunteer network of Tableau experts eager to help non-profits to do more with data.

Background: 1st outbreak in Guinea in December 2013. There have been c.3800 cases and c. 2800 deaths. The GDP per capita is less than $500. There is a population of 10.5 million people
5 stage process: 1. Contact Identification, 2. Contact Tracing, 3. Diagnosis, 4. Treatment, 5. Safe burials

Electronic Data management and Contact Tracing was a big step forward. Used basic smartphones to capture the data. Data was sent straight back to the system so live updates were possible. It helps to increase transparency around the tracing.

CommCare created a simplistic app to capture data and create on the ground recommendations. Visualising the data was not the best so in stepped Tableau.

Data flow was a daily upload that goes in to SQL Server and the data was held on Tableau Server. 

Data was not always as clean as hoped. Training of colleagues was continual so this meant data quality was challenged here as well. Transactional data also posed challenges. It was also in French so that was added fun.

Cultural challenges was tough as trying to develop reporting for use of those that haven’t had high reporting exposure adds to the challenge.

Quick fire dashboards were the requirement rather than running extensive usability testing.

Level of Detail would have made the transactional data a lot easier to handle and measure but the team were using 8.2.

Scaffolding was used to get round date issues but adding a data filter to look at whether the data was less than today to make sure the records are reduced as much as possible.

Doctors used the dashboards to work out how to allocate resources and could make as many data led decisions as much as possible because if it wasn’t optimal more people would contract Ebola


You can volunteer at https://servicecorps.tableaufoundation.org

Data15 - NFL Digital Media: 32 Teams, 1 Dashboard

Presented by Allison Brown (AB) Senior Analyst, National Football League

Analysing all the digital media channels the league has. Used by all the teams.

Challenges: Reports were in Excel, wanted simple reporting, siloed datasets and no transparency between the clubs

Solution: Surveyed clubs to see what they were using, 29 clubs agreed to share their data, wanted infographic feel, need to combine 100 data feeds in to one interactive dashboard

First formative step was to create basic visualisations to augment the initial Excel reports

Switched to Tableau Online to avoid server set-up

Custom iconography gives it more of an interactive feel

Education was a challenge: Held a webinar to walkthrough functionality, set-up a google form for feedback, utilised comments to increase communication

Dashboard first iteration promoted all 32 teams to share and not just the 29. 90% of clubs log in at least once a week. The decisions about content creations are now being data driven


A few of the teams are using Tableau independently just from using the initial dashboards

Data15 - Tableau Opening Keynote

It’s that time folks. Christian, Chris and the Devs are about to take the stage in the MGM arena where Tyson and the Stones have starred. Big expectations! I’ll blog summaries of all the sessions that I go to if you can’t make it (or can’t remember them due to your Vegas excesses). This is a stream of consciousness so apologies for the spelling mistakes and typos in advance.

Christian Chabot (CC)
8th annual customer conference
CC  highlights the customer examples where the impacts of visualisations done everyday is making the world a better place through improving medicine, monitoring manta ray movement or childcare in local councils (Leicestershire County Council example).
Data is still growing and to help people everyone needs to become a ‘data person’.
La Nacion – “people don’t believe our journalists by what they write. They believe it because they can analyse the data themselves” all using Tableau. Showing the example that data is a way to empower people. “It’s not the people in power, it the power in the people that will change South America”.

Francois Ajenstat (FA)
“Tableau helps me be creative, even though I‘m not a creative person” – Ben at a retailer
This is the kick for the devs to keep making the software better
People who know the data should ask the questions – everyday people.
Software should be designed for deeper thinking – simple design shouldn’t mean simplistic.
Analytics at can drive change – data led collaboration can only exist when the software fits the culture of the company it is used in
More to be invested in R&D in the last 2 years than in the last 10
Developers on Stage is back!!
Areas of investment:
  1.  Data 
    1. Formatted spreadsheets with multiple tables in the sheet can now split out these tables using the Data Interpretor automatically
    2. Date Wrangling - Tableau Public showed over 250 different were in use. More automatic data / time coversion as Tableau becomes more intelligent. Just change the data type to a ‘date’ or ‘date / time’ and Tableau converts funky formats
    3. Union is here!!! Hover over the second data item over the first in the data preparation screen and new rows are added. Wildcard file names allows you to union lots of files all in a couple of clicks.
    4. Cross Database Joins – Adding connections all in the data preparation screen, goodbye blending. Row level, live querying across multiple databases. Publishing the cross database joins can be published to the server
  2. Visualisation
    1. Tables – Highlight tables with totals are dominated by totals. Now able to unclick ‘show totals’ in the colour dialogue box. Totals can be moved from bottom to the top row, from the right side to the left side of the table.
    2. Interactivity – Data Highlighter – on the marks card, drop the data field on the marks card and select ‘highlight selected’ and as you search the view changed on each letter to update the scatterplot. Add a data item to the ‘Data Highlighter’ and you can hover through a list and the screen will show the update as you go
    3. Maps – More data added – postcodes added for 76 different countries (1/4 million geographic entites).
    4. Custom Territories – similar to using grouping but finds the outside of the mapping polygons as one shape.
    5. Spatial data – New data connection group – ‘Spatial File’. New field type – ‘Geometry’ that loads as custom polygons on your map.
    6. Mapbox integration – add Mapbox maps in just a few click. Can add custom layers to your maps.
    7. Inserting charts in to Tooltips – in just a couple of clicks.
  3. Analytics
    1. Outlier Detection – Select multiple fields, right click and Create ‘Outlier Set’. Simply use as you would normal sets
    2. Clustering – in analytics pane and drop it on the viz. Tableau works out the clustering and have even shown the cluster outliers. A group is created to capture the results of the cluster. Can drop additional metrics in to the clustering algorithm.
    3. Drag and drop analytics – drag the reference band to colour and drop it to change the colours of the marks only with the reference band. Can drag reference lines to filters to filter up to that point
  4. Self-service at Scale (to make all companies data driven)
    1. New home page for every single user on Tableau Server. Collects your favourites and most visited views
    2. Content Analytics – hover over the content you are interested in and it shows the consumption rates. Bar charts show content views etc
    3. Server search – Thumbnails in the search. Results are ordered by views
    4. Version Control in Tableau Server. Click on history and select the old version and it gets moved across. Tableau Server making it safe to change your mind
    5. Permissions at the Project level – can manage permission at the project, workbook or data source owners. Project permissions can locked by the owner
    6. Tableau Server web manager application – apply changes to the Configuration in this tool. Lot friendlier interface
  5. Dashboards
    1. Web authoring – Table calc dialogue box looks but more importantly you can create dashboards in the browser
    2. Global formatting – in web editor can update fonts in the entire workbook (also will be available in Desktop)
    3. Cross Database Filtering – filtering no longer related to just one data source at the highest level
    4. Device Preview – Device menu allows you to select the device size of the view and change between models of phones etc Allows you to set different views using the same dashboard
  6. Mobile
    1. 9.1 Mobile release (already available). Favourite snapshots available offline. Mobile editing is available
    2. Mobile now available for the phone – layout built for thumb navigation. Intelligent selection calculated as you click.
    3. Geolocation - Maps centred based on your location
  7. Project Elastic now called Vizable
    1. Opens data sets from your tablet as charts
    2. Swipe to filter
    3. Swipe categories to change them
    4. Pinch to zoom in to get more bar charts being available
    5. Pinch to next level of drilldown
    6. Share instantly via email
    7. Heatmap histogram is a new chart type in Vizable
    8. Can zoom in to the individual record and get the row level data back visualised as a nice data
    9. Only available on the iPad at the moment.
    10. Vizable is free and available now


Tuesday 6 October 2015

Tableau Fringe Festival

If you didn't get a chance to catch the live session, here is the recording of my session from the inaugural Tableau Fringe Festival set up by Emily Kund and Jen Vaughan.

The overview - visualise what you love and you will find new depths (and friendships) all over the world. There's no need to be lonely!



Thursday 1 October 2015

#WatchMeViz - The Data School does the 'Sorting Bar Chart'


In response to Jewel's crazy Viz dancing. The Data School (and Chief Data Jedi Choreographer) created the 'Sorting Bar Chart' in response. Enjoy! 

Monday 28 September 2015

When BBC stands for Bad, Bad Charting!

The British Broadcasting Company is an iconic news channel the world over known for cutting edge reporting and breaking news stories in an innovative way. The BBC has slowly become the website that I consume the majority of my news through whether it is politics, business or sport (other news channels are available).

With the rise of data being collected about sports games to help the spectators understand the game further, I was excited to see where the BBC would take this data in playing back to their audience. The results have not been the quality that I would normally expect from an organisation the British nation largely has pride in. All the below come from this year’s Premier League season – enjoy and be ready to cringe.

Taking a bite out of the donut
Let’s talk about Donut Pie charts. This is actually a tough subject as I know it evokes a lot of emotion from a lot of people. Some people love the aesthetic they create, some people love their infographic feel and a whole lot of those who understand data visualisation really, really, really don’t like them.
I found Andy Kirk’s tweet below summarised a beautiful example.



So what’s wrong with this chart? The chart actually doesn’t stand out to me. Andy is right, the dots and labels are more dominant than the visual that should be helping the viewer see the story of the data. The story of the chart is challenging the commonly held belief that more possession equals more wins. The data shows that if you are the team with the most possession then you have won 41% of your games. A majority of results have not been a win. So why doesn’t the chart use colour to pick this story out? Why use two shades of blue to show win and loss (opposite results) with grey being used to show a draw. Would using a non-win colour, and a different colour being used for the win, be more effective? Or a colour scale showing the league table points that are returned from the game results?

Add to this the distracting dots that are not centred in the middle of the section they relate to, really do not help. The labels are huge and the dots, once your eyes spot them, can’t distract themselves back to the data visualisation. I would simply use the ‘donuts hole’ to host the 59% message rather than Total Games (Total Games of what by the way?).

I’m not going to say you have to have a bar chart for everything but there are a lot of ways to improve this chart… a lot.

Love any other chart type (except pies)
Like Andy Kirk, Chris Love knows a lot about data visualisation.



Pie charts are all about showing a part of an overall whole. The English football team have struggled for the last few years but in it’s entire history, the team have definitely scored more than 279 goals and had more than 6 different goal scorers (who did ‘Own Goals’ play for?).

Chris actually found a couple of examples of this chart ‘style’ used (same colours) but he is absolutely correct that this chart is ‘Useless’. The differentiation in scale is completely lost in this chart. I really can’t spot who had the most goals. Wouldn’t Yellow make more sense as own goals if you had to use this colour scheme (data visualisation and the brand police have a lot of conversations still to have to reconcile their differences). Again a bar chart ordered by goal scorer would be really useful to really see the message that is screaming out from the data. I’d prefer a scatterplot showing how many games it took to score those goals instead but I love scatterplots!

Making the difference seem overly large and therefore… newsworthy
The debate about non-zero axis’d charts has raged long and hard. This article by Andy Cotgreave (http://gravyanecdote.com/visual-analytics/breaking-the-real-chart-rules-to-follow/) swayed my opinion more and most. The next example from the BBC shows when a Zero axis definitely is needed.



I could run 0 sprints, I could ‘run’ at 0 km/h (and on a basketball court a coach has accused me of this) and this chart really needs to show the relative difference in speed between Billy Jones and Theo Walcott. Rob completely (and sarcastically) nails the chart by highlighting how slow Theo Walcott seems in comparison when in fact he runs a miserable 1.1% slower than Billy. Add the zero back on the axis and this chart would show… very little and that I fear is why the chart has had the 0 axis removed.

The average without context (or perspective) can be confusing
The goalkeeper spent the majority of their time during the 2nd half in their penalty area. Boom! Good insight that.

When Match of the Day first flashed this chart up, I let out an audible “ooh” as my eyes tore themselves off Tableau to stare at the screen to look at this chart in wonder. John (again another good authority to listen to on data viz) laid out a series of arguments that were similar to my thoughts about this chart. The main point that struck a chord with me was the chart misses the context of where were the opposition? What were there formation? This is exactly why I created this (http://datajedininja.blogspot.co.uk/2015/09/tableau-and-nba-moving-past-static-shot.html) to understand positioning on the pitch / court then you need to understand whether your team are responding correctly to how the other team are set-up. When attacking are you exploiting the gaps the defence is leaving?

In retrospect, what I find hardest to understand about this chart is why the chart tapers away from the camera when the point being made by the ‘analysts’ was that the team wasn’t playing closer to the opposition goal (or using the width of the pitch extensively enough). The taper of the pitch will always make the players seem more closely together than if the image of the pitch was reversed with the defensive team’s goal closest to the camera. The arrows on the pitch tell me what the direction of play was, I don’t need to focus on the Chelsea goalkeeper as this doesn’t help me understand the distribution of the players.



John makes many other valid points about average position and how that is a potentially misleading metric but I will let you read his tweets as he articulates those points a lot better than I could in the same number of characters.

Overall
I am excited that data visualisation is becoming more at the heart of the communication of journalistic points. We live in an age where data is becoming increasingly available for everything we do and therefore, we can quantify and prove elements of the world (even if they are as flippant as sport) that we previously just made guesses about. I have spent the majority of my career trying to take dry data and turn it in to something that is more easily consumed and more attractive to the casual observer but always trying to avoid creating a chart ‘for the sake of it’.

If the public continue to see a greater variety of charting then their ability to consume more data-led messages and make more data-led decisions in everyday life will increase but they won’t if all they ask for is a donut pie chart like that seen on the BBC. Banks and other service providers need to get across really complex messages with data but there is no way they can do that if the data viz guys and girls are restricted to bar charts as that is all the public knows how to instantly read until they see other types of visualisation that capture the attention about subjects they are passionate about.
So BBC, please keep making the British nation and world proud by being the leader in everything you do and just spend a bit more time challenging the clarity of your visualisations before unleashing them on us.


Thursday 17 September 2015

Tableau and the NBA - moving past a static shot chart

For those who know me, I have always wanted to achieve one thing with data - understand the NBA better. If you were (un)lucky enough to hear me talk in Seattle at the Tableau Public session in 2014 you know that the great basketball analysis I had come up with was this:


The Interactive Shot Chart: click on the image to go to Tableau Public


Don’t get me wrong, I was massively proud of creating this. It was the first time that I had used path, background images and a number of other techniques in Tableau. The visualisation allowed me to understand not just whether a shot was made, but added context to the shot by showing additional information about the pass that led to the shot. However, this was not sustainable. It took me four hours to map one quarter of one game. I’m a dedicated fan but there are limits (even when the Spurs are beating the Lakers).


I made an extra step when I stumbled upon the ‘Shot Logs’ on the NBA.com website. Have a look at all of the richness that is available from this part of the site: 


Stats.nba.com - All thanks to SportsVu data

I have already written about how I got the statistics out of this part of the NBA in the following blog: http://www.theinformationlab.co.uk/2015/08/11/the-nba-letting-you-get-closer-to-the-game/ Despite all the goodies in these pages (and the accompanying Rebound logs) this gave me a lot to analyse but still didn’t get me any closer to what I wanted to really create.


This is why I got really excited when a colleague sent me a link to this article in which Savvas shows how to get the X/Y movement data that I have been striving to get my hands on for the last few years. All of this is available from the NBA API. Savvas uses Python and as I’m not the greatest coder in the world, I took the path of ‘least coding’ and set-up Alteryx to do all the hard work for me.


With Alteryx you have the ability to connect to the API and grab the JSON output. By generating numbers you can, create a whole set of URLs from a base to scroll through the various events within a game. As a game returns circa 2 million rows of data through this macro, I haven’t made the macro to return multiple games. With Alteryx’s text input, it allows me to enter a Game ID once and then can reuse in multiple places throughout the macro. I have used this functionality as a second API call is made to bring back the play-by-play information.





You can download the module from here and see what I did at each stage.   


My favourite visualisation that I have created so far with this data allows you to pick any play throughout the game and watch the play unfold. As the ‘Pages’ shelf in server doesn’t allow you to ‘play’ the visualisation, I have uploaded a YouTube video of how this looks on Tableau Desktop.


But you can also get the workbook and ‘play’ it on your Tableau Desktop by downloading from Tableau Public 




Tuesday 28 July 2015

The Tour de France - The final placings

Congratulations Chris Froome and Team Sky. An amazing performance to hold on to the Yellow Jersey ahead of Nairo Quintana and team Movistar.

Check out your favourite riders by clicking on the image




Monday 20 July 2015

The Tour 2015 - end of Week Two

The mountains, it's always the mountains. Check out the change in the General Classification positions throughout the last week stages. The craziness of the graph shows you how much was going on in some epic battles.

Still glad to see Chris Froome and Team Sky doing well with the Welsh wizard (Geraint Thomas) somehow keeping pace with the top climbers in the World.


Sunday 12 July 2015

Tour de France 2015 - The end of week one

So far so good for Team Sky fans after week one of the Tour de France 2015. Chris Froome is leading the way in to the first rest day after one of the most challenging opening weeks of the tour. Cross winds, crashes, 'pave' and two time-trials have trimmed the Tour field down to 185 riders who will carry on in to the Pyranees for week 2.

Two leaders (Cancellara and Martin) have crashed out in very dramatic fashion so as a Brit, I'll be hoping the same fate doesn't happen to the current leader.

When exploring the visualisation, click on the teams or riders to see how they are progressing through the General Classification


I'll be updating the visualisation as one of the toughest sporting events on the planet continues.

Wednesday 8 July 2015

Final Keynote - Dr Hannah Fry – The Mathematics of Love

Human behaviour is full of patterns so mathematics can help us describe
Hannah challenged herself to find the question as far away from maths as possible
Peter Bakkus worked out how many women in the world would be ideal for him – he found out it was 26
-        Peter broke down the serialised elements of the population to work out how to go from the total population to the actual number
The science of love shows that you don’t know what you want until you have it
-        Don’t form a list!
The golden ratio is still perceived as a way to denote beauty
-        In architecture as well as beauty, this just isn’t science
Naturally symmetrical faces show a lack of childhood illness as children faces grow less symmetrically when ill
-        But for moving images we prefer asymmetry (we often move the right side of our mouths more than the left when speaking)
Hormones are the biological cause of the characteristics that we deem as beautiful – it’s all about fertility and higher reproduction possibility
Beauty isn’t everything – develop your charm!
To trick people in to thinking you are more attractive than you are then use the irrelevant alternative theory
-        Find a slightly less attractive wingman / wingwoman
You are statistically more likely to have an attractive partner if you approach them rather than waiting for them to come to you

Using OK Cupid data to analyse preference to attractiveness is really interesting
-        Lesson – don’t just rely on average values – look at the distribution
-        Find a ‘quirky’ partner and find less competition so play up on what makes you different
You can use Optimal Stopping theory of working out when to stop dating and settle down
-        For the first 37% of you dating time you reject everyone but after that find the best person you have come across after that 37% of time
-        Can be applied to house buying etc (Zebra fish do this)

Hannah’s favourite tip:
Gottman studied couples who had their contentious conversations filmed mapped the times that the individuals spoke and whether they were therefore low risk or high risk of divorce
-        They found a theory that matched 95% of the time
-        Having a low negativity threshold in your conversations are much stronger together

So the tip: Communicate often, honestly and positively. 

Tableau on Tour - Paul Banoub – Sweet Viz O’ Mine,Tableau at UBS


 Centre of Excellence at UBS and how it was developed
Paul’s role focuses on building the Tableau Service – Server, Desktop and improved use of visualisation best practices
-        Training & education – sessions design by me! (self-promotion)
-        Industry events – including London User Group – builds the relationship with Tableau
-        Consultancy Partnerships
-        Data Viz Community at the heart of the growth
This session is about the human side of the CoE and how to keep it growing, analysing it and turbo charging the improvement.
Try before you buy  (10 Server Interactor, 20 desktops) was how UBS started. Gave licences to people for only a couple of weeks but then took them away to allow someone else to try.
-        Obviously various people purchased to allow the growth to kick-off
-        Getting the Tableau Trail available for internal download was a big step forward
-        PoC should be about the full end-to-end experience and gaining analytical benefit
Establish the community
-        Users were slowly building < 100 in first year, < 300 in year two and now 1,300 in year three
Service Review Group
-        Get senior stakeholders on board and keep asking them questions
Create a great vibe
-        In a Tableau’s deployment case – use the Tableau vibe!
-        Make the content short and sweet
-        The Jive Connection page gives a hub to share activity and content
Maintaining & Growing Service
-        Invite people as soon as you have contact with someone
-        Get Tableau to help you bring you links in your own organisation who you might not be aware of
-        Tableau Touchpoint – get great at demoing and keep shouting about it
Making it fun, Make it Useful
-        Clearly show people how they can get started
-        Make it a Platform – allow others to tell their story and sell their own work that the service has enabled
-        Make it Passionate – be a little controversial
-        By getting others involved – a senior director got involved to write the .tps colour files for the team who had no direct involvement in the team
Introspection
-        Use Postgres database to mine the actual data showing how your service is being used
-        Mark Jackson created some great content
-        Dave Hart from Interworks created a cracking set of custom admin views for UBS
The service has now grown to “where it isn’t a toy anymore”

Update regularly to keep users knowledgeable and informed about your service and where it is developing

Dr John Medina - Keynote

Molecular Biologist
We don’t know how the brain works to pick up a glass of water and drink it or write your name
-        The gap has been filled with lots of mythology
-        10% of your brain is being used is rubbish, it’s 40-50% when you are at rest
Human brain designed to solving problems in outdoor settings in changing conditions
-        Classrooms and offices are the antithesis of this

How to create a successful presentation:
1.      The attentional spotlight
2.      Three characteristics
3.      Integrating text and pictures

1.      The attentional spotlight
This is where you can filter everything else out around you and focus on one thing
Attentional spotlight theory – the brain is a generator and the speaker is the spotlight controller
-        Generator effects: Time of day; Quality of Sleep; State of Hunger
-        Spotlight: Emotional stimulus;
Two key parts of the brain in the Attentional Spotlight:
A.     Medial Parietal – scanning across your vision to determine if you have seen what you are seeing before and whether it is important
B.     Brodmann Area Ten (BA10): Allows you to switch attention to something. Only allows one switch at the time.
Because BA10 can’t switch more than once at the time – therefore you can’t multi-task

2.      Three known characteristics
A.     Chunking (temporal property)
a.      If you present a string of information, your brain looks for a pattern and then tries to create patterns
b.      Your brain wants to be given time to break up the information, store it and then take in the next amount of information
                                                    i.     How long is this? 10 minutes before the brain checks out. Attention builds up over time up to 10 mins but then drops off after 10 minutes
                                                   ii.     Give 10 minutes presentations – or break it up in to 10 minute chunks

B.     Meaning before detail
a.      Human brain processes meaning before detail. It looks at the Tiger’s mouth and not the individual teeth
b.      6 questions of meaning for the brain
                                                    i.     Will it eat me?
                                                   ii.     Can I eat it?
                                                  iii.     Can I have sex with it? (reproduction rather than just fun)
                                                  iv.     Will it have sex with me?
                                                   v.     Have I seen it before? (pattern matching)
                                                  vi.     Have I never seen it before?
c.      Resilience – Trauma at the genetic level – genes are better at protecting you from trauma. You shouldn’t describe the science – describe the resilience and why it matters
d.      Pattern matching – if you detect patterns your brain gives you a ‘dopamine lollipop’ ie a reward for
e.      Have to give your audience an emotionally competent stimulus every 10 minutes

C.     The importance of narratives
a.      Don’t know why the brain likes episodic memory but it does!
b.      You need 3 ingredients: 
                                                    i.     Timeline
                                                   ii.     Character (maybe you)
                                                  iii.     Event – often social but crisis
c.      63% of speech is recalled with a story. 5% recalled a statistic
d.      “The King died and then the Queen died” – brain loses attention
e.      “The King died and then the Queen died of grief” – Brain lights up – you have a story
Rules for the hooks
-        ECS should be short
-        ECS should be relevant – even illustrative
-        ECS more memorable if you can turn it in to a story

3.      Integrated Text and Pictures
Text and pictures should be present and if possible move
Rules
A.     Limit the amount of text – brain still wants to go through individual words and letters of the individual words
a.      The eye spends time looking at each letter and then the first and last letter. The brain doesn’t get better – words act as a cognitive bottleneck
b.      140 characters is similar to the amount of text information is put on to a slide
                                                    i.     Replace text with picture
                                                   ii.     50% is vision, 2% auditory and 8% to touch (% of cortex through surface area)
c.      256 images shown vs 256 words – wait 3 days and test with a set of images of what was seen before and not. Pictures correct 90% - Text only 10%. For a year it is 63% for images, text is c. 10% still

The little that we know about brain science allows us to tweak presentations to make some improvements – it’s not fully known yet though!