VizWiz

Data Viz Done Right

September 28, 2020

#MakeoverMonday 2020 Week 39 - Child Marriage Around the World

No comments

Week 39 brought another #Viz5 topic, this time it was about children that are now 20-24 who were married under the age of 18. Child marriage is, of course, horrific and it's a violation of human rights. Unicef has done an excellent job of recapping all of the issues and why these marriages happen on their website here.

As I've mentioned before, I ALWAYS find these Viz5 data sets tought. I'm not sure why; perhaps I have a mental block on them now. This week the data set was three columns: country, female %, and male %. That can't be too tough...right?

Well, I sure made it tough. First, I joined the data to regional mappings from Unicef so that I could possibly look at the data at the regional level; I decided to use medians for each region in the end. Then I went into Tableau and built a bunch of charts to explore the data. I used chart guides to help me think through options and none of them seemed to make any particularly interesting insights pop out.

After about two hours of nothing, I got the idea of simply looking at the % of females that were married under the age of 18. I ended up with a simple bar chart, which turned out to not be too far from the first chart I created a few minutes in.

Here's the #WatchMeViz video and below is the visualization. Thanks to those that watched live and contributed ideas along the way!! It really helps knowing others are there encouraging me.


September 25, 2020

#WorkoutWednesday 2020 Week 3: Orders by Day and Time

No comments

As time permits, I'm going back through some of the Workout Wednesday challenges that I've yet to complete. I'm starting with those that will help me most as a teacher to impart what I learn on those that I have the pleasure to train at The Data School.

For week 3, Lorna Brown challenged us to create a viz that shows the number of orders by hour of the day that allows the user to swap between day of the month and weekday.

In her solution, she chose to create two sheets, one for the day of the month and another for weekdays. I didn't know that when I tackled the challenge so I proceeded down the route of doing it all in one sheet. Success!

I did a couple things differently than Lorna:

  1. I combined the order date and time into a string calculation and then used the DATEPARSE function to make it a date/time field.
  2. The size of my circles depends on the option selected in the parameter. For day of the month, the size is the number of orders. For weekday, I have them set to a fixed size. I chose to make them a fixed size because otherwise the circles become way too big for the view.
  3. I used only one sheet.
  4. I am not showing a tooltip when there are no orders.

My solution is here and below as a gif.

September 22, 2020

#TableauTipTuesday: How to Visualize Survey Data on a Likert Scale and Include a Net Promoter Score

No comments

We've all answered Likert scale questions. These are questions like "How likely are you to recommend our product?" and they are typically on a five point scale (e.g., from not at all to very highly likely).

In this video, I show you how to visualize Likert scale data and how to include a Net Promoter Score (NPS). To get the data that I used, simply download the workbook and unzip it. You will then see a folder named "Data".

Useful links:

1. What is a Likert Scale? http://bit.ly/LikertSurveyMonkey

2. What is a Net Promoter Score? https://www.netpromoter.com/know/ 


September 21, 2020

Watch Me Viz - #MakeoverMonday 2020 Week 38 - Pick Up A Book And Read

No comments
This week I went through a TON of iterations before settling on a hex map of Europe. In the video, you'll see me build lots of charts with time series, deviations, etc. before settling on a hexmap of Europe. 

Download the workbook here

Subscribe to my YouTube channel here to get all of the latest content and please share this is if you find it useful. 

Here are a few useful links... 

  1. Geometrics shapes (for the default number formatting) - LINK 
  2. FIXED Level of Detail Expressions in a Plain English Sentence - LINK 
  3. TABLE CALCULATIONS in a Plain English Sentence - LINK 
  4. Shading between two lines - LINK 
  5. Daniel Rowlands - TWITTER 
  6. Daniel Rowlands (EU hex map template) - LINK

Click on the image below the video to interactive with the workbook. Or download it from Tableau Public here.


September 9, 2020

Watch Me Viz - #MakeoverMonday 2020 Week 36 - How Healthy Is Your Favorite Cereal?

No comments
Watch from start to finish as I create my Makeover Monday viz. I'll start by reviewing the original viz (what I like and don't like), getting context from the original article, then create charts and graphs to make a better version than the original.

Click on the image below the video to interactive with the workbook. Or download it from Tableau Public here.


September 8, 2020

#TableauTipTuesday: How to Make a Dashboard Unclickable

No comments

