<jupyter_start><jupyter_text>Absenteeism - Visualisation and Analysis<jupyter_code># import the relevant libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import os
import seaborn as sns
# We can override the default matplotlib styles with those of Seaborn
sns.set()## Importing the relevant libraries
# Load the data from a .csv file
data_processed = pd.read_csv(os.path.join(os.path.pardir, 'src', 'features', 'predicted_absenteeism.csv'))
df = data_processed.copy()
df<jupyter_output><empty_output><jupyter_text>Age vs Probability<jupyter_code>plt.scatter(df['Age'], df['Probability'].apply(lambda x: x*100))
plt.xlabel('Age',size=18)
plt.ylabel('Probability in %',size=18)
# plt.xlim(6,13)
# plt.ylim(6,13)
plt.show()<jupyter_output><empty_output><jupyter_text>Reasons vs Probability<jupyter_code>f, (ax1, ax2, ax3, ax4) = plt.subplots(1, 4, sharey=True, figsize =(15,9))

ax1.scatter(df['Reason_1'], df['Probability'].apply(lambda x: x*100), s=10, c='b', marker="s")
ax1.set_title('Probability vs Reason 1')

ax2.scatter(df['Reason_2'], df['Probability'].apply(lambda x: x*100), s=10, c='r', marker="s")
ax2.set_title('Probability vs Reason 2')

ax3.scatter(df['Reason_3'], df['Probability'].apply(lambda x: x*100), s=10, c='y', marker="s")
ax3.set_title('Probability vs Reason 3')

ax4.scatter(df['Reason_4'], df['Probability'].apply(lambda x: x*100), s=10, c='g', marker="s")
ax4.set_title('Probability vs Reason 4')

plt.show()<jupyter_output><empty_output><jupyter_text>Transportation Expense, and Children vs Probability<jupyter_code>plt.figure(figsize=(6,6))
plt.scatter(df['Transportation Expense'],
            df['Probability'].apply(lambda x: x*100),
            c=df['Children'], cmap='rainbow', s=df['Children']*100,)
plt.xlabel('Transportation Expense',size=18)
plt.ylabel('Probability in %',size=18)

plt.show()

# The larger the circle the more the children<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16769865841073273, 'fraction_numerical': 0.03611971104231166, 'mean_word_length': 7.430434782608696, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '131376', 'license': 'MIT', 'n_tokens_mistral': 788, 'n_tokens_neox': 722, 'n_words': 152, 'path': 'notebooks/Absenteeism - Visualisation and Analysis.ipynb', 'repo_name': 'Hesbon5600/absenteeism-data-analysis', 'size': '1938'}