text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

train_vals = pd.read_csv('../input/richters-predictor-modeling-earthquake-damage/train_values.csv')
train_labels = pd.read_csv('../input/richters-predictor-modeling-earthquake-damage/train_labels.csv')

train_vals.dtypes.value_counts()

train_df = train_vals.merge(train_labels, on='building_id')

numericals = ['count_floors_pre_eq', 'height_percentage', 'area_percentage', 'count_families']

fig, axes = plt.subplots(2,2, figsize = (10,10))
for i, feature in enumerate(numericals):
    sns.histplot(data = train_df, x = feature, ax = axes[i%2, i//2], color = 'purple')
plt.show()

corr = train_df.corr()['damage_grade'].sort_values(ascending=False)[1:]
corr = corr[abs(corr.values) > 0.01]

plt.figure(figsize=(10, 10))
sns.barplot(x=corr.index, y=corr, color='teal')
plt.xticks(rotation=90)
plt.show()