diff --git a/Beer consumption and WO.jpg b/Beer consumption and WO.jpg new file mode 100644 index 0000000..37e0761 Binary files /dev/null and b/Beer consumption and WO.jpg differ diff --git a/plot.py b/plot.py new file mode 100644 index 0000000..47d2e8d --- /dev/null +++ b/plot.py @@ -0,0 +1,33 @@ +import pandas as pd +import matplotlib.pyplot as plt +import numpy as np + +df = pd.read_csv('istherecorrelation.csv', sep = ';') +df["WO [x1000]"]=df["WO [x1000]"].str.replace(',','.') +df["WO [x1000]"]=pd.to_numeric(df["WO [x1000]"],errors = 'coerce') + +fig, ax1 = plt.subplots() + +x = df['Year'] +y1 = df['WO [x1000]'] +y2 = df['NL Beer consumption [x1000 hectoliter]'] + +color = 'tab:red' +ax1.set_xlabel('Year') +ax1.set_ylabel('WO [x1000]', color=color) +ax1.plot(x, y1, color=color) + +ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis + +color = 'tab:blue' +ax2.set_ylabel('Beer consumption [x1000 hectoliter]', color=color) # we already handled the x-label with ax1 +ax2.plot(x, y2, color=color) + +fig.tight_layout() # otherwise the right y-label is slightly clipped + +plt.show() + +fig.savefig('Beer consumption and WO.jpg', + format='jpeg', + dpi=300, + bbox_inches='tight') \ No newline at end of file diff --git a/solution_.md b/solution_.md new file mode 100644 index 0000000..cf18a71 --- /dev/null +++ b/solution_.md @@ -0,0 +1,9 @@ +# Papers +1. MCC Van Dyke et al., 2019. The Rise of Coccidioides: Forces Against the Dust Devil Unleashed +2. JT Harvey, Applied Ergonomics, 2002. An analysis of the forces required to drag sheep over various surfaces +3. DW Ziegler et al., 2005. Correlation of continuous cardiac output measured by a pulmonary artery catheter versus impedance cardiography in ventilated patients + +Beer consumption and WO over time +![alt text](https://github.com/mercylyn/CS_Assignment/blob/master/Beer%20consumption%20and%20WO.jpg) + +The graph above shows the number of students in WO (higher education) and beer consumption between the years 2006 and 2018. There is a clear upward trend from 2013 until 2018 in both students in WO and beer consumption.