Created
June 16, 2018 22:10
-
-
Save gabraganca/4e53b45ae5ba3ce30848ac89dee3f03b to your computer and use it in GitHub Desktop.
Salários mensais da área de dados
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Cria grafico de barras com os salarios para carreiras na area de dados. | |
Os valores forma obtidos no LoveMondays | |
author: Gustavo Braganca ([email protected]) | |
""" | |
import matplotlib.pyplot as plt | |
from collections import OrderedDict | |
values = {'Analista de Dados': 4485, | |
'Cientista de Dados': 9725, | |
'Engenheiro\nde Dados': 5040, | |
'Engenheiro de\nAprendizado de Máquina': 12400} | |
values = OrderedDict(sorted(values.items(), key=lambda t: t[1], reverse=True)) | |
fig, ax = plt.subplots(figsize = (12,5)) | |
ax.barh(y=range(len(values)), | |
width=list(values.values()), | |
color = '#028bb1', ec='#028bb1') | |
for n, val in enumerate(list(values.values())): | |
ax.text(val+200, n, 'R$ '+str(val), | |
verticalalignment='center', | |
horizontalalignment='left', | |
fontdict={'color':'k', | |
'weight': 'normal', | |
'size':14,}) | |
ax.set_yticks(range(len(values))) | |
ax.set_yticklabels(list(values.keys()), fontsize=14) | |
for spine in ['left', 'right', 'bottom', 'top']: | |
ax.spines[spine].set_visible(False) | |
ax.tick_params(bottom = 'off', left='off') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment