For once, this post is not belated because I just finished development on this little app yesterday. Small victories!
I am now working as a Senior Consultant out of Slalom's San Francisco office. Since I just started early this month, I'm still "on the bench" as they say, waiting to be sent into action on my first project. I love that as a consultant, I am encouraged to use this down time to learn and grow professionally! I've been wanting to branch out from just using Tableau all the time, more into the world of front-end data visualization, so now is the perfect time.
Tutorials completed, I could finally get started.
For this project, I'm using data from NASA's Horizons API, which has coordinates for many different bodies in our solar system - from planets and their moons to asteroids and comets - at pretty much any given time, relative to your choice of city or even planet. So my first real step was to get something on the page using static data that I downloaded from the Horizons web app, as shown above. Once I got that working with one body, I downloaded a few more and made sure my script would work by looping through the list of bodies. I wrapped all of my spheres in high-resolution textures from this site to make the planets and the Sun all look realistic.
Next, it was time to start making real API calls to get my data. This is where development had to slow down just a little bit, because the NASA API server can't handle too many calls at once, so each one had to be spaced out using a timeout function in Angular. The final waiting time in between calls is 2.5 seconds(!) which explains why the app takes so stinking long to load since it has to wait in between all the 8 planets (no, Pluto is not a planet!) and the Sun.
Ultimately, it was the first part of this StackOverflow answer which I was able to use to fix the problem once and for all. I was able to very easily (and free-ly) create a little app on Heroku and deployed this CORS Anywhere proxy to it. For once in my dev career, everything actually worked as expected and I didn't run into any weird, undocumented bugs or glitches. It was blissful. [Note: unfortunately, Heroku has discontinued their free tier so I need to find a different tool to fulfill these purposes, but haven't had the time. Hopefully sometime before the end of 2023!]
From here, there wasn't too much left to do! I created the header as an image in Figma, which is a wonderful design tool - great for creating and editing vector images, amazing for collaboration, easy to use, and has a very solid free option. Then I added a minimal blurb of informative text, slapped on my cute little logo (created by the amazing Andrea Millea), and deployed it to my Github site.
Are there things I could have done differently? Absolutely. To name just a few, I could have added:
This is a VERY belated post! Like more than 3 years late! But better late than never, right?
For this project, I used data from Crit Role Stats. They don't currently have an API but they do house most of their data in Google Sheets and what they don't have in a sheet lives in Google Docs which are embedded on their site. The Google Sheets data was easy to pull into the dashboard using Tableau's built-in Sheets connector, and the rest presented a fun challenge.
To begin, for each set of non-Sheets data that I wanted, I built a Python-powered web scraper in Morph.io, each of which is housed in my own Github in the repositories ("repos") labeled with "critrolestats". I then created a Google Sheet of my own, where each tab points to one of my Morph.io APIs, like so:
The "importdata()" function in Sheets was instrumental to making this all work! From here, I was able to again use Tableau's built-in Sheets connector to pull the data into the dashboard. The API call is made each time the extract is refreshed, which is daily on Tableau Public, so the dashboard stayed up to date until the end of the campaign in 2021.
As for the details about the inner workings of the Tableau workbook, I leave it to the reader to download and sniff around. :)
In a very cool (for me) turn of events, the Wildemount Dashboard was part of the Long List for the 2019 Information is Beautiful Awards. Click here to see the entry.
As of this writing, the viz has almost 10,000 views on Tableau Public.
Also I'm pretty sure this dashboard helped me land a job in early 2020, as I joined a team of D&D nerds with whom I still play on a quasi-regular basis even though I've since moved on from that company!