<jupyter_start><jupyter_text>Are there specific car types that fail more often than others?<jupyter_code>sns.displot(data=df, x='GVW_TYPE', hue='OVERALL_RESULT', multiple='fill', discrete=True, stat='probability')
sns.displot(data=df, x='MODEL_YEAR', hue='OVERALL_RESULT', multiple='fill', discrete=True, stat='probability')
sns.displot(data=df, x='CYL', hue='OVERALL_RESULT', multiple='fill', discrete=True, stat='probability')
sns.displot(data=df, x='ENGINE_SIZE', hue='OVERALL_RESULT', multiple='fill', discrete=False, stat='probability')
sns.displot(data=df[df.ODOMETER < 500000], x="ODOMETER", hue="OVERALL_RESULT", multiple='fill', discrete=False, stat='probability')
sns.displot(data=df, x="VEHICLE_TYPE", hue="OVERALL_RESULT", multiple='fill', discrete=True, stat='probability')
sns.displot(data=df, x="ESC", hue="OVERALL_RESULT", multiple='fill', discrete=True, stat='probability')<jupyter_output><empty_output><jupyter_text>Do the types of tests correlate?<jupyter_code># select columns to correlate
cols = ['E_HIGH_RPM', 'E_HIGH_CO2', 'E_HIGH_O2', 'E_HIGH_HC', 'E_HIGH_HC_DCF',
        'E_HIGH_HC_LIMIT', 'E_HIGH_CO', 'E_HIGH_CO_DCF', 'E_HIGH_CO_LIMIT', 
        'E_IDLE_DCF', 'E_IDLE_RPM', 'E_IDLE_CO2', 'E_IDLE_O2', 'E_IDLE_HC', 
        'E_IDLE_HC_DCF', 'E_IDLE_HC_LIMIT', 'E_IDLE_CO', 'E_IDLE_CO_DCF', 
        'E_IDLE_CO_LIMIT', 'E_HIGH_DCF_2', 'E_HIGH_RPM_2', 'E_HIGH_CO2_2', 
        'E_HIGH_O2_2', 'E_HIGH_HC_2', 'E_HIGH_HC_DCF_2', 'E_HIGH_CO_2',
        'E_HIGH_CO_DCF_2','E_IDLE_DCF_2','E_IDLE_RPM_2','E_IDLE_CO2_2',
        'E_IDLE_O2_2','E_IDLE_HC_2', 'E_IDLE_HC_DCF_2', 'E_IDLE_CO_2',
        'E_IDLE_CO_DCF_2'
       ]
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.show()
# only CO2 stuff
cols = ['E_HIGH_CO2', 'E_IDLE_CO2', 'E_HIGH_CO2_2', 'E_IDLE_CO2_2']
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.colorbar()
plt.show()
# only CO stuff
cols = ['E_HIGH_CO', 'E_IDLE_CO', 'E_HIGH_CO_2', 'E_IDLE_CO_2']
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.colorbar()
plt.show()
# only O2 stuff
cols = ['E_HIGH_O2', 'E_IDLE_O2', 'E_HIGH_O2_2', 'E_IDLE_O2_2']
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.colorbar()
plt.show()
# only HC stuff
cols = ['E_HIGH_HC', 'E_IDLE_HC', 'E_HIGH_HC_2', 'E_IDLE_HC_2']
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.colorbar()
plt.show()
# only first reading stuff
cols = ['E_HIGH_CO', 'E_IDLE_CO', 'E_HIGH_O2', 'E_IDLE_O2', 
        'E_HIGH_CO2', 'E_IDLE_CO2', 'E_HIGH_HC', 'E_IDLE_HC']
df_cor = df[cols].copy()
# show some correlations
plt.matshow(df_cor.corr())
plt.colorbar()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17593602326426755, 'fraction_numerical': 0.018902217375499818, 'mean_word_length': 7.289156626506024, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '157855', 'license': 'MIT', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1234, 'n_words': 186, 'path': 'notebooks/data_exploration_irene.ipynb', 'repo_name': 'Guli-Y/wimlds_emissions', 'size': '2751'}