Select Page

Hi, data enthusiasts!

Welcome to Part 1 of fun little projects with Tableau!

Our first project is going to be analysing your Apple Health data to see if you have achieved the workout goal or if you have been lazy like me.

The full Tableau workbook is available to download from here: My lazy lockdown life | Tableau Public

Let’s get started!

Step 1: Extract your Apple Health data

We’ll need to install export software on your iPhone to retrieve your Apple health data. There are several options in the App store,  “QS Access” and “Health Auto Export” are two user-friendly applications for exporting data that I’ve encountered so far (listed below)

Both will work fine with exporting the Apple Health data, in this example, I am just going to use QS Access to export my daily moving distance recorded in Apple Health.

The dataset should be looking like this, I created the calculation field “Distance(m)” because I am quite dumb with mile unit. It is entirely up to you to decide which unit to use.

Step 2: Create calculations

The radial chart is useful when you have a timeline but you do not want to always present it as a line chart or bar chart, it looks beautiful for your presentation and you can easily see the outstanding data through the timeline as well.

After connecting your data to Tableau, the first thing we are going to do is to drag the data to itself to create a union. The reason is we need to define a binary calculation for the radial chart.

Then we need to create some parameters and calculation field to make the radial.

Create parameters

1. Inner(To control how big is the inner circle): Set it to 0.5 by default
2. Outer(To control how big is the outer circle): Set it to 1 by default

Create calculation fields

Path order (change to dimension):

IIF([Table Name]=’Health data.csv’,0,1)

(INDEX()-1)*(1/WINDOW_COUNT(COUNT([Distance(m)])))*2*PI()

[inner]+IIF(ATTR([Path order]) =0, 0, SUM([Radial field]))/WINDOW_MAX(SUM([Distance(m)]))*([outer]-[inner])

X:

Y:

Step 3: Build the radial chart

Once you create all the calculations, building the radial chart is just quite simple. Follow the steps shown in following gif.

1. Drag X to Columns and Y to Rows
2. Drag path order to path
3. Drag “Finish” (the timeline you’d like to choose) to details and change it to “Exact day”
4. Edit Table calculations for both X and Y -> Compute using “Finish”
5. Drag the distance(measure) to colour

Then you will have a nice radial chart. You can also use a background image in your chart like what I did with mine. I will leave this to the following fun projects with details.

And that’s it! Hopefully you will have fun with this little project and don’t forget to do some exercises as well during lockdown time.

Please feel free to leave any comments below if you get stuck or the other data project that you are looking forward in the following series. See you again soon.