text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/tabular-playground-series-mar-2022/train.csv')

fig, axes = plt.subplots(nrows=2,ncols=2)
fig.set_size_inches(12, 10)
sns.boxplot(data=df,y="congestion",x="y",ax=axes[0][0])
sns.boxplot(data=df,y="congestion",x="x",orient="v",ax=axes[0][1])
sns.boxplot(data=df,y="congestion",x="direction",orient="v",ax=axes[1][0])
sns.boxplot(data=df,y="congestion",x="xy",orient="v",ax=axes[1][1])
plt.suptitle("Boxplots of congestion over spatial features",fontsize=16)
plt.show()

daysofweek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']

fig, axes = plt.subplots(nrows=1, ncols=2)
fig.set_size_inches(15, 5)
sns.boxplot(data=df, y='congestion', x='day', ax=axes[0])
axes[1].plot(df.groupby(['day']).congestion.mean().reindex(daysofweek))
plt.show()