from google.colab import drive
import matplotlib.pyplot as plt
import pandas as pd
drive.mount('/content/drive/MyDrive/Infoviz')
# Load data
df = pd.read_csv('drinks.csv')
# Create a scatter plot
fig, ax = plt.subplots(figsize=(10, 6))
df.plot(kind='scatter', x='beer_servings', y='total_litres_of_pure_alcohol', ax=ax)
ax.set_xlabel('Beer servings')
ax.set_ylabel('Total litres of pure alcohol')
ax.set_title('Correlation between beer servings and alcohol consumption')
plt.show()
labels = ['Beer Servings', 'Spirit Servings', 'Wine Servings']
sizes = [df['beer_servings'].sum(), df['spirit_servings'].sum(), df['wine_servings'].sum()]
plt.figure(figsize=(8,6))
plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=90)
plt.title('Total Litres of Pure Alcohol by Beverage Type')
plt.axis('equal')
plt.show()
plt.figure(figsize=(8,6))
plt.boxplot(df['wine_servings'])
plt.title('Wine Servings by Country')
plt.ylabel('Wine Servings')
plt.show()