A First Experiment with Evidence

I came across Evidence while looking through a list of YCombinator backed companies operating out of Canada. As someone who is a lot more comfortable with data (as opposed to web development), this was an incredibly fulfilling experience to be able to create data analyses and publish it, without writing a single line of JS

The Dataset

I didn't want to spend time hooking up a postgres DB, so I decided to go with a CSV file from Guilherme Samora containing data regarding alcohol consumption across countries and continents (which I've duly named drinks.csv).

I'm currently a graduate student at McGill University. As someone who went to college in the United States, I thought I was accustomed to large-scale college drinking. I should admit that drinking culture seems a lot more ingrained into the social culture here at McGill: I don't mean to be judgemental at all; in fact, I love beer (especially when you can get one for $2 on university grounds).

Data Table

Taking a look at the data as-is.

Country Beer Servings Spirit Servings Wine Servings Total Litres of Pure Alcohol Continent
Afghanistan 0 0 0 0.00 AS
Albania 89 132 54 4.90 EU
Algeria 25 0 14 0.70 AF
Andorra 245 138 312 12.40 EU
Angola 217 57 45 5.90 AF
Antigua & Barbuda 102 128 45 4.90 NA
No Results

I absolutely love this - to get the table above, I can just simply run SQL directly from a markdown document!

Trying a CASE Statement: Available Continents

I'm generating a list of continents that are represented in this dataset using a new SQL query as can be seen below. I'm doing this here specifically to see if my usual way of writing CASE statements will work without any issues.

Continent Code Continent Name
AS Asia
EU Europe
AF Africa
NA North America
SA South America
OC Oceania
No Results

Using an Aggregation: Finding the Top 10 Consumers of Beer

Taking a look at the top 10 consumers of beer as per the available data. Using a simple SQL GROUP BY and ORDER BY with a LIMIT 10 clause.

Country Beer Consumed
Namibia 376
Czech Republic 361
Gabon 347
Germany 346
Lithuania 343
Poland 343
Venezuela 333
Ireland 313
Palau 306
Romania 297
No Results

Pretty surprised to see Namibia leading this list (though I do have to admit that I have been trying to get my hands on a bottle of Windhoek Beer for over two years with no luck). Czechia isn't as much of a surprise considering they're renowned for Pilsners. Wondering what the trend is if the aggregation is performed by continent:

Continent Beer Consumed
EU 8,720
NA 3,345
AF 3,258
SA 2,101
AS 1,630
OC 1,435
No Results

Average Beer Consumption by Continent

Continent Average Beer Consumption
EU 194
SA 175
NA 145
OC 90
AF 61
AS 37
No Results

Ranking Top 5 Consumers of Beer by Continent

Attempting the use of Window Functions to get the top 5 consumers of beer by continent which can be chosen using a filter:

Country Continent Continent Rank Beer Servings
Russian Federation AS 1 247
South Korea AS 2 140
Kazakhstan AS 3 124
Vietnam AS 4 111
Thailand AS 5 99
No Results

Playing around with available visualization components

Creating a Bar Plot of Beer Servings per year

Loading...

This is so neat! Especially considering tooltips that already come along with a beautiful plot!

Creating a Big Value KPI Card

Total Beer Servings

20,489

Total Wine Servings

9,544

Total Spirit Servings

15,632

Chart with Filter

Loading...