<jupyter_start><jupyter_text>"Manpower EDA Version: 1.0"> "38 New Insights and Analysis based on Manpower Data Version: 1.0"- toc: true- comments: false- categories: [Kuwait, Man-power, Analysis]- image: /images/MACHINE%20THINKING.png- hide: false- search_exclude: true- metadata_key1: version-01  Installing Libraries<jupyter_code>#hide
!pip install pywaffle
!pip install squarify
!pip install pyreadstat
!pip install --upgrade plotly<jupyter_output><empty_output><jupyter_text>Importing Libraries and Dependencies<jupyter_code>#hide
import pandas as pd
import numpy as np
import operator
from datetime import datetime, date
from pywaffle import Waffle
#hide
import warnings
warnings.filterwarnings('ignore')
#hide
import matplotlib.pyplot as plt
import seaborn as sns
import squarify
import plotly.express as px
import plotly.graph_objects as go
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Importing Dataset<jupyter_code>#hide
df = pd.read_spss('DataManPower.sav')
#hide
df.head()<jupyter_output><empty_output><jupyter_text>Calculating Age<jupyter_code>#hide
df['BIRTH_DATE'] = pd.to_datetime(df['BIRTH_DATE'], errors = 'coerce')
df['BIRTH_DATE']
#hide
def from_dob_to_age(born):
    today = datetime.today()
    return today.year - born.year
#hide
today = datetime.today()
today
#hide
df['Age'] = df['BIRTH_DATE'].apply(lambda x: from_dob_to_age(x))
df['Age']<jupyter_output><empty_output><jupyter_text>Data Formatting<jupyter_code>#hide
df.info()
#hide
df['CIVIL_ID'] = pd.to_numeric(df['CIVIL_ID'])
df['COUNTRY_CODE'] = pd.to_numeric(df['COUNTRY_CODE'])
df['GENDER_CODE'] = pd.to_numeric(df['GENDER_CODE'])
df['COUNTRY_CODE'] = pd.to_numeric(df['COUNTRY_CODE'])
df['RLGION_CODE'] = pd.to_numeric(df['RLGION_CODE'])
df['JOB_CODE'] = pd.to_numeric(df['JOB_CODE'])
df['ECONOMIC_ACT_CODE'] = pd.to_numeric(df['ECONOMIC_ACT_CODE'])
df['EDUCATION_CODE'] = pd.to_numeric(df['EDUCATION_CODE'])
df['MAJOR_CODE'] = pd.to_numeric(df['MAJOR_CODE'])
df['SALARY'] = pd.to_numeric(df['SALARY'])
df['SALARY_TYPE'] = pd.to_numeric(df['SALARY_TYPE'])
df['ONR_GVRN_CODE'] = pd.to_numeric(df['ONR_GVRN_CODE'])
df['MARITAL_STATUS_CODE'] = pd.to_numeric(df['MARITAL_STATUS_CODE'])
df['ADDRESS_AUTO_NO'] = pd.to_numeric(df['ADDRESS_AUTO_NO'])
df['ONR_ID'] = pd.to_numeric(df['ONR_ID'])
df['جنسية'] = pd.to_numeric(df['جنسية'])
#hide
from datetime import datetime
df['HIRE_DATE'] = pd.to_datetime(df['HIRE_DATE'], errors = 'coerce')
df['BIRTH_DATE'] = pd.to_datetime(df['BIRTH_DATE'],errors = 'coerce')
#hide
df['COUNTRY_DESC'] = df['COUNTRY_DESC'].astype('str')
df['GENDER_DESC'] = df['GENDER_DESC'].astype('str')
df['RLGION_DESC'] = df['RLGION_DESC'].astype('str')
df['JOB_DESC'] = df['JOB_DESC'].astype('str')
df['SECTOR'] = df['SECTOR'].astype('str')
df['ECONOMIC_ACT_DESC'] = df['ECONOMIC_ACT_DESC'].astype('str')
df['EDUCATION_DESC'] = df['EDUCATION_DESC'].astype('str')
df['GOVERNORATE_DESC'] = df['GOVERNORATE_DESC'].astype('str')
df['MARITAL_STATUS_DESC'] = df['MARITAL_STATUS_DESC'].astype('str')
df['COMPANY_NAME'] = df['COMPANY_NAME'].astype('str')
#hide
df.info()<jupyter_output><empty_output><jupyter_text>Exploratory Data Analysis<jupyter_code>#hide_input
df.columns
#hide_input
df.describe()
#hide_input
df.dtypes
df.isnull().sum()
#hide
data = df.drop(['COUNTRY_CODE', 'GENDER_CODE','RLGION_CODE', 'JOB_CODE', 'SECTOR','EDUCATION_CODE','ONR_GVRN_CODE',
'MAJOR_CODE','ECONOMIC_ACT_CODE', 'ADDRESS_AUTO_NO','ONR_ID', 'SALARY_TYPE','MARITAL_STATUS_CODE'],axis=1)
#hide_input
data.head()
data.columns
data['COUNTRY_DESC'].unique()
data['RLGION_DESC'].unique()
data['JOB_DESC'].value_counts()
data['EDUCATION_DESC'].unique()
data['SALARY'].value_counts()
data['GOVERNORATE_DESC'].unique()
data['MARITAL_STATUS_DESC'].unique()
data['COMPANY_NAME'].unique()
data['HIRE_DATE'].value_counts()
data['Age'].value_counts()
data.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
RangeIndex: 1574040 entries, 0 to 1574039
Data columns (total 15 columns):
 #   Column               Non-Null Count    Dtype         
---  ------               --------------    -----         
 0   CIVIL_ID             1574040 non-null  int64         
 1   BIRTH_DATE           1573540 non-null  datetime64[ns]
 2   COUNTRY_DESC         1574040 non-null  object        
 3   GENDER_DESC          1574040 non-null  object        
 4   RLGION_DESC          1574040 non-null  object        
 5   JOB_DESC             1574040 non-null  object        
 6   ECONOMIC_ACT_DESC    1574040 non-null  object        
 7   EDUCATION_DESC       1574040 non-null  object        
 8   SALARY               1574039 non-null  float64       
 9   GOVERNORATE_DESC     1574040 non-null  object        
 10  MARITAL_STATUS_DESC  1574040 non-null  object        
 11  COMPANY_NAME         1574040 non-null  object        
 12  HIRE_DATE            1573998 non-null  datetime64[ns]
 1[...]<jupyter_text>VISUALIZATIONS  Top 10 countries from which most of the people are Employeed<jupyter_code>#hide_input
a = dict(data['COUNTRY_DESC'].value_counts())
insight1 = pd.DataFrame()
a = dict(sorted(a.items(), key=operator.itemgetter(1), reverse=True)[:10])
insight1['Country'] = a.keys()
insight1['Count'] = a.values()
insight1
#hide_input
fig = px.treemap(insight1, path=['Country', 'Count'], values='Count',title="Top 10 Countries from which most of the people are Employeed")
fig.show()<jupyter_output><empty_output><jupyter_text>Religion of the Employees<jupyter_code>#hide_input
b = dict(data['RLGION_DESC'].value_counts())
insight2 = pd.DataFrame()
b = dict(sorted(b.items(), key=operator.itemgetter(1), reverse=True)[:6])
insight2['Religion'] = b.keys()
insight2['Count'] = b.values()
insight2
#hide_input
fig = px.bar(insight2,x="Religion",y="Count",color="Religion",text="Count",title = "Religion of the Emploees")
fig.show()<jupyter_output><empty_output><jupyter_text>Highlighted Jobs<jupyter_code>#hide_input
c = dict(data['JOB_DESC'].value_counts())
insight3 = pd.DataFrame()
c = dict(sorted(c.items(), key=operator.itemgetter(1), reverse=True)[:10])
insight3['Jobs'] = c.keys()
insight3['Count'] = c.values()
insight3
#hide_input
fig = px.funnel(insight3, x='Jobs', y='Count',color="Jobs",title = "Highlighted Jobs")
fig.show()<jupyter_output><empty_output><jupyter_text>FREQUENT ECONOMIC ACTS<jupyter_code>#hide_input
d = dict(data['ECONOMIC_ACT_DESC'].value_counts())
insight4 = pd.DataFrame()
d = dict(sorted(d.items(), key=operator.itemgetter(1), reverse=True)[:10])
insight4['ECONOMIC ACT'] = d.keys()
insight4['Count'] = d.values()
insight4
#hide_input
fig = px.scatter(insight4, x="ECONOMIC ACT", y="Count",size="Count", color="ECONOMIC ACT",title = "FREQUENT ECONOMIC ACTS")
fig.show()<jupyter_output><empty_output><jupyter_text>EDUCATIONAL LEVEL OF THE EMPLOYEES<jupyter_code>#hide_input
e = dict(data['EDUCATION_DESC'].value_counts())
insight5 = pd.DataFrame()
e = dict(sorted(e.items(), key=operator.itemgetter(1), reverse=True)[:15])
insight5['EDUCATION'] = e.keys()
insight5['Count'] = e.values()
insight5
#hide_input
fig = px.treemap(insight5, path=['EDUCATION', 'Count'], values='Count',title = "EDUCATIONAL level of the Employees")
fig.show()<jupyter_output><empty_output><jupyter_text>GOVERNORATE RANKING ON THE BASIS OF FREQUENCY FROM Highest TO LEAST<jupyter_code>#hide_input
f = dict(data['GOVERNORATE_DESC'].value_counts())
insight6 = pd.DataFrame()
f = dict(sorted(f.items(), key=operator.itemgetter(1), reverse=True)[:7])
insight6['GOVERNORATE DESC'] = f.keys()
insight6['Count'] = f.values()
insight6['Ranking'] = insight6.index+1
insight6
#hide_input
fig = px.bar(insight6,x="GOVERNORATE DESC",y="Count",color="Ranking",text="Count",title = "GOVERNORATE Ranking on the basis of Occurrence")
fig.show()<jupyter_output><empty_output><jupyter_text>MARITAL STATUS OF THE EMPLOYEES<jupyter_code>#hide_input
g = dict(data['MARITAL_STATUS_DESC'].value_counts())
insight7 = pd.DataFrame()
g = dict(sorted(g.items(), key=operator.itemgetter(1), reverse=True)[:6])
insight7['MARITAL STATUS'] = g.keys()
insight7['Count'] = g.values()
insight7
#hide_input
fig = px.bar(insight7,x="MARITAL STATUS",y="Count",color="MARITAL STATUS",text="Count",title = "MARITAL STATUS")
fig.show()<jupyter_output><empty_output><jupyter_text>TOP 10 COMPANIES IN WHICH THE MAJOR PROPORTION OF PEOPLE IS EMPLOYEED<jupyter_code>#hide_input
h = dict(data['COMPANY_NAME'].value_counts())
insight8 = pd.DataFrame()
h = dict(sorted(h.items(), key=operator.itemgetter(1), reverse=True)[:10])
insight8['COMPANY'] = h.keys()
insight8['Count'] = h.values()
insight8['Ranking'] = insight8.index+1
insight8
#hide_input
fig = px.bar(insight8,x="COMPANY",y="Count",color="Ranking",text="Count",title = "COMPANY Ranking on the basis of Occurrence")
fig.show()<jupyter_output><empty_output><jupyter_text>TOP HIRING MONTHS<jupyter_code>#hide_input
top_5_HIRE_DATE = data['HIRE_DATE'].value_counts().head(5)
fig = px.bar(top_5_HIRE_DATE, title = 'TOP 5 HIRING MONTHS',color=top_5_HIRE_DATE)
fig.show()<jupyter_output><empty_output><jupyter_text>SALARIES OFFERED BY COMPANIES<jupyter_code>#hide_input
insight10 = pd.DataFrame()
insight10 = data.groupby("COMPANY_NAME")['SALARY'].mean()
insight10 = insight10.reset_index("COMPANY_NAME")
insight10 = insight10.nlargest(10,'SALARY')
insight10
#hide_input
fig = px.sunburst(insight10, path=[insight10.index,'COMPANY_NAME', 'SALARY'], values='SALARY')
fig.show()<jupyter_output><empty_output><jupyter_text>COUNTRIES with HIGHEST MEAN SALARIES<jupyter_code>#hide_input
insight11 = pd.DataFrame()
insight11 = data.groupby("COUNTRY_DESC")['SALARY'].mean().round(2)
insight11 = insight11.reset_index("COUNTRY_DESC")
insight11 = insight11.nlargest(10,'SALARY')
insight11
#hide_input
fig = px.pie(insight11, values='SALARY', names='COUNTRY_DESC',
             title = "COUNTRIES WITH HIGH (AVG) SALARIES")
