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 @@ + + +
+ + + +The titles of the articles are:
+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/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. 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