Data Science Toolbox: How to use Julia with Tableau

R allows Tableau to execute Julia code on the fly
R allows Tableau to execute Julia code on the fly

Michael, a data scientist, who is working for a German railway and logistics company, recently told me during an FATUG Meetup that he loves Tableau’s R and Pyhton integration. As he continued, he raised the raised the question for using functions they have written in Julia. Julia, a high-level dynamic programming language for high-performance numerical analysis, is an integral part of newly developed data strategy in the Michael’s organization.

Tableau, however, does not come with native support for Julia. I didn’t want to keep Michael’s team down and was looking for an alternative way to integrate Julia with Tableau.

This solution is working flawless in a production environment since several months. In this tutorial I’m going to walk you through the installation and connecting Tableau with R and Julia. I will also give you an example of calling a Julia statement from Tableau to calculate the sphere volume.

1. Install Julia and add PATH variable

You can download Julia from Add Julia’s installation path to the PATH environment variable.

2. Install R, XRJulia and RServe

You can download base R from Next, invoke R from the terminal to install the XRJulia and the RServe packages:

> install.packages("XRJulia")
> install.packages("Rserve")

XRJulia provides an interface from R to Julia. RServe is a TCP/IP server which allows Tableau to use facilities of R.

3. Load libraries and start RServe

After packages are successfully installed, we load them and run RServe:

> library(XRJulia)
> library(Rserve)
> Rserve()

Make sure to repeat this step everytime you restart your R session.

4. Connecting Tableau to RServe

Now let’s open the Help menu in Tableau Desktop and choose Settings and Performance >Manage External Service connection to open the External Service Connection dialog box:

TC17 External Service Connection

Enter a server name using a domain or an IP address and specify a port. Port 6311 is the default port used by Rserve. Take a look on my R tutorial to learn more about Tableau’s R integration.

5. Adding Julia code to a Calculated Field

You can invoke Calculated Field functions called SCRIPT_STR, SCRIPT_REAL, SCRIPT_BOOL, and SCRIPT_INT to embed your Julia code in Tableau, such as this simple snippet that calculates sphere volume:

6. Use Calculated Field in Tableau

You can now use your Julia calculation as an alternate Calculated Field in your Tableau worksheet:

Using Julia within calculations in Tableau (click to enlarge)
Using Julia calculations within Tableau (click to enlarge)

Feel free to download the Tableau Packaged Workbook (twbx) here.

Further reading: Mastering Julia

Social Media and the Customer-centric Data Strategy #data17 #resources

Social media marketing mix
Do you analyze your social media marketing mix? | Photo Credit: via Richard Goodwin

With over 3 billion active social media users, establishing an active presence on social media networks is becoming increasingly essential in getting your business front of your ideal audience. These days, more and more consumers are looking to engage, connect and communicate with their favorite brands on social media.

Adding social media to your customer-centric data strategy will help boost brand awareness, increase followership, drive traffic to your website and generate leads for your sales funnel. In 2017, no organization should be without a plan that actively places their brand on social media, and analyzes their social media data.

Once you’ve started diving into social media analytics, how do you bring it to the next level? This session covers a customer-centric data strategy for scaling a social media data program.

Here are the links (i.e. additional resources) featured during the session to help you formulate your social media data program in order to build a stronger presence and retrieve powerful insights:

The Data Opportunity

TC17 Social Media Slides: The Data Opportunity

Focus on relevant metrics for your strategy

TC17 Social Media Slides: Sentiment Analysis

How to get Social Media in Tableau?

TC17 Social Media Slides: 3rd Party Platform Talkwalker

Tips to Level Up

TC17 Social Media Slides: Unshorten URLs in Tableau with R

Tutorials and Slide Set

The slides and tutorials presented at Tableau Conference on Tour in Berlin are also available on SlideShare, and on YouTube in English and German.

English Tutorials

German Tutorials

Slide Set

Data Strategy: Erstickt Innovation zwischen Berichtswesen und Data Discovery?