fig.update_traces(textposition='inside', textinfo='percent')
fig.show()<jupyter_output><empty_output><jupyter_text>JOBS WITH HIGHEST MEAN SALARY<jupyter_code>#hide_input
insight12 = pd.DataFrame()
insight12 = data.groupby("JOB_DESC")['SALARY'].mean().round(2)
insight12 = insight12.reset_index("JOB_DESC")
insight12 = insight12.nlargest(10,'SALARY')
insight12
#hide_input
fig = px.bar(insight12,x="JOB_DESC",y="SALARY",color="SALARY",text="SALARY",title = "JOBS WITH HIGHEST MEAN SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>HIGH MEAN SALARIES OF DIFFERENT EDUCATIONAL BACKGROUNDS<jupyter_code>#hide_input
insight13 = pd.DataFrame()
insight13 = data.groupby("EDUCATION_DESC")['SALARY'].mean().round(2)
insight13 = insight13.reset_index("EDUCATION_DESC")
insight13 = insight13.nlargest(10,'SALARY')
insight13
#hide_input
fig = px.bar(insight13,x="EDUCATION_DESC",y="SALARY",color="SALARY",text="SALARY",title = "HIGHEST MEAN SALARIES OF DIFFERENT EDUCATIONAL BACKGROUNDS")
fig.show()<jupyter_output><empty_output><jupyter_text>GOVERNORATE WITH HIGHEST MEAN SALARIES<jupyter_code>#hide_input
insight14 = pd.DataFrame()
insight14 = data.groupby("GOVERNORATE_DESC")['SALARY'].mean().round(2)
insight14 = insight14.reset_index("GOVERNORATE_DESC")
insight14 = insight14.nlargest(7,'SALARY')
insight14
#hide_input
fig = px.bar(insight14,x="GOVERNORATE_DESC",y="SALARY",color="SALARY",text="SALARY",title = "GOVERNORATE WITH HIGHEST MEAN SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>COMPANIES IN DIFFERENT COUNTRIES WITH HIGHEST MEAN SALARIES<jupyter_code>#hide_input
insight15 = pd.DataFrame()
insight15 = data.groupby(["COMPANY_NAME","COUNTRY_DESC"])['SALARY'].mean()
insight15 = insight15.reset_index(["COMPANY_NAME","COUNTRY_DESC"])
insight15 = insight15.nlargest(10,'SALARY')
insight15
#hide_input
fig = px.bar(insight15,x="COUNTRY_DESC",y="SALARY",text="SALARY",color = "COMPANY_NAME",title = "COMPANIES IN DIFFERENT COUNTRIES WITH HIGHEST MEAN SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>EDUCATIONAL LEVEL OF EMPLOYEES IN COMPANIES THAT ARE OFFERED WITH HIGHEST MEAN SALARIES<jupyter_code>#hide_input
insight16 = pd.DataFrame()
insight16 = data.groupby(["COMPANY_NAME","EDUCATION_DESC"])['SALARY'].mean()
insight16 = insight16.reset_index(["COMPANY_NAME","EDUCATION_DESC"])
insight16 = insight16.nlargest(10,'SALARY')
insight16
#hide_input
fig = px.bar(insight16,x="COMPANY_NAME",y="SALARY",text="SALARY",color = "EDUCATION_DESC",title ="EDUCATIONAL LEVEL OF EMPLOYEES IN COMPANIES THAT ARE OFFERED WITH HIGHEST MEAN SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>COMPANIES IN GOVERNORATE WITH HIGHEST MEAN SALARIES<jupyter_code>#hide_input
insight17 = pd.DataFrame()
insight17 = data.groupby(["COMPANY_NAME","GOVERNORATE_DESC"])['SALARY'].mean()
insight17 = insight17.reset_index(["COMPANY_NAME","GOVERNORATE_DESC"])
insight17 = insight17.nlargest(10,'SALARY')
insight17
#hide_input
fig = px.bar(insight17,x="COMPANY_NAME",y="SALARY",text="SALARY",color = "GOVERNORATE_DESC",title = "COMPANIES IN GOVERNORATE WITH HIGHEST MEAN SALARIES")
fig.show()
#hide_input
data.columns<jupyter_output><empty_output><jupyter_text>Companies offering Maximum salary<jupyter_code>#hide_input
insight18 = pd.DataFrame()
insight18 = data.groupby("COMPANY_NAME")['SALARY'].max()
insight18 = insight18.reset_index("COMPANY_NAME")
insight18 = insight18.nlargest(5,'SALARY')
insight18
#hide_input
fig = px.bar(insight18,x="COMPANY_NAME",y="SALARY",text="SALARY",color = "COMPANY_NAME",title = "COMPANIES THAT OFFER HIGHEST SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Top 5 companies:**-- offering max salary -- country-- gender of that employee<jupyter_code>#hide_input
insight19 = pd.DataFrame()
insight19 = data.groupby(["COMPANY_NAME","COUNTRY_DESC","GENDER_DESC"])['SALARY'].max()
insight19 = insight19.reset_index(["COMPANY_NAME","COUNTRY_DESC","GENDER_DESC"])
insight19 = insight19.nlargest(5,'SALARY')
insight19
#hide_input
fig = px.sunburst(insight19, path=[insight19.index, 'COMPANY_NAME','COUNTRY_DESC','GENDER_DESC','SALARY'], values='SALARY',
                  color='SALARY', hover_data=['COMPANY_NAME','COUNTRY_DESC','GENDER_DESC','SALARY'],
                  color_continuous_scale='RdBu')

fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Last 5 companies:**-- offering min salary-- country-- gender of that employee<jupyter_code>#hide_input
insight20 = pd.DataFrame()
insight20 = data.groupby(["COMPANY_NAME","COUNTRY_DESC","GENDER_DESC"])['SALARY'].min()
insight20 = insight20.reset_index(["COMPANY_NAME","COUNTRY_DESC","GENDER_DESC"])
insight20 = insight20.nsmallest(5,'SALARY')
insight20
#hide_input
fig = px.sunburst(insight20, path=[insight19.index, 'COMPANY_NAME','COUNTRY_DESC','GENDER_DESC','SALARY'], values='SALARY',
                  color='SALARY', hover_data=['COMPANY_NAME','COUNTRY_DESC','GENDER_DESC','SALARY'],
                  color_continuous_scale='RdBu')

fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Top 5 companies:**-- offering max salary-- country situated-- Governorate-- educational level of that employee<jupyter_code>#hide_input
insight21 = pd.DataFrame()
insight21 = data.groupby(["COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"])['SALARY'].max()
insight21 = insight21.reset_index(["COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"])
insight21 = insight21.nlargest(5,'SALARY')
insight21
#hide_input
fig = px.sunburst(insight21, path=[insight21.index, "COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"], values='SALARY',
                  color='SALARY',
                  color_continuous_scale='RdBu')

fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Last 5 companies:**-- offering min salary-- country situated-- Governorate-- educational level of that employee<jupyter_code>#hide_input
insight22 = pd.DataFrame()
insight22 = data.groupby(["COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"])['SALARY'].min()
insight22 = insight22.reset_index(["COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"])
insight22 = insight22.nsmallest(5,'SALARY')
insight22
#hide_input
fig = px.sunburst(insight21, path=[insight22.index, "COMPANY_NAME","COUNTRY_DESC","GOVERNORATE_DESC","EDUCATION_DESC"], values='SALARY',
                  color='SALARY',
                  color_continuous_scale='RdBu')

fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Top 5 companies:**-- offering max salary-- Governorate-- Age-- HIRE Date<jupyter_code>#hide_input
insight23 = pd.DataFrame()
insight23 = data.groupby(["COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"])['SALARY'].max()
insight23 = insight23.reset_index(["COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"])
insight23 = insight23.nlargest(5,'SALARY')
insight23
#hide_input
fig = px.treemap(insight23, path=[insight23.index,"COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"], values='SALARY')
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT **Last 5 companies:**-- offering min salary-- Governorate-- Age-- HIRE Date<jupyter_code>#hide_input
insight24 = pd.DataFrame()
insight24 = data.groupby(["COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"])['SALARY'].min()
insight24 = insight24.reset_index(["COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"])
insight24 = insight24.nsmallest(5,'SALARY')
insight24
#hide_input
fig = px.treemap(insight24, path=[insight23.index,"COMPANY_NAME","GOVERNORATE_DESC","Age","HIRE_DATE"], values='SALARY')
fig.show()<jupyter_output><empty_output><jupyter_text>Ages of Employee<jupyter_code>#hide_input
i= dict(data['Age'].value_counts())
insight25 = pd.DataFrame()
i = dict(sorted(i.items(), key=operator.itemgetter(1), reverse=True)[:10])
insight25['Age'] = i.keys()
insight25['Count'] = i.values()
insight25
#hide_input
fig = px.funnel(insight25, x='Age', y='Count',color="Age",title = "Employees ages")
fig.show()<jupyter_output><empty_output><jupyter_text>MAX SALARY ACCORDING TO AGE<jupyter_code>#hide_input
insight26 = pd.DataFrame()
insight26 = data.groupby("Age")['SALARY'].max().round(2)
insight26 = insight26.reset_index("Age")
insight26 = insight26.nlargest(10,'SALARY')
insight26
#hide_input
fig = px.bar(insight26,x="Age",y="SALARY",text="SALARY",color = "Age",title ="Age wise Top 10 SALARIES")
fig.show()<jupyter_output><empty_output><jupyter_text>INSIGHT -- Top 15 Companies-- Country wise-- age of the employee offered with max salary<jupyter_code>#hide_input
insight27 = pd.DataFrame()
insight27 = data.groupby(["COMPANY_NAME","COUNTRY_DESC","Age"])['SALARY'].max()
insight27 = insight27.reset_index(["COMPANY_NAME","COUNTRY_DESC","Age"])
insight27 = insight27.nlargest(15,'SALARY')
insight27
#hide_input
fig = px.treemap(insight27, path=[insight27.index,"COMPANY_NAME","COUNTRY_DESC","Age"], values='SALARY')

fig.update_layout(margin=dict(t=10, b=10, r=10, l=10))
fig.show()
#hide_input
---- Rough ----
#hide_input
fig = plt.figure(
    FigureClass=Waffle, 
    rows=15, 
    values=insight3['Count'], 
    #colors=("#983D3D", "#232066", "#DCB732"),
    title={'label': 'Vote Percentage in 2016 US Presidential Election', 'loc': 'left'},
    labels=["{0} ({1})".format(n, v) for n, v in insight3['Jobs'].items()],
    legend={'loc': 'upper left', 'bbox_to_anchor': (1.05, 1), 'fontsize': 8}
)
fig.gca().set_facecolor('#EEEEEE')
fig.set_facecolor('#EEEEEE')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1638881764555014, 'fraction_numerical': 0.0316491408053347, 'mean_word_length': 7.7074586869138, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 134, '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': '33', 'dir': 'jupyter-structured-clean-dedup', 'id': '86680', 'license': 'Apache-2.0', 'n_tokens_mistral': 7923, 'n_tokens_neox': 7505, 'n_words': 1109, 'path': '_notebooks/2021_05_19-Manpower-EDA-v1.ipynb', 'repo_name': 'isimplification/manpower.simplification.io', 'size': '19495'}