<jupyter_start><jupyter_text>Employment by Gender at UFRN<jupyter_code>import pandas as pd
import numpy as np
from bokeh.charts import Donut, BoxPlot, show, output_notebook
from bokeh.layouts import row

df = pd.read_csv("csv/serversTreatedWithGender.csv")
genderDF = df
genderDF.head()<jupyter_output><empty_output><jupyter_text>Overall Salary Distribution and Participation by Gender<jupyter_code>def showStats(data):
    femaleDF = data[data.gender == 'F']
    maleDF = data[data.gender == 'M']
    print(str(len(data)) + " employees:")
    print("Males: " + str((len(maleDF)/len(data))*100) 
          + "%\tFemales: " + str((len(femaleDF)/len(data))*100) + "%")

    print("\nOverall salary:\nMedian: " + str(data['money'].median()) + "\tMean:" + str(data['money'].mean()))
    print("Male salary:\nMedian: " + str(maleDF['money'].median()) 
          + "\tMean:" + str(maleDF['money'].mean()))
    print("Female salary:\nMedian: " + str(femaleDF['money'].median())
          + "\tMean:" + str(femaleDF['money'].mean()))

    boxPlot = BoxPlot(data, values='money', label='gender',
                title="Salary Distribution by Gender", color = 'gender', plot_width=300, plot_height=500)
    donut = Donut(data, label=['gender'], title="Female and Male Servers", plot_width=500, plot_height=500)
    output_notebook()
    show(row([boxPlot, donut]))

showStats(genderDF)<jupyter_output>5651 employees:
Males: 52.5747655282251%	Females: 47.3898425057512%

Overall salary:
Median: 7967.9	Mean:9236.546607679933
Male salary:
Median: 7648.76	Mean:9268.930912150801
Female salary:
Median: 8193.855	Mean:9204.896452576568<jupyter_text>The percentage of women in UFRN as a whole is close to that of men. The average salary for men is slightly higher. However, when checking the median salary, we see that women earn R$ 545 more than men. Why this difference between the mean and the median values?  The Top 5%One possibility to justify this would be to have more men earning high salaries because the median does not take into account the extreme values as the average does. To verify this, we will repeat the same analysis for the servers that earn the highest salaries in UFRN and see if there is a difference.<jupyter_code>top = 5
quantile = genderDF.money.quantile(1.0 - top/100)
print("Top " + str(top) + "% salary >= R$" + str(quantile))
topDF = genderDF[genderDF.money >= quantile]
showStats(topDF)<jupyter_output>Top 5% salary >= R$19912.21
284 employees:
Males: 63.38028169014085%	Females: 36.61971830985916%

Overall salary:
Median: 21889.394999999997	Mean:24501.595387323927
Male salary:
Median: 22045.915	Mean:24416.29144444445
Female salary:
Median: 21851.254999999997	Mean:24649.23682692307
{'fraction_non_alphanumeric': 0.12842339008142117, 'fraction_numerical': 0.09696521095484827, 'mean_word_length': 5.115384615384615, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '309102', 'license': 'MIT', 'n_tokens_mistral': 1123, 'n_tokens_neox': 895, 'n_words': 249, 'path': '.ipynb_checkpoints/EmploymentByGender-checkpoint.ipynb', 'repo_name': 'pentalpha/ufrn-transparency-remunerations', 'size': '2702'}