Abbildung 4: Interaktives Dashboard zur Darstellung von variablen Abhängigkeiten in Tableau
Abbildung 4: Interaktives Dashboard zur Darstellung von variablen Abhängigkeiten mit TensorFlow in Tableau

Der erste Schritt auf dem Weg zu besserer Entscheidungsfindung im Unternehmen, ist zu verstehen, wie gute (oder schlechte) Entscheidungen zustande kamen. Genau wie manche Unternehmen formale Prozesse für Aktivitäten haben, wie z. B. What-if-Analysen, prädiktive Wartung und Bestimmung von Abhängigkeiten in Korrelationen (siehe Abbildung 4), so müssen sie formale Prüfprozesse für Entscheidungen im gesamten Unternehmen einführen. Dies soll jedoch keinesfalls dazu dienen, die an schlechten Entscheidungen Beteiligten zu bestrafen, sondern den Entscheidungsfindungsprozess und -stil des Unternehmens im Allgemeinen verbessern.

Die Rolle der IT nähert sich hierbei wieder ihren Wurzeln an und statt eine Berichtefabrik für den Rest des Unternehmens zu unterhalten, wird die IT wieder zum Dienstleister und Partner, der die Infrastruktur für eine Data Discovery bereitstellt. IT-Mitarbeiter werden entlastet und erhalten den Freiraum, ihre professionelle Energie und Kreativität in den Dienst der Innovation zu stellen, und die Mitarbeiter in den Abteilungen sehen ihre Datenfragen nicht am Flaschenhals Berichtswesen verhungern. Nur so lassen sich die Investitionen in Business Intelligence und Analytics optimal in den Dienst der strategischen Ziele des Unternehmens stellen.

Abbildung 5: Anforderungen, Fähigkeiten und Ziele einer Datenstrategie (TC17-Präsentation)
Abbildung 5: Anforderungen, Fähigkeiten und Ziele einer Datenstrategie (TC17-Präsentation)

Moderne Unternehmen sehen sich vielen analytischen Anforderungen (siehe Abbildung 5) gegenüber, und diese Anforderungen werden unweigerlich schneller wachsen, als Unternehmen sie bedienen können. Es ist daher unerlässlich, Analytics als lebenswichtigen Teil der eigenen Datenstrategie zu verstehen und entsprechend zu planen.

Dabei ist ein umfassender Betrachtungswinkel sinnvoll, denn die wachsende Nachfrage nach Analysen und Erkenntnissen wird mehr und mehr von den kundenbezogenen Abteilungen wie Marketing oder Support ausgehen. Dementsprechend wird auch das Budget für Analytics verstärkt aus diesen Abteilungen kommen, statt aus einem zentralisierten IT- oder BI-Budget. Dort, wo viele Kundendaten vorhanden sind, wird der CMO bald mehr für Analytics ausgeben als der CIO. Und dort, wo Mitarbeiter über gut integrierte, intuitive Werkzeuge für komplexe Analysen verfügen, können gute Instinkte und datenbasierte Entscheidungen Hand in Hand für den Erfolg sorgen.

Dieser Beitrag ist der fünfte Teil der Datenstrategie-Serie:

Teil 1: Die Notwendigkeit einer modernen Datenstrategie im Zuge der digitalen Transformation
Teil 2: Steigern smarte Erkenntnisse den Business Impact?
Teil 3: 10 BI & Analytics Trends, die in keiner Datenstrategie fehlen dürfen
Teil 4: Wie unterstützen Analysen Ihre Entscheidungsfindung?
Teil 5: Erstickt Innovation zwischen Berichtswesen und Data Discovery?

TC17 Data Strategy Title Slide Möchten Sie mehr zu den neuesten Trends im Bereich Datenstrategie erfahren? Dann freue ich mich, wenn Sie an meinem Vortrag “Building an Enterprise Big Data & Advanced Analytics Strategy” auf unserer Tableau Conference TC17 (9.-12. Okt., Las Vegas) teilnehmen.

It’s My 10 Year Blogging Anniversary!

Photo from an early blog post: 2007 Hampi, a temple town in South India recognised as UNESCO World Heritage Site
Photo from an early blog post: 2007 Hampi, a temple town in South India recognized as UNESCO World Heritage Site (Flickr)

