How to Make My Favorite Beers Visualization How to Make My Favorite Beers Visualization 8/18/2015

Since I seemed to get quite a bit of interest about how to make My Favorite Beers Viz on Reddit, I thought I'd go ahead and create a post explaining the process. I'm going to first outline how to create it from scratch, then explain how to just update mine with your data (less work involved this way).


Creating the Full Viz

Step 1: Get the Data in Your Desired Format

Step 2: Creating the Top 5 Chart

1 Star Rating:


2 Star Rating:


3 Star Rating:


4 Star Rating:


5 Star Rating:


Position of 1/2 Star:


Position of 1/4 Star:


Position of 3/4 Star:


Index:


Step 3: Creating the Breweries Map

Step 4: Creating the Breweries Table

Step 5: Putting It All Together on a Dashboard

Updating My Viz with Your Own Data

I mentioned in my original post how I got the data, but I'll go ahead and explain it again. On Untappd's Website , you are able to become a "Supporter". Once you do that, you get access to all of your data in an .xls or .csv format. Please note that it costs $5 to become a supporter. Also, if you don't cancel your subscription, they will charge you that $5 every month. So, I just paid the $5, downloaded my data, then canceled my subscription so I don't get charged again. Once you download the data, go ahead and open it up in Excel.Once you have the data opened up, you will see there are fields for the Brewery State and Brewery City. What we need to do is copy both of those and paste them into this Batch Geocode Website so we can create our Brewery Map later. You could try to just use the Brewery State and City to map in Tableau, but a lot of times, Tableau either won't recognize the city, or it will come back as an ambiguous location. So, just paste the city and state into the box on that website, choose Batch Geocode Output Options to be only Latitude and Longitude, then click Geocode. This may take a little while (its best to do about 100 at a time), but it will eventually spit out all of the Latitudes and Longitudes. Then, create two new columns in your spreadsheet and paste the values into there. You will have to use Text-to-Columns with a comma delimiter to split these out. Then you will be good to go ahead and load the data up into Tableau.The only manipulation I did of the data once inside Tableau was a little bit of grouping for the Beer Type field. Untappd uses a lot of different beer types and I just wanted to group some of the similar ones up, so I wasn't stuck with 100 different groups. An example of this is combining all of the different IPA sytles into one over-arching category: IPA. This step is completely optional, but I think it looks much nicer only having 15-20 different groups when looking at the Style filter on the visualization.Doing this is pretty easy. Just drag out the Beer Type field, then Ctrl-Click multiple styles you think would be grouped well together. Once you have multiple types selected, right click and choose "Group". You can see an example photo to the right. Then, you can right click your new group and choose "Edit Alias" to rename your group. Do this to all the styles you feel necessary to group. I used this website as reference.This is probably the toughest part of this whole visualization. This is primarily because of using the stars to signify ranking. Thinking about it, you need not only a full star image, but you also need fractions of that star (1/2 of a star, 3/4 of a star, etc.) I learned how to do this by downloading this workbook . They did a really great job of getting this star rating system to work correctly in Tableau. So, to do this, you are going to need 9 calculated fields:Next, we are going to right-click our index measure and choose "Convert to Discrete". After doing that, you can drag it out to Rows. Now, we are going to create a combined field of Beer Name and Brewery Name. To do this click on Beer Name, then hold ctrl and click on Brewery Name. Then, right click -> Create -> Combined Field. The reason we have to do this is because some beers have identical names across breweries. For example, Bell's, Mt. Carmel, and West Sixth all make a beer named Amber Ale, so creating this field allows us to differentiate between the three Amber Ales. Next, you