Here are a few things that people have asked me to explain how they were done.
I decided to go w/ Are We Alone In The Universe b/c there is a lot of information on Wikipedia (the required data source) about planets discovered by the Kepler Spacecraft.
I wanted to start w/ a Splash Page to set the tone and (hopefully) grab the viewers attention. I used a couple of free pictures I found on the web for the iPad and the background sky. Since March is Women in History (and science) month, I was SURE to use an image w/ a female hand.
It was easy to copy/paste this data into a spreadsheet.... but I wanted additional data that could only be found by clicking on the Planet link. That's where Python came in handy. Python allowed me to quickly scrape data from 548 webpages in just a few minutes. Here's the code and what it does.
import requests from bs4 import BeautifulSoup import json
I set my stars = all of the 548 planets found on the above link (this was as simple as copying the data in my planet column and pasting it between the brackets [ ] and adding a single quote around the planet name.
Note: for a better explanation of how to use Python, check out Curtis Harris' blog. http://curtisharris.weebly.com/blog/iron-viz-significant-births-throughout-history The code ran surprisingly fast but ended up with a lot of data that I didn't need. I only wanted the Coordinates, Constellation, and Temperature. (see picture)
For me, it was easier to then just query the data clob for the key words 'Coordinates:', 'Constellation', and 'Temperature'. (Eventually I will improve my Python skills so I can scrape just that data that I need.) I then added a couple of columns to my result set (which was in Excel) and pasted in the results.
As you can see, not all of the links had results so I did a Left Outter join between my 2 data sets.
When I start I Viz I tend to throw in EVERYTHING; then start chip chip chipping away. 1. Does the information/workbook/graph relate directly to the subject? 2. Is the information/workbook/graph interesting and helpful? 3. Does the information/workbook/graph distract from the Viz?
Example: I had created a workbook called The Drake Equation (calculates the # of possible alien civilizations in the Universe.) I thought it was BRILLIANT!!! Users could play around w/ the variables (parameters) which affected the results... but when I asked some friends to check out the workbook, I found that most were confused. Each variable had to be explained and the results were pretty vague... so while Fun for the creator, it distracted from the Viz.
For the Star Constellation Chart, I wanted to add line coordinates that could be used later w/ tool tips. I found the image that I wanted to use on Wikipedia and then drew some lines intersecting the stars I wanted to identify. I then pasted the picture into excel and added #'s to the columns and rows to figure out my X and Y coordinates.
For the Size of Planets Grouped, I wanted the Reference Planet on the top of each column... this required the creation of some calculated fields.
Planet Size Grouping Order is a simple IF statement that put each planet into a numbered group based on size. I used this for my ordering (Earth Size first, then Super Earth Size, Etc.)
if [Radius (Rj)] <= .1115 then 1 elseif [Radius (Rj)] > .1115 and [Radius (Rj)] <= .1784 then 2 elseif [Radius (Rj)] > .1784 and [Radius (Rj)] <= .5352 then 3 elseif [Radius (Rj)] > .5352 and [Radius (Rj)] <= 1.338 then 4 elseif [Radius (Rj)] > 1.338 then 5 end
Planet Size Grouping is the same IF statement except I used Descriptions instead of Numbers. This gave me my labels at the bottom.
if [Radius (Rj)] <= .1115 then 'Earth Size' elseif [Radius (Rj)] > .1115 and [Radius (Rj)] <= .1784 then 'Super Earth Size' elseif [Radius (Rj)] > .1784 and [Radius (Rj)] <= .5352 then 'Neptune Size' elseif [Radius (Rj)] > .5352 and [Radius (Rj)] <= 1.338 then 'Jupiter Size' elseif [Radius (Rj)] > 1.338 then 'Larger' end
CNTD(Planet) is a simple Count Distinct of the planets... creating the ordered layers going up the column (showed how many planets fell into each category.
AGG(Planet Count Plus) is used to display the Planet Shapes on the top of each layer. Here's the calculation.
I then made it a Dual Axis and Shape; assigning a different planet to each shape. I used the same Planet Size Grouping
I love Scatter Plots. They give a lot of information and are just plan fun. I wanted to show how you can use images on a scatter plot graph to create an awesome Viz.
Salt Lake City is known for it's winter inversions (when smog gets trapped in the valley during the winter months.) The city has put forth some regulations to decrease pollution from vehicles, power plants and wood burning fireplaces. I wanted to create a viz to show how this has affected the number of bad inversion days. (Spoiler Alert... is hasn't helped.)
The first thing I did was collect my data (via the Utah Division of Air Quality.) I entered that into columns A, B and C. The next thing I needed to do was figure out How I wanted to show the data and Where to plot the levels. (Note the sorting... Measure Desc and then Levels... this is important.)
I selected the following background image and pasted it into an Excel worksheet. This allowed me to figure out the Size of my graph and my X and Y Axis's. Now I needed to figure out the X and Y Coordinates for each of the Levels. Since I wanted them to appear in a certain order, I sorted my Excel data by Measure Desc and then Levels. The Lowest Levels should always start at the car exhaust, power plant stack and house chimney... so using my Excel worksheet I was able to identify the starting X and Y coordinates, then the next coordinates and so forth. I then added an Image column and numbers 1 thru 10. This was used to keep the order of appearance straight (I also us it for my Shapes.)
Now that the prep work was all done, I opened Tableau and did the following: 1. Connected to my data source (Excel spreadsheet) 2. Dragged over my Column and Row fields (I like to give fields easy names...) 3. Made Image a shape (I then assigned all 10 of the #'s to an image of smoke... I could have used a different image for each number but decided just to use a single one.) 4. Made Levels the colors (used the gray color palette... this made the smoke darker when the levels were higher.) 5. Made Measure Desc my Label (tho I ended up not showing it.) 6. Made Levels the Size (This made the smoke larger when the levels were higher.) 7. Made a Year parameter w/ Values that were 1-10 (made to match Excel spreadsheet) 8. Filtered on Image... By Formula [Image] <= [Parameters].[Year]
After that I decided that I wanted the Background image to change according to the # of Inversion Days. So I created 10 images that had varying shades of Gray for the sky. I added them all to my Mapped Background Images and under Options made them Only Show When a certain Year/Value was selected.
I hope this was helpful... feel free to email me with any questions.