Go To Tutorial

Tableau Public is a free platform for exploring, creating and publicly sharing data visualizations online. The free-to-use nature of Tableau Public comes with some limitations, one of which is the restriction on scheduled refreshing of the source data for your dashboards. If you have ever developed a Tableau Public dashboard that uses data that changes over time, you may have found yourself manually refreshing your data in the desktop application and then republishing to Tableau Public online.

In a new tutorial, I describe one method of automating the data pipeline, by taking advantage of several additional free-to-use tools:

Who is this tutorial for?

The tutorial uses dummy data generated in R to illustrate the concepts but the use cases are numerous. Any project that uses data that changes frequently (such as from an API) may find benefit from being able to tell Tableau to refresh automatically. I have used this method to build a dashboard that tracks current inventory of used Tesla Model 3 cars in the UK by running a daily query against Tesla’s inventory API and pushing the outputs to a Google Sheet.

The main steps of the tutorial are summarised below, but if you want full details I recommend checking out the tutorial itself.

Step 1: Set yourself up for success

Go To Step 1

To get started you will need:

Step 2: Set up Google Cloud Platform services

Go To Step 2

Using Google Drive to store your project data and Google Cloud Platform for automated authentication means that your scripts can run on a schedule without you being physically present. The tutorial shows you how to set up a GCP account, create a new project and enable to Google Drive API in order to automate your workflow.

Step 3: Set up Google Drive services

Go To Step 3

In this step you will set up a Google Drive directory and grant your newly created GCP service account access in order for your code to run automatically.

Step 4: Set up R script

Go To Step 4

This step walks you through setting up an R project using the renv package to create a reproducible environment, which is necessary for the GitHub Action to work later on. You will initialise renv, write and test your code and take a snapshot of your project.

Step 5: Set up GitHub Actions

Go To Step 5

This step will teach you how to set up a GitHub Action (GHA) for your project, by initialising GHA in your project, building your YAML file, pushing to GitHub and testing the results.

Step 6: Set up Tableau Public dashboard

Go To Step 6

The last step of the tutorial shows you how to connect to your data in Google Drive and enable the data syncing option that will keep your data updated once it is published to Tableau Public.