This week is a nice quick tip that I showed a couple years ago at TC during a Tableau Tips battle with Jeff Shaffer. There are times when you want to make sure that your users cannot click on a dashboard. This tip shows you how to make that work.

Enjoy!


September 1, 2020

#TableauTipTuesday: How to Find the Highest Selling Item per State with a Table Calculation

No comments
In this video, I show you how to use the RANK table calculation to identify which sub-category has the most sales in each State. While this example answers a question that works best on a map, you can easily apply this technique to any dimension or combination of dimensions for which you need to find the largest.

August 25, 2020

#TableauTipTuesday: How to Add Dimension Labels Above Bars in a Horizontal Bar Chart

No comments
It's not an uncommon scenario. You want to make your bar chart look a bit nicer (or different). You want to hide the dimension header, but you don't want the labels inside the bars. How about adding the dimension labels above the bars? In this tip, I show you how to do just that. 

Enjoy!

August 20, 2020

How to Hide Only Zero from the Axis Labels

No comments

Sometimes you don't want to show the zero label on an axis, but you still want to show all of the other axis labels. In this video, I show you how to do it. 

Special thanks to Jeff Shaffer for showing me this trick during one of our TC Speed Tipping sessions.

August 13, 2020

Sparklines with Min-Max Indicators: Table Calcs vs. LODs

No comments

In this tip, I show you how to add circles on a sparkline at the minimum and maximum values for each line. I detail how to create them with both Table Calculations and Level of Detail Expressions and the benefits of each.


August 11, 2020

#TableauTipTuesday - How to Disable Sorting

No comments

There are times when you want to prevent your users from sorting a chart. This video has the solution for you.

Enjoy!


July 28, 2020

#TableauTipTuesday - Using Set Actions to Change the Format of the Selected Value in a Dropdown Filter or Parameter

No comments
If you are anything like me, you get super annoyed that the font in the selected value of a dropdown filter does not match the font of the text when you click the dropdown. Here's an example:


Notice how the font for "Office Supplies" next to the dropdown selector (9 pt) does not match the font size of the option displayed (12 pt). In this video, I show you how to work around that in a couple different methods.

  1. Using Category as a filter
  2. Using a Set Action so that the (All) option can also be displayed

The final product uses set actions. This method also applies to Parameters, but I have not included those in the video. The steps are mostly the same except you would use a Parameter Action instead of a Set Action.

Enjoy!


July 21, 2020

#TableauTipTuesday: Using Parameter Actions to Choose a Chart Type

No comments
In this tip, I show you how to use chart icons along with parameter actions to allow users to select their preferred chart type. 

The icons I used are available via Flaticon here. Be sure to give credit to the creators of the icons unless you purchase them. 

Enjoy!

July 14, 2020

#TableauTipTuesday - How to Create a Blank Field Name

No comments
If you try to type a space into a field name in Tableau, you will get an error message saying that it's invalid. In this video, I show you how to use special text to create a blank field name.

Thank you Ian Baldwin of The Information Lab Ireland for showing me this trick.


June 19, 2020

How to Get Your Data from Strava to Tableau

No comments
UPDATE: If you prefer video tutorials, there is now one on my YouTube channel here. The steps to get the links into the Simple Mass Downloader are done more efficiently in the video. There are several steps removed from the Excel and link uploads that are listed in the blog.




For a while now, I've been using this process for getting my data from Strava into Tableau like this:
  1. Download the data from Strava
  2. Prep it with Alteryx
  3. Visualize it in Tableau

In this post, I will outline the steps for getting your data from Strava into Tableau. I have also created a template with some sample vizzes for you to use. Download it from Tableau Public here.

I started revamping the process after wanting to create a small multiple view of all of my activities like this:


When I first started creating these, I took a process based on R and converted it into a workflow in Alteryx. This worked great, but there were two main drawbacks:

  1. My Alteryx workflow was a mess (I tinkered with it every month).
  2. Each of the routes would be adjusted to fit perfectly in a square.

This second problem meant that the routes were not scaled correct according to the curvature of the Earth. I then saw that Andy Cotgreave reached out to Ken Flerlage for help. They've written about their process here. Great! However, the calculations on this process make rendering the maps in Tableau very, very slow. Like REALLY slow.

