Day two of dashboard week coincided with the Melbourne Cup, so to no surprise, the theme for today was all things Melbourne Cup. Today’s challenge involved scraping web data of our choosing to visualise on a dashboard. Along with most of the DSers, I attempted to scrape data about the horses running in today’s race, mostly from Sportsbet. This involved information on prize money, winning odds and career wins in different conditions. In addition to brushing up on scraping and parsing web data, I also picked up a few tips and tricks here and there.
So here are some highlights from what I learnt today:
1. Alteryx – regex revisited
Today’s challenge was a great exercise in regex, and I learnt to use the tokenise capability of the tool. Usually to parse data, I would split to rows and parse out any expressions of interest, but today we tokenised patterns from the entire string. This captures each instance of the regex (for example, each of the horse’s names in the order they appear). Then we can simply add a record ID and use the join multiple tool in Alteryx to bring all the data together.
2. Alteryx – tile tool to cluster data
Today we also discovered the tile tool (even though it has been there in front of us this whole time!) I used the equal records configuration which means that it will cluster records into x ‘tiles’ of an equal number of rows. So in the example below, I knew that we had 24 horses and 22 records/characteristics for each horse. Using the tile tool, we can cluster this information relatively easily and then crosstab based on the characteristics (tile sequence number), grouped by the horses (tile number).
3. Alteryx – modulus formula to sample data
I also revisited the mod formula today as an alternate way to sample data. I wanted to split every second row from every other row . In the example below, in order to crosstab the data, I labelled each row with its proper field name, and gave each pairing a new ID that I could then group by when cross tabbing.
4. Tableau – parameter actions to change labels
Another thing I played around with was using parameter actions in Tableau to add subtitles that update with my parameter. This was done using a case statement that returns specific strings that I could then insert into a text box.
5. Tableau – containers and padding
I was challenged to make good use of containers in order to organise all the charts onto a single dashboard. I also played around with the container padding and background settings to ensure clear and even spacing around each section.
And here is the final product!