Day 3 of Dashboard Week was back in Tableau, but also an exercise in webscraping some data on the crime index of cities around the world. We were also required to get another source of data to further enrich our existing information to create our dashboard.

This was my Alteryx workflow, and it was actually a good time for this exercise since Regex definitely feels like one of those skills that deteriorates rapidly the less you use it. As for the data I decided to incorporate in addition to the normal crime index data, I was initially drawn to the cost of living index on the same site, but found that a lot of the information I wanted to use, namely restaurant and grocery index were all using New York City as a benchmark. This felt extremely strange to me since its not like New York City is a particularly affordable city to live in, and it really only served to highlight cities that were even more expensive.

To that end, I decided to use the Economist’s infamous Big Mac Index data, a project that tried to draw insights from a country’s economy based on the price of a Big Mac there. Thankfully, though the initial article and study was performed in the 1980s, the people at the Economist have continued to maintain and update the data in their github, which made for a really easy and smooth download process.

So with that all joined together and in Tableau, I settled on a more light-hearted approach to the otherwise grim crime index information by creating a fictional scenario. Where would the Hamburglar, beloved 90s and 00s McDonald’s mascot character strike next? I set the parameters at being in a country where the Big Mac didn’t cost a lot and where the crime index was high, and finally wrapping up with a  final score based on crime index divided by the adjusted cost of a Big Mac. Ultimately, I just wanted a story that meant I wasn’t going to arrive at Brazil or Venezuela as my answer, since it was abundantly clear how badly those countries were doing at crime prevention.

The actual construction of the dashboard itself was quite interesting and provided me a lot of opportunities to test out new features in Tableau. Specifically, I incorporated a unit chart to show how many Big Macs $50 could buy you in these countries, though I spent a lot of time trying to figure out how to actually do it properly, and was more there in the dashboard as a callback to the original Economist study.

Had I more time I’d have liked to be able to find information on the local average monthly wage and really figure out how much a Big Mac costs relative to that since I discovered that Venezuela, a country that the Economist didn’t track, has the Big Mac meal costing a whopping 5% of the average monthly wage.

Daniel Yam
Author: Daniel Yam