23 June 2013
By using some simple Javascript code we can automate almost all dashboard interactions through interactions with the web page hosting the dashboard.
Click on a speaker to highlight the viz. Scroll down for a description of what's happening.
Want to know more about analysing social media around your brand, company or event? Contact Craig Bloodworth for more information.
Making the tool truly disappear
Every user of Tableau knows that its power lies in its ability to disappear, putting the user directly in touch with their data. This has never been more true today, when publishing to Tableau Server or Public, thanks to the Javascript API. By using some simple Javascript code we can automate almost all dashboard interactions through interactions with the web page hosting the dashboard.What's happening in the example above?
In my example above I've placed a collection of images, representing each Keynote speaker at TCCEU13, in the blog post as I normally would. I've surrounded them in hyperlink tags however instead of linking to another web page they fire off an 'onclick' event which runs a Javascript function, passing it the name of the person clicked. This name is then sent to the dashboard as a highlight action with the obvious results.Now this on its own would be quite cool but the API isn't done there. We can add event listeners to our code allowing our web page to react to actions which take place inside the viz. In my example this means listening for a mark to be highlighted and passing that highlight action back to the speaker images causing the selected speaker's image to switch from a greyscale to a colour version. This means web page actions can both affect the Tableau viz and react to changes from within it meaning deep integration of Tableau with internal and external websites is now even more possible.But where did the social media data come from?
For over a year now The Information Lab has been visualising social media data provided by Datasift and is very excited that their partnership with Tableau has been formalised. So what does this mean in practise? Right before the conference we setup a Datasift query to capture all social media interactions using the keyword TCCEU13 along with others including any mention of The Information Lab team. Each of these interactions are then stored in Google BigQuery ready for analysis by Tableau.