Woohoo, it’s already ten years since I started this blog. Can’t believe it! Thanks to all of those who read my posts, and who encouraged and inspired me. Without you blogging would be only half the fun! Now, let’s have a little recap…

2007-2009 SAP and India:

It all started in 2007. I was studying Computer Science, and decided to go for an internship abroad. China and India were on my short list. I decided for India, applied for a scholarship and asked some companies for interesting project work. Before starting the adventure, I published my very first blog post to keep family and friends in loop.

For the next seven month, I lived in Bangalore, and worked for SAP Labs India to develop prototypes for mobile BI apps. I spent plenty of weekends to explore India and surrounding countries. After returning from India, I continued to work for SAP at their headquarters while finishing my degree in Karlsruhe.

2009-2012 CERN:

CERN, surrounded by snow-capped mountains and Lake Geneva, grabbed my attention during the end of my studies. CERN has tons of data: some petabytes! Challange accepted. CERN is known for its particle accelerator Large Hadron Collider (LHC). We applied machine learning to identify new correlations between variables (LHC data and external data) that were not previously connected.

2012-2015 Capgemini and MBA:

Back in Germany, I wanted to bring Big Data Analytics to companies. To one company? No, to many companies! So instead of getting hired as Head of BI for an SME, I started to work for Capgemini. I had fantastic projects, designed data-driven usecases for the financial sector, and gave advice for digital transformation inititives.

In order to keep in balance with all the project work, I dedicated many of my weekend for studies and got enrolled in Frankfurt School’s Executive MBA programme. During my studies, I focused on Emerging Markets and visited a module at CEIBS in Shanghai.

2015-201? Tableau and Futura:

I knew Tableau from my time as consultant. It is an awesome company with a great product and a mission: help people see and understand their data. That’s me! I joined Tableau to help organizations through the transition from classic BI factories to modern self-service analytics by developing data strategies, so that data can be treated as a corporate asset. This includes education, evangelism and establishing a data-driven culture.

In the evenings I’m working for Futura Analytics, a fintech startup, which I co-founded in 2017. Futura Analytics offers real-time information discovery, and transforms data from social media and other public sources into actionable signals.

What’s next?

Currently I’m looking forward to give my Data Strategy talk on TC17 accompanied by a TensorFlow demo scenario. I’m also learning Mandarin, the predominant language of business, politics, and media in China and Taiwan, for quite a while. Let’s see if that is going to influence my next steps… 🙂

Tableau Conference TC17 Sneak Peek: Integrating Julia for Advanced Analytics

Using Julia within calculations in Tableau (click to enlarge)
Using Julia calculations within Tableau (click to enlarge)

We have already seen some love from Tableau for R and Python, boosting Tableau’s Advanced Analytics capabilities.

So what is the next big thing for our Data Science Rockstars? Julia!

Who is Julia?

JuliaJulia logo is a high-level dynamic programming language introduced in 2012. Designed to address the needs of high-performance numerical analysis its syntax is very similar to MATLAB. If you are used to MATLAB, you will be very quick to get on track with Julia.

Compared to R and Python, Julia is significantly faster (close to C and FORTRAN, see benchmark). Based on Tableau’s R integration, Julia is a fantastic addition to Tableau’s Advanced Analytics stack and to your data science toolbox.

Where can I learn more?

Do you want to learn more about Advanced Analytics and how to leverage Tableau with R, Python and Julia? Meet me at the 2017 Tableau Conferences in London, Berlin or Las Vegas and join my Advanced Analytics sessions:

Will there be an online tutorial?

Yes, of course! I published tutorials for R and Python on this blog. And I will also publish a Julia tutorial soon. Feel free to follow me on Twitter @xlth, and leave me your feedback/suggestions in the comment section below.

Further reading: Mastering Julia

A German translation of this post is published on the official Tableau blog: Tableau Conference On Tour Sneak Peek: Julia-Integration für Advanced Analytics

[Update 11 Oct 2017]: The Julia+Tableau tutorial blog post is now published.