Welcome to the Tableau section of my blog, where I share my knowledge and experience with one of the world’s most popular data visualization tools. As someone who has worked with and used Tableau for years, I’m passionate about helping others master this powerful tool and make the most of its capabilities.
In this section, you’ll find a variety of tutorials on topics such as building visualizations, creating dashboards, and using Tableau’s advanced features. I’ll also share stories and insights from my time working with Tableau, including tips and tricks for getting the most out of the tool.
Whether you’re new to Tableau or an experienced user looking to take your skills to the next level, these tutorials and stories will give you the practical knowledge and insight you need to succeed. I believe Tableau has the power to change the way we think about and interact with data, and I’m excited to share that vision with others.
So join me on this journey as we explore the world of Tableau together and discover new ways to unlock the full potential of your data.
Usually, I really don’t like looking on the screens of other passengers. On this early morning train from Frankfurt to Cologne, however, the screen of my seatmate caught my attention. Where have I seen the logo on his slide deck before? Two coffee sips later, it came to me: it was the logo of Monkey 47, a very delicious gin, distilled in the heart of the Black Forest. So I asked my neighbor: “Is that the Monkey 47 logo?”
He was happy that I recognized his brand and we had a small chat about gin and the Black Forest. Turns out his name is Thomas, and he is the head of Sales and Marketing for Monkey 47. Thomas mentioned that his team is planning a tour to promote Monkey 47 in a number of cities. That sounds similar to what we are doing with the Tableau Cinema Tour, so I showed him our Cinema Tour landing page and explained briefly who we are and what our mission is.
I asked him how he is organizing his data. Thomas revealed that he lives in Excel hell: “spreadsheets with thousands of rows and way too many columns”. This also sounded familiar. I opened up our Superstore.xlsx in Excel and asked: “Do your Excel sheets look like this?” Thomas replied: “Yes!”
Here we go! I drag’n’dropped the file on my Tableau desktop icon and paced through a 7-minute-demo ending with an interactive dashboard. Thomas was flabbergasted. To polish things off, I showed him the interactive Twitter Sentiment Dashboard embedded in my blog. Thomas grabbed his jacket and gave me a business card, saying: “We need Tableau!”
Monkey 47 business card (back side)
This story was originally written for Tableau’s EMEA Sales Newsletter. I think it’s a good read for the holidays, and wish you all Merry Christmas!
Python in Tableau: TabPy allows Tableau to execute Python code on the fly
In 2013, Tableau introduced R Integration, the ability to call R scripts in calculated fields. This opened up possibilities such as K-means clustering, Random Forest models, and sentiment analysis. With the release of Tableau 10.2, we can enjoy a new, fancy addition to this feature: the Python Integration through TabPy, the Tableau Python Server.
Python in Tableau: The Perfect Blend
Python is a widely used general-purpose programming language, popular among academia and industry alike. It provides a wide variety of statistical and machine-learning techniques and is highly extensible. Together, Python and Tableau are the data science dream team to cover any organization’s data analysis needs.
In this tutorial, I’m going to walk you through the installation and connecting Tableau with TabPy. I will also give you an example of calling a Python function from Tableau to calculate correlation coefficients for a trellis chart.
Step by Step: Integrating Python in Tableau
1. Install and start Python and TabPy
Start by clicking on the Clone or download button in the upper right corner of the TabPy repository page, downloading the zip file, and extracting it.
TabPy download via GitHub web page
Protip: If you are familiar with Git, you can download TabPy directly from the repository:
> git clone git://github.com/tableau/TabPy
TabPy download via Git command line interface
Within the TabPy directory, execute setup.sh (or setup.bat if you are on Windows). This script downloads and installs Python, TabPy, and all necessary dependencies. After completion, TabPy is starting up and listens on port 9004.
2. Connecting Tableau to TabPy
In Tableau 10.2 (and later versions), a connection to TabPy can be added in Help > Settings and Performance > Manage External Service Connection:
Tableau main menu
Set port to 9004:
External Service Connection dialogue
3. Adding Python code to a Calculated Field
You can invoke Calculated Field functions called SCRIPT_STR, SCRIPT_REAL, SCRIPT_BOOL, and SCRIPT_INT to embed your Python script in Tableau:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now you can use your Python calculation as Calculated Field in your Tableau worksheet:
Tableau workbook featuring a Python calculation
Feel free to download the Tableau Packaged Workbook (twbx) here.
Further Reading: Visual Analytics with Tableau
Join the data science conversation and follow me on Twitter and LinkedIn for more tips, tricks, and tutorials on Python in Tableau and other data analytics topics. If you’re looking to master Tableau, don’t forget to preorder your copy of my upcoming book, Visual Analytics with Tableau (Amazon). It offers an in-depth exploration of data visualization techniques and best practices.
Predictive Maintenance zeigt verbleibende Nutzungsdauer von Aufzügen der Deutschen Bahn: klicken, um interaktives Dashboard zu öffnen
Nicht nur die Fertigungskosten lassen sich mit Predictive Maintenance senken. Auch im Dienstleistungsbereich entsteht durch Vorhersagen enormes Optimierungspotential. Im wesentlichen lassen sich die Fragestellungen, die im Rahmen von Predictive Maintenance gestellt werden, in drei Klassen einteilen:
Wie hoch ist die Wahrscheinlichkeit, dass ein Gerät in naher Zukunft ausfällt?
Was sind die Ursachen von Ausfällen und welche Instandhaltungsmaßnahmen sollten durchgeführt werden, um diese Probleme zu beheben?
Wie lang ist die Nutzungsdauer eines Gerätes?
Ein Beispiel, das die Frage der Nutzungsdauer in den Mittelpunkt rückt, zeigt das Dashboard Predictive Maintenance Deutsche Bahn Elevators. Dieses Dashboard sagt voraus, wie lange Aufzüge noch ohne Wartung auskommen („Rest of Useful Life“). Mit dem Parameter „Material Wear Off“ lässt sich zudem der Grad der Abnutzung beeinflussen.
Die visualisierten Sensordaten erlauben darüber hinaus die Möglichkeit Anomalien zu entdecken. Hier lassen sich mit den Parametern „Primary Sensor“ und „Secondary Sensor“ verschiedene Kombinationen analysieren. In der „Setting Matrix“ werden die verschiedene Einstellungen, die beim Betreiben der Aufzüge angewandt werden zusammengefasst.
Details zu den Aufzügen werden im Tooltip angezeigt. In diesen Tooltips lassen sich darüber hinaus Wartungsaufträge via Twitter triggern:
Anstatt auf eine Störung zu reagieren, können Servicetechniker somit auf Vorhersagen zurückgreifen. Damit agieren sie bereits vor einem Ausfall des Aufzugs entsprechend. Techniker sind somit in der Lage einen Aufzug aus der Ferne in den Diagnosemodus zu versetzen und ihn auf einer bestimmten Etage zu parken. All dies führt zu weniger Anfahrtszeiten, gesteigerter Effizienz und geringeren Kosten.
Dieses und weitere Beispiele zeige ich auf meinem Vortrag “Industry 4.0: Self Service BI and Predictive Maintenance“ im Rahmen des IBI Symposium am 17. November 2016 in Stuttgart.
[Update 24 Mar 2017]: Das Predictive Maintenance Dashboard wird außerdem auf der CeBIT 2017 im Rahmen der „neuen datenbasierten Geschäftsmodelle und Big Data bei der DB“ vorgestellt:
Interactive dashboard displaying the most important variables for determining the Sales measure in Tableau 10.0 (click screenshot to enlarge)
During the Q&A session of a recent talk on Data Strategy, I was challenged with a rather technical question: I was asked how to identify the variables that are heavily influencing a certain measure – with an interactive solution that matches a modern data strategy as suggested in my presentation.
Of course, this could be done by executing a script. The result however would be static and it would be not convenient for a Business Analyst to run it over and over again. Instead of applying a script every time the data changes, it would be much more innovative to get the answer immediately with every data update or interactivity such as a changed filter.
So why not solve this with Tableau? The magic underneath this easy-to-use Tableau dashboard is a nifty R script, embedded in a calculated field. This script calls a statistical method known as Random Forest, a sophisticated machine learning technique used to rank the importance of variables as described in Leo Breiman’s original paper.
The Tableau Packaged Workbook (twbx) is available here. Do you have more ideas or use cases? Feel free to leave a comment or send me an email: aloth@tableau.com
Twitter Sentiment Analysis: klicken, um interaktives Dashboard zu öffnen
Ist der Einsatz sozialer Netze in Ihrem Unternehmen auf Marketing beschränkt, und lässt dadurch Chancen ungenutzt?
Noch immer schöpfen viele Unternehmen in Deutschland die Möglichkeiten von Social Media nur unzureichend aus. Die meisten Firmen nutzen Social Media lediglich als Marketinginstrument, senden zum Beispiel in Intervallen die gleichen Inhalte. Wesentlich weniger Unternehmen setzen Social Media dagegen in der externen Kommunikation, in Forschung und Entwicklung, zu Vertriebszwecken, oder im Kundenservice ein.
Nachfolgend betrachten wir die Twitter-Kommunikation von vier Social-Media-affinen Unternehmen etwas näher, und zeigen anhand sieben Fragestellungen was sie anders machen und wo die übrigen Nachholbedarf haben.
1. Wann und wie werden Tweets gesendet?
Ein Blick auf das Histogram lässt auf reichlich Interaktion schließen (Tweets und Replies), während das Weiterverbreiten von Tweets (Retweets) eher sporadisch auftritt:
2. Wie umfangreich sind die Tweets?
Wie es scheint, reitzen die meisten Tweets die von Twitter vorgesehenen 140 Zeichen aus – oder sind zumindest nahe dran:
3. An welchen Wochentagen wird getweetet?
Am Wochenende lässt die Kommunikation via Twitter nach. Die Verteilung der Emotionen bleibt dabei gleich, unterscheidet sich aber von Unternehmen zu Unternehmen:
4. Zu welcher Tageszeit wird getweetet?
Auch nachts werden weniger Tweets verfasst. Bei Lufthansa kommt es dabei recht früh zu einem Anstieg durch Pendler-Tweets, etwas später tritt dieser Effekt bei der Deutschen Bahn ein:
5. Welche Art der Kommunikation herrscht vor?
Der hohe Anteil an Replies bei Telekom, Deutsche Bahn und Lufthansa impliziert, dass diese Unternehmen Twitter stark zum Dialog nutzen. Unter den Tweets der Deutsche Bank ist hingegen der Anteil an Retweets – insbesondere bei jenen mit Hashtag – deutlich höher, was auf einen höheren Nachrichtengehalt schließen lässt:
6. Welche User sind besonders aktiv?
Nun betrachten wir die Twitter-User, welche die entsprechend Twitter-Handles der Unternehmen besonders intensiv nutzen:
Je nach Emotion und Kontext ist es vor allem für das adressierte Unternehmen von Interesse rechtzeitig und angemessen zu reagieren. So lässt sich eine negative Stimmung frühzeitig relativieren, und so Schaden an der Marke abwenden. Positive Nachrichten können hingegen durch Weiterreichen als Multiplikator dienen.
We use cookies to optimize our website and our service.
Functional
Immer aktiv
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.