A brief on how I made the viz, learnings and techniques used.
I really love reading about Space. Hence I created this viz out of personal interest. There are few interesting visualizations out there which has the same info. I wanted the viz to be interactive and also kind of show each mission as a line from Earth to Mars.It also had to specify Type of Mission, Success/Failure and some details on each mission.
I used scrollable time line to make the selection of dates interactive. The tutorial on this by Ken Flerlage is all you need to implement it in tableau.
Arc representing a mission
I used the method in https://public.tableau.com/app/profile/vizde7382/viz/Curvy/Curvy to create the sin curve.
The curve need to end on a circular path so that it coincide with the orbit for Mars. Some thing like
Below are the details of the calculations to achieve this.(Assuming we have already created the basic sin curve for each mission.)
Calculate the X and Y coordinates of the circle(or Arc) representing Mars /Mars Orbit.
//There are 48 missions. This will give a 160 degree arc rather than circle and the angle at which the mission ending has to be plotted.
// 21 is just a number which will determine how far the Arc is from starting point.
//[Mission Code] – each mission has a code(1-48)
//3 is the radius. This is an adjustment to get the arc right. More on this later in the blog.
Calculating the X and Y coordinates of each mission.
[Y_2] + (7+(WINDOW_MAX(MAX([Y_Mars])))- [Y_2]) * ( [Curve])
//[Y_2] is the starting Y coordinate for each mission.7 is just a number which determines the height at which the arc representing Mars will be drawn.[Curve] has the calculation for drawing the sin curve.
A Mission Type can be ‘Flyby’,’Orbiter’,’Lander’,’Rover’ etc. Based on the mission type the curve end on different arc.
For this, I assigned color to the densified points after the required [Index] for each Mission Type and excluded them.
if [Index]=80 and WINDOW_MAX(MAX([Type_Setup]))=1//Flyby
ELSEIF [Index]>80 and WINDOW_MAX(MAX([Type_Setup]))=1//Flyby : these points will be hidden
ELSEIF [Index]=90 and WINDOW_MAX(MAX([Type_Setup]))=2 //Orbiter
ELSEIF [Index]>90 and WINDOW_MAX(MAX([Type_Setup]))=2 //Orbiter : these points will be hidden
Create a calculated field to determine the X coordinate of each curve ending
if WINDOW_MAX(MAX([Type_Setup]))=1 and [Index]=80
then [X] //For Flyby
ELSEIF WINDOW_MAX(MAX([Type_Setup]))=2 and [Index]=90
then [X] //For Orbiter
ELSEIF WINDOW_MAX(MAX([Type_Setup]))=3 and [Index]=95
then [X] //For Lander
Drag the field to column shelf. Make it dual axis and synchronize the axis. Change mark type to circle. Drag the field [Success/Failure] to color. Set Compute using to path bin for the nested calculations.
Filtering based on Country
Created sheets with list of countries and added a filter action to get the interactivity in Dashboard.
The Final dashboard
The Arc for Flyby and Orbiter was adjusted . It is not a part of perfect circle and hence some of the endpoints don’t exactly coincide with the arcs.
I did this because to get the end points of flyby/ orbiter on a perfect arc needed calculating X and Y coordinates of circle with increased radius that that for Mars. This would in turn create separate curve for each mission type. A particular mission can have more than one mission type(Same mission can have flyby,orbiter and lander) and having separate curve for each mission type would leave the graph incomprehensible.
Maybe in future I would try to find a solution for this 🙂
Leave a Reply