From 03d0959a3a3bd096f60b9db7efe9d423e1bc8d6c Mon Sep 17 00:00:00 2001 From: Senne Bakker Date: Mon, 27 Sep 2021 19:56:35 +0200 Subject: [PATCH 1/2] Finalize --- Solution_SenneBakker.html | 168 ++++++++++++++++++++++++++++++++++++++ plot_file.py | 30 +++++++ 2 files changed, 198 insertions(+) create mode 100644 Solution_SenneBakker.html create mode 100644 plot_file.py diff --git a/Solution_SenneBakker.html b/Solution_SenneBakker.html new file mode 100644 index 0000000..dd3bde6 --- /dev/null +++ b/Solution_SenneBakker.html @@ -0,0 +1,168 @@ + + + + + + + Solution_SenneBakker + + + + +

Articles

+

The titles of the articles are:

+ +

Beer consumption

+

Looking at the plots shown below, it can be seen that the absolute beer consumption rises significantly, from 2013 to 2018. The increase in beer consumption over that same period is approximately 5%. Before 2014, from 2006 until 2014, beer consumption was approximately constant, with little fluctuations.

+

+

However, when looking at the relative beer consumption in that period, we see that university students are drinking less beer. The increase in absolute beer consumption seems to be connected to the increase of number of students. The number of students rose with approximately 36%. This can also be seen in the relative beer consumption shown below.

+

+

The beer consumption per capita decreases quite steadily over the period from 2006 to 2018. It decreases with approximately 20%.

+

However, the numbers in the data seem to be a bit off. In the sense that it shows that every university student drinks about 4400 liters beer in a year. This corresponds to an average of almost 85 liters of beer every week, which is a ridiculous amount.

+ + diff --git a/plot_file.py b/plot_file.py new file mode 100644 index 0000000..d79bbc8 --- /dev/null +++ b/plot_file.py @@ -0,0 +1,30 @@ +import pandas as pd +import matplotlib.pyplot as plt +pd.options.mode.chained_assignment = None + + +data1 = pd.read_csv("/Users/Senne/Documents/Senne Bakker/UVA:VU/Seminar/Assignment lec 3/CS_Assignment/istherecorrelation.csv",delimiter=";") + +years = data1.iloc[:,0] +# Number of students in terms of thousands +wo = data1.iloc[:,1] +print(wo) +# Beer consumptions in terms of thousands of hectoliters +beer_cons = data1.iloc[:,2] +ratio = [] + +# convert data +for i in range(len(beer_cons)): + wo[i] = wo[i].replace(',', '.', 1) + wo[i] = float(wo[i]) + + ratio.append(beer_cons[i]/wo[i]) + + +# plot data +# plt.scatter(years, ratio) +plt.scatter(years, beer_cons) +plt.title("Total beer consumption over the years") +plt.xlabel("Years") +plt.ylabel("Consumption (10^3 hl)") +plt.show() \ No newline at end of file From 1902e86553d144259fe78f24a94a5fed0070fe78 Mon Sep 17 00:00:00 2001 From: Senne Bakker Date: Mon, 27 Sep 2021 20:03:33 +0200 Subject: [PATCH 2/2] Pushed the html file instead of md file. --- Solution_SenneBakker.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Solution_SenneBakker.md diff --git a/Solution_SenneBakker.md b/Solution_SenneBakker.md new file mode 100644 index 0000000..5183834 --- /dev/null +++ b/Solution_SenneBakker.md @@ -0,0 +1,20 @@ +# Articles +The titles of the articles are: + + - An analysis of the forces required to drag sheep over various surfaces. + - Fantastic yeasts and where to find them: the hidden diversity of dimorphic fungal pathogens. + - The neurocognitive effects of alcohol on adolescents and college students. + +# Beer consumption +Looking at the plots shown below, it can be seen that the absolute beer consumption rises significantly, from 2013 to 2018. The increase in beer consumption over that same period is approximately 5%. Before 2014, from 2006 until 2014, beer consumption was approximately constant, with little fluctuations. + + +![](/Users/Senne/Documents/Senne Bakker/UVA:VU/Seminar/Assignment lec 3/CS_Assignment/Absolute.png "absolute") + +However, when looking at the relative beer consumption in that period, we see that university students are drinking less beer. The increase in absolute beer consumption seems to be connected to the increase of number of students. The number of students rose with approximately 36%. This can also be seen in the relative beer consumption shown below. + +![](/Users/Senne/Documents/Senne Bakker/UVA:VU/Seminar/Assignment lec 3/CS_Assignment/Ratio.png "relative") + +The beer consumption per capita decreases quite steadily over the period from 2006 to 2018. It decreases with approximately 20%. + +However, the numbers in the data seem to be a bit off. In the sense that it shows that every university student drinks about 4400 liters beer in a year. This corresponds to an average of almost 85 liters of beer every week, which is a ridiculous amount.