I’m going to break down how I created my Astronauts viz using Alteryx and Tableau:
I did the data prep in Alteryx first where I wanted to plot a network chart of where all the Astronauts are from, my aim was to showcase the diversity within the field.
If you want to follow along my step by step break down you can download the data here, and you’ll need to download the plot network tool that Ben Moss created here. Also Alteryx challenge #124 is great practice on using the network tool!
First I need to do some quick data prep, I created a formula to clean up some country names for Germany we see in 1978 Astronaut: Sihmund Jahn is from East Germany. Also I wanted to group the Soveit Union times with Russia as well.
IF [Country] = “Soviet Union” then “Russia”
elseif Contains([Country], “Germany”) then “Germany”
After this I split the rows by the field fight because I wanted each row to represent a unique flight for each astronaut.
After this I use regex to parse out the years from the flights fields. We’re going to use the cleaned up data set later on.
Next we need to get out data ready for the network tool. The plot network tool is good to use when you want to plot relationships between objects through network analysis. A great addition to Ben’s tool versus the standard Alteryx one is that the tool provides a data stream that users can output that has the x and y coordinates including the path so you can easily visualise this in Tableau without having to create any calculations.
How the Network tool works is that you have 2 inputs, the first input ‘N’ represents a unique list of each point that will exists in your network. The second stream is ‘E’ this represents the relationship between each node in the data stream. For the ‘E’ stream the data must contain 2 field: your “from” columns and your “to” column.
A key thing to keep in mind is that each relationship should only exist once in your data set, you can’t have duplicates.
First we need to group by our data to have 2 columns our from columns and to column. In our dateset that will be Astronauts and Countries they are from. This stream will go to the ‘E’ input in the Plot Network Tool.
So now we need to prep the data for the Node input this is the one initialled ‘N’. We’re going to use the Transpose tool to pivot the data so it look like this:
The configuration for this is shown below:
Following this we have to get rid of duplicates in the data that might exist so we use the unique tool, and just select value. That will be connected to the ‘N’ input in your plot network tool.
In the P output you can see what your network will look like:
The ‘D’ output is the one we’re interested here we have the fields that we plot our coordinates the fields we want to keep are: name x, name y, unique, route ID, path ID, from and to. We’re now ready to go to Tableau. I renamed name x and name y to x and y.
Here is how to plot your coordinates in Tableau, I wanted to go for a star like look so I picked a very soft colour and I reduced the opacity down to 11%.
So I wanted each astronaut to be represented by a dot so I did a dual axis on Min(y) and made the marks card to be a circle. I did a data blend of my cleaned up data set to include other information such as year and flight information.
If you have any questions let me know in the comments sections!