4 Replies Latest reply on Dec 3, 2016 6:45 PM by Cameron Beasley

    How to properly visualize nation Olympic data

    Cameron Beasley

      Hi all;

       

      First post here. Happy to be able to start learning from the community. I currently work in sport and am trying to produce better visualizations and reports than I have traditionally done with Excel.

       

      My data set includes every placing at a competition (Olympic Games). So one row would include information such as Sport/Event/Athlete//Country/Rank etc. where each / represents a new column.  ex. Athletics/200m Men/Usain Bolt/Jamaica/1/ the next row would have Athletics/200m Men/Andre De Grasse/Canada/2 and so on for all x amount of entries in the Men's 200m. On the same data set it includes all information for all sports. So row 1120 could be something like Modern Pentathlon/Women/Joanne Smith/Guam/15.

       

      I am having a terrible time trying to build a simple medal table by nation (it would need to tally all 1st, 2nd, and 3rd place finishes). I would also love to be able to show Top-5 and Top-8 counts by nation and perhaps broken down further by sport or gender, etc.

       

      Would anybody be able to assist with pointing me in the right direction?

        • 1. Re: How to properly visualize nation Olympic data
          Stephen Rizzo

          Sure, I can try to help. After loading up your data, to get the medal count by nation you will need to start by creating a calculated field to denote which ranks correspond to  which medals. Something like

           

          [Medal] : IF [Rank] <= 3 THEN [Rank] END

           

          This new field is null if the contestant did not receive a medal, 1 for gold, 2 for silver, or 3 for bronze. You will want to convert this new field to a dimension as opposed to a measure. You can then put your [Country] field in the "Columns" shelf and COUNT([Medal]) in your "Rows" shelf. If you want the top 5 or top 8 countries, you just need to put [Country] in the "Filters" card and in the "Top" tab, select under "By field": Top 5 (or 8) by COUNT([Medal]).

           

          I would encourage you to play around with the chart a bit. You could try adding some extra filters, or breaking down the medal counts by medal type. Plenty of things you could do with this.

          • 2. Re: How to properly visualize nation Olympic data
            Eric Van Blargan

            I agree with Stephen.  This is usually a really fun data set to play around with and would also suggest you search Tableau Public to see what others have done with the data and reverse engineer how they built some of their dashboards.

             

            If you wanted to modify Stephen's calculation, you can also do this:

             

            IF [Rank] = 1 THEN 'Gold'

            ELSEIF [Rank] = 2 THEN 'Silver'

            ELESIF [Rank] = 3 THEN 'Bronze'
            ELSE 'Did not medal'

            END

             

            You can use this as a KPI on your color mark to really bring out the successes of countries and individual athletes for comparison.

            • 3. Re: How to properly visualize nation Olympic data
              Cameron Beasley

              Thank you for this. I look forward to playing around on Monday!

              • 4. Re: How to properly visualize nation Olympic data
                Cameron Beasley

                Good idea with KPI. Day one of Tableau and I do not have a background in computer science or programming, glad it is easier to grasp. Thank you.