Winnie
15/12/2020
In this assignment, we will explore the gender pay gap data in 2017-2019 published by the UK government.
A basic scatterplot is easy to make, with the added benefit of tooltips that appear when your mouse hovers over each point. Specify a scatterplot by indicating type = "scatter". Notice that the arguments for the x and y variables as specified as formulas, with the tilde operator (~) preceding the variable that you’re plotting.
library(plotly)
plot_ly(gpg17, x = ~DiffMeanHourlyPercent, y = ~MaleTopQuartile, type = "scatter", alpha = 0.5)It shows more companies in the UK have positive gender pay gap (i.e. +ve differnce in mean hourly pay).
We will look at the financial industry in particular.
Most financial companies have +ve gender pay gap where the majority of top earning quartile are male.
We will specify the size argument according to the Employer size.
Let’s look at the gender pay gap over the time for Barclays Bank UK PLC.
We will look at the gender pay gap over time between the financial industries and non-financial industries.
A histogram is great for showing how counts of data are distributed. Use the type = "histogram" argument. Here it shows the distribution of gender pay gap among the companies population.