Dashboard Week Day 3 - Risk Factors for Noncommunicable Diseases

by Laura Peterson

Dashboard Week Day 3

Another day, another cheery topic! We have gone from UK Crime to Migrant Stock to today’s topic: Risk Factors for Noncommunicable Diseases.

Requirements as per Andy’s blog:

  • The data set is of risk factors for non-communicable diseases, which can be found within each of the data downloads pages on NCDRisC.org.
  •  Use Alteryx to download the data for all countries available.
  • Use Tableau to create a visualisation.

Data Investigation

NCD Risk Factor Collaboration (NCDRisC) provides data on four major risk factors for non-communicable diseases for all of the world’s countries. The data is readily available to download in one global .csv for each of the four risk factors from the website, but that would be too easy for Dashboard Week!

The Four Risk Factors:

I actually used the height data for my DS application viz way back when. Then I used it again for the week 1 project – application makeover.  I feel like I have exhausted the topic, so for today’s challenge I will be looking at Adiposity (aka Obesity,) Diabetes, and Blood Pressure.


Because no challenge is complete without Alteryx, Andy wants us to download one file for each country, for each risk factor and then join them all together. It was a lot easier than I thought it would be.  Here is a quick summary of the steps I took:

Container 1 -Download .csv files to my PC
  1.  Get a list of all the available countries and put them into a File Input tool
  2. Create a Text Input tool with a list of the URLs for the three factorsurls
  3. Combine the tools from steps 1 and 2 using an Append tool
  4. Use a Formula tool to create an URL for each country and define a download location for the file.formula tool
  5. Create the specified folders in Google Drive
  6. Download!
Container 2 – Union all 600 files into one .yxdbalteryx container
  1. Add three Dynamic Input tools to your country list file, which now doubles as a list of file names. One tool for each folder, to dynamically import all the .csv files. For whatever reason, the Adiposity files don’t contain a Country column, so I configured the import to tool to add a field from FileName.alteryx
  2. Add a Select tool after the Adiposity import to rename the FileName field to Country
  3. Add 3 Transpose Tools to make our field names consistent.
  4. Add 3 Multi-Row tools to generate a risk factor field alteryx
  5. Union all the tools
  6. Output to a .yxdb (NOTE: I tried outputting directly to a .tde but I kept getting an error message saying the .tde failed to generate. So I did the next best thing and output to an Alteryx database file.)
Create the .tde

create tde


Now we are ready to viz! I created a Pinterest board for design inspiration. I might have to start making my Pinterest boards private, with all the sunny topics we have had this week my mom complained that they are depressing her.

Check back tomorrow to see the fab dashboard I created!




Laura Peterson

Sun 21 May 2017

Tue 16 May 2017

© 2022 The Information Lab Ltd. All rights reserved.