Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions istherecorrelation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv("istherecorrelation.csv", sep=";", decimal=",")

print(df.head())

plt.figure()
plt.scatter(df["WO [x1000]"], df["NL Beer consumption [x1000 hectoliter]"])
plt.xlabel("University Graduates (x1000)")
plt.ylabel("Beer Consumption (x1000 hectoliters)")
plt.grid(True)
plt.savefig("correlation_scatter.png", dpi=300)
plt.show()
9 changes: 9 additions & 0 deletions solution_.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Student ID: 12609536

MCC Van Dyke et al., 2019
JT Harvey, Applied Ergonomics, 2002
DW Ziegler et al., 2005

![Scatterplot](correlation_scatter.png)

As the number of WO university students in the Netherlands goes up, so does the amount of consumed alcohol.