# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
from bs4 import BeautifulSoup
from splinter import Browser
import requests

import pandas as pd
import numpy as np
import csv as csv
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure

import time
import pymongo

import json
from sqlalchemy import create_engine

# import re
# from textblob import TextBlob
# from wordcloud import WordCloud, STOPWORDS

# Google, Cisco, Adobe, Apple, Facebook, Kaiser, Visa, Salesforce, Oracle, twillo

# -







df1 = pd.read_csv('Google_data\AluminiAll.csv')
df2 = pd.read_csv('Google_data\AluminiCompanies.csv')
df3 = pd.read_csv('Google_data\AluminiPositions.csv')
df4 = pd.read_csv('Google_data\AluminiData.csv')
df5 = pd.read_csv('Google_data\AluminiDataFinal.csv')

# +
# test = pd.concat([df2,df2.google.str.get_dummies(sep='- ')],1)
# test

test = df2.head(10)
test
# -



# +
# apple = "yeallow"
# linkedin = "blue"
# facebook = "red"
# google = "green"
# salesforce= "purple"


figure(figsize=(20,10))
plt.bar(test["skill.1"],test["apple"])
plt.bar(test["skill.2"],test["facebook"])
plt.bar(test["skill"],test["google"])
plt.bar(test["skill.3"],test["linkedin"])
plt.bar(test["skill.4"],test["saleforce"])

# ax.plot(dates,ydata)
# for tick in ax.get_xticklabels():
#     tick.set_rotation(45)



plt.title('Alumini Skill set, breakdown') 
plt.xlabel('Skill') # set text for the x axis
plt.ylabel('Number of Alumin with the skill') # set text for the y axis

plt.style.use('seaborn-whitegrid')
plt.legend(loc='best', fontsize=20, fancybox=True)

plt.xticks(rotation=90) #rotates the x-axis label


# Save the Figure
plt.savefig("Google_Data/bar.png")

plt.show()
# -

df3

# +
test = df3.head(15)


figure(figsize=(20,10))
plt.bar(test["Engineering"],test["Eng.count"])
# plt.bar(test["skill.2"],test["facebook"])
# plt.bar(test["skill"],test["google"])
# plt.bar(test["skill.3"],test["linkedin"])
# plt.bar(test["skill.4"],test["saleforce"])

# ax.plot(dates,ydata)
# for tick in ax.get_xticklabels():
#     tick.set_rotation(45)


plt.title('Alumini Skill set, working at Google, Cisco, Adobe, Apple, Facebook, Kaiser, Visa, Salesforce, Oracle, twillo') 
plt.xlabel('Skill') # set text for the x axis
plt.ylabel('Number of Alumin with the skill') # set text for the y axis

plt.style.use('seaborn-whitegrid')
plt.legend(loc='best', fontsize=20, fancybox=True)
plt.xticks(rotation=90) #rotates the x-axis label


# Save the Figure
plt.savefig("Google_Data/bar.png")

plt.show()
# -



# +
df5= df5.head(10)

plt.bar(df5["skills"],df5["salesforce"])
plt.bar(df5["skills"],df5["google"])
plt.bar(df5["skills"],df5["apple"])
plt.bar(df5["skills"],df5["facebook"])


# ax.plot(dates,ydata)
# for tick in ax.get_xticklabels():
#     tick.set_rotation(45)

xticklabels = ["s","s","s","s","s","s","s","s","s","s"]

plt.title('Alumini Skill set, breakdown') 
plt.xlabel('Skill') # set text for the x axis
plt.ylabel('Number of Alumin with the skill') # set text for the y axis

plt.style.use('seaborn-whitegrid')
plt.legend(loc='best', fontsize=12, fancybox=True)

fig, ax = plt.subplots()
ax.set_xticklabels(xticklabels, rotation = 45, ha="right")
ax.set_xticklabels(xticklabels, rotation = 45, va="center", position=(0,-0.28))


# Save the Figure
plt.savefig("Google_Data/bar.png")

plt.show()

# +
# import pandas as pd

# df2 = pd.read_csv('Google_data\AluminiCompanies.csv')
# df3 = pd.read_csv('Google_data\AluminiPositions.csv')

# #Generate wordcloud of positive tweets


# stopwords=set(STOPWORDS)
# wordcloud = WordCloud(width=800, height=500, background_color='white',stopwords=stopwords, max_font_size=90).generate(df2)
# plt.figure(figsize=(10, 7), facecolor=None)
# plt.imshow(wordcloud, interpolation="bilinear")
# plt.axis('off')
# plt.savefig('Images/wordcloud.png', bbox_inches='tight')

StarcoderdataJupyterScriptsDedupFiltered