That's where Alteryx comes in. I pushed all of the data processing into Alteryx, export each route as a single spatial object and every renders super fast. So if you're interested in getting all of your data out of Strava and visualizing it in Tableau, this process is for you. It does require Alteryx, but you could replicate the process in R.


TOOLS REQUIRED

  • A Strava account - NOTE: Make sure you are logged in to Strava throughout these steps.
  • Alteryx Designer
  • Tableau Desktop
  • Simple Mass Downloader Chrome extension

GET THE DATA FROM STRAVA

Step 1 - Login to Strava, click on your profile icon on the upper right, choose Settings.


Step 2 - On the My Profile page, click on My Account.


Step 3 - Scroll to the bottom and click on the Get Started button in the Download or Delete Your Account section.


Step 4 - In step 2, choose Request Your Archive. Don't do anything else on this page.




Step 5 - Check your email in a few minutes. When it arrives, click on the Download Archive button in the email.



Step 6 - Unzip the file that downloads. Open the folder that's created and you should see something like this.

The activities folder contains all of the raw files, but these won't all be in the same format, which means they're useless. The ONLY file we need is activities.csv. Open the CSV in Excel.

Step 7 - The only column we need in the file is the Activity ID column.


Delete all columns except Activity ID.


Step 8 - Insert a column to the left of Activity ID. I name it URL, but call it whatever you prefer. Then in cell A2 enter this formula: 

=CONCAT("https://www.strava.com/activities/",B2,"/export_gpx")

Then copy it down for all rows. This create a link to each activity in GPX format. If some of the activities don't have location data, don't worry about it. Those will simply not download in the process.

Choose the URL column header (the "A" above URL), choose Copy, then Paste Special => Values. Then delete column B (the column with the activity ids).



DOWNLOAD EACH ACTIVITY

Step 1 - Add the Simple Mass Downloader Chrome extension.


A new tab will open with a tutorial if you're interested to learn how it works.

Step 2 - Click on the extension button and you should see this screen.



Step 3 - Click on the hamburger on the right and choose Import URLs from local file.



Step 4 - Import the activities.csv file and the URLs will upload. This loads all of the files into the queue on the Download List tab. Choose the Select All box and they should all be highlighted.



Step 5 - Click on Start Selected and you'll see a bunch of files start downloading very quickly. Again, some of them will error out if the activity doesn't have location data. The files that download will have a green check next to them.



Phew! That might seem like a lot, but once you do it a couple times, the process is really quick.

Fantastic...all of the files are now downloaded. Onto Alteryx we go. 

ALTERYX PROCESS

Step 1 - Download the Strava Route Maps workflow from the Alteryx Gallery and open it in Alteryx Designer. If you can't download it from the Gallery, I have it on Google Drive here.


The Strava icon is a simple macro that will import all of the GPX files in the Directory you specify when you run the app. 

The workflow is split into four parts:

  1. Import the data, strip out the parts we need, then create points and lines.
  2. Normalize the data based on the calcs from Ken Flerlage, turn them into lines (one mark for each route rather than hundreds of point for each route) and export as a Tableau extract.
  3. For each point, calculate the distance, climb, etc. and extract all of the points.
  4. Take each of the points and turn them into lines.

Neither part 3 nor part 4 above normalize the data into squares. These are simply all of the data for each route.

Step 2 - Run the workflow as an App by clicking on the magic wand next to the Run button.


Step 3 - Choose the folder that contains all of the GPX files from the Simple Mass Downloader output. And click Finish.


This will generate three Tableau extracts that will load into the same directory as the GPX files. The workflow extracts them as TDE because Hyper files don't support polygons. Even though these aren't polygons, it makes me more comfortable that Tableau will read the files correctly.

Success!


Click the Clear button and then the OK button. Otherwise all three files will open in Tableau, which we don't want.

We're all done with Alteryx. Onto Tableau.


TABLEAU PROCESS

I've created a template for you to get started with. Download it from my Tableau Public profile here. Once you have done that, follow these steps.

Step 1- Open Tableau and right-click on each data source and pick Edit Data Source.


Step 2 - Click on the carrot next to the data source name and choose Edit Connection.


Step 3 - Navigate to the data source that downloaded from the Alteryx workflow. It will have the same name.



Step 4 - Go back to your worksheets and everything should update automatically. If not, right-click on the data source name and choose Refresh.

Step 5 - Customize the views as you see fit. That's it!

Here are the vizzes that I have included in the template.