text_html_output_1.png
from collections import Counter

import matplotlib.pyplot as plt

import os

import pandas as pd

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from collections import Counter
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
pd.set_option('display.max_columns', 500)
import os

df = pd.read_csv('../input/wuzzuf-jobs/Wuzzuf_Jobs.csv')

fig , ax   = plt.subplots (figsize = (18 , 6))
df.Title.value_counts().sort_values(ascending  = False).reset_index().head(25).plot(kind = 'bar' ,
                                                                                    x = 'index' , ax = ax ,
                                                                                   alpha = 0.7 ,  color = 'grey' , 
                                                                                    width=0.4);
ax.grid(axis = 'y' , alpha=0.6)

for patch in ax.patches:
    bl = patch.get_xy()
    x = 0.5 * patch.get_width() + bl[0]
    y = 1.02 * patch.get_height() + bl[1] 
    ax.text(x,y,"%d" %(patch.get_height()),
            ha='center' , color = '#4a4a4a',
           fontsize = 12, fontfamily='serif')
    
    

for s in ['top', 'left', 'right']:
    ax.spines[s].set_visible(False)

plt.ylabel('Number of posted jobs' , fontsize = 14, fontfamily='serif');
plt.xlabel('Job Titel' , fontsize = 14, fontfamily='serif');

plt.xticks(fontsize = 12 , rotation = 90 , fontfamily='serif');

plt.title('Most Job Titles Posted on Website ' ,fontsize = 16, fontfamily='serif' );

df['titel_adj'] = df.Title.apply(lambda x: 'Sales' if 'Sales' in x or 'Telesales' in x else x)
df['titel_adj'] = df.titel_adj.apply(lambda x: 'Accountant' if 'Accountant' in x or 'Accounting' in x else x)
df['titel_adj'] = df.titel_adj.apply(lambda x: 'Marketing' if 'Marketing' in x else x)
df['titel_adj'] = df.titel_adj.apply(lambda x: 'HR' if 'HR' in x else x)
df['titel_adj'] = df.titel_adj.apply(lambda x: 'Graphic designer' if 'Graphic' in x else x)
df['titel_adj'] = df.titel_adj.apply(lambda x: 'Bussiness Developer' if 'Bussiness Developer' in x else x)

fig , ax   = plt.subplots (figsize = (18 , 5))
df.titel_adj.value_counts().sort_values(ascending  = False).reset_index().head(25).plot(kind = 'bar' ,
                                                                                        x = 'index' , ax = ax,
                                                                                        alpha = 0.7 ,  color = 'grey' , 
                                                                                        width=0.4);

ax.grid(axis = 'y' , alpha=0.6)

for patch in ax.patches:
    bl = patch.get_xy()
    x = 0.5 * patch.get_width() + bl[0]
    y = 1.02 * patch.get_height() + bl[1] 
    ax.text(x,y,"%d" %(patch.get_height()),
            ha='center' , color = '#4a4a4a',
           fontsize = 12, fontfamily='serif')
    
    

for s in ['top', 'left', 'right']:
    ax.spines[s].set_visible(False)

plt.ylabel('Number of posted jobs' , fontsize = 14, fontfamily='serif');
plt.xlabel('Job Titel' , fontsize = 14, fontfamily='serif');

plt.xticks(fontsize = 12 , rotation = 90 , fontfamily='serif');

plt.title('Most Job Titles Posted on Website ' ,fontsize = 16, fontfamily='serif' );

sales_skills = Counter()
df_Sales = df[df['titel_adj']  == 'Sales'].reset_index()

for i in range(df_Sales.shape[0]):
    for j in df_Sales.Skills[i].split(', '):
        sales_skills [j] += 1

sales_skills = sorted(sales_skills.items(), key=lambda x: x[1] , reverse=True)[0:25]

x, y = zip(*sales_skills) # unpack a list of pairs into two tuples

fig , ax   = plt.subplots (figsize = (18 , 5))
plt.bar(x, y , alpha = 0.7 ,  color = 'grey' , width=0.4);

ax.grid(axis = 'y' , alpha=0.6)

for patch in ax.patches:
    bl = patch.get_xy()
    x = 0.5 * patch.get_width() + bl[0]
    y = 1.02 * patch.get_height() + bl[1] 
    ax.text(x,y,"%d" %(patch.get_height()),
            ha='center' , color = '#4a4a4a',
           fontsize = 12, fontfamily='serif')
    
    

for s in ['top', 'left', 'right']:
    ax.spines[s].set_visible(False)

plt.ylabel('Number of skill\'s Occurance' , fontsize = 14, fontfamily='serif');
plt.xlabel('Sales Skills' , fontsize = 14, fontfamily='serif');

plt.xticks(fontsize = 12 , rotation = 90 , fontfamily='serif');

plt.title('Most Important Skills for Sales ' ,fontsize = 16, fontfamily='serif' );

all_skills = Counter()
for i in range(df.shape[0]):
    for j in df.Skills[i].split(', '):
        all_skills[j] += 1
all_skills = sorted(all_skills.items(), key=lambda x: x[1], reverse=True)[0:25]
x, y = zip(*all_skills)
fig, ax = plt.subplots(figsize=(18, 5))
plt.bar(x, y, alpha=0.7, color='grey', width=0.4)
ax.grid(axis='y', alpha=0.6)
for patch in ax.patches:
    bl = patch.get_xy()
    x = 0.5 * patch.get_width() + bl[0]
    y = 1.02 * patch.get_height() + bl[1]
    ax.text(x, y, '%d' % patch.get_height(), ha='center', color='#4a4a4a', fontsize=12, fontfamily='serif')
for s in ['top', 'left', 'right']:
    ax.spines[s].set_visible(False)
plt.ylabel("Number of skill's Occurance", fontsize=14, fontfamily='serif')
plt.xlabel('Skills', fontsize=14, fontfamily='serif')
plt.xticks(fontsize=12, rotation=90, fontfamily='serif')
plt.title('Most Important Skills for All Jobs ', fontsize=16, fontfamily='serif')