Gender at the Work Place
1 Setting up R Packages
Plot Fonts and Theme
Use _setup.qmd to set these up.
2 Introduction
This is a dataset pertaining to gender and compensation at the workplace, modified for ease of analysis and plotting.
3 Data
Rows: 2,088
Columns: 12
$ year <dbl> 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, …
$ occupation <chr> "Chief executives", "General and operations mana…
$ major_category <chr> "Management, Business, and Financial", "Manageme…
$ minor_category <chr> "Management", "Management", "Management", "Manag…
$ total_workers <dbl> 1024259, 977284, 14815, 43015, 754514, 44198, 10…
$ workers_male <dbl> 782400, 681627, 8375, 17775, 440078, 16141, 7287…
$ workers_female <dbl> 241859, 295657, 6440, 25240, 314436, 28057, 3683…
$ percent_female <dbl> 23.6, 30.3, 43.5, 58.7, 41.7, 63.5, 33.6, 27.5, …
$ total_earnings <dbl> 120254, 73557, 67155, 61371, 78455, 74114, 62187…
$ total_earnings_male <dbl> 126142, 81041, 71530, 75190, 91998, 90071, 66579…
$ total_earnings_female <dbl> 95921, 60759, 65325, 55860, 65040, 66052, 55079,…
$ wage_percent_of_male <dbl> 76.04208, 74.97316, 91.32532, 74.29179, 70.69719…
| Name | jobs_gender |
| Number of rows | 2088 |
| Number of columns | 12 |
| _______________________ | |
| Column type frequency: | |
| character | 3 |
| numeric | 9 |
| ________________________ | |
| Group variables | None |
Variable type: character
| skim_variable | n_missing | complete_rate | min | max | empty | n_unique | whitespace |
|---|---|---|---|---|---|---|---|
| occupation | 0 | 1 | 5 | 156 | 0 | 522 | 0 |
| major_category | 0 | 1 | 7 | 52 | 0 | 8 | 0 |
| minor_category | 0 | 1 | 5 | 46 | 0 | 23 | 0 |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| year | 0 | 1.00 | 2014.50 | 1.12 | 2013.00 | 2013.75 | 2014.50 | 2015.25 | 2016.0 | ▇▇▁▇▇ |
| total_workers | 0 | 1.00 | 196054.87 | 375361.03 | 658.00 | 18687.00 | 58997.00 | 187415.25 | 3758629.0 | ▇▁▁▁▁ |
| workers_male | 0 | 1.00 | 111515.36 | 233154.43 | 0.00 | 10764.75 | 32301.50 | 102643.75 | 2570385.0 | ▇▁▁▁▁ |
| workers_female | 0 | 1.00 | 84539.51 | 212696.02 | 0.00 | 2364.50 | 15238.50 | 63326.50 | 2290818.0 | ▇▁▁▁▁ |
| percent_female | 0 | 1.00 | 36.00 | 27.49 | 0.00 | 10.73 | 32.40 | 57.31 | 100.0 | ▇▃▅▃▂ |
| total_earnings | 0 | 1.00 | 49762.09 | 22926.69 | 17266.00 | 32410.00 | 44437.00 | 61012.00 | 201542.0 | ▇▃▁▁▁ |
| total_earnings_male | 4 | 1.00 | 53138.06 | 24765.76 | 12147.00 | 35701.50 | 46825.00 | 65015.00 | 231420.0 | ▇▃▁▁▁ |
| total_earnings_female | 65 | 0.97 | 44681.04 | 21280.84 | 7447.00 | 28872.00 | 40191.00 | 54813.00 | 166388.0 | ▇▇▂▁▁ |
| wage_percent_of_male | 846 | 0.59 | 84.03 | 9.38 | 50.87 | 77.56 | 85.16 | 90.62 | 117.4 | ▁▃▇▃▁ |
4 Download the Modified data
5 Data Dictionary
NoteQuantitative Variables
Write in.
NoteQualitative Variables
Write in.
NoteObservations
Write in.
6 Plot the Data
Show the Code
jobs_gender |>
filter(year == 2016) |>
filter(major_category == "Healthcare Practitioners and Technical") %>%
ggplot(aes(workers_female / total_workers,
total_earnings,
size = total_workers,
label = occupation
)) +
geom_point() +
scale_size_continuous(range = c(1, 10)) +
labs(
title = "Salaries and Gender Proportion in the Workforce",
size = "Total # of workers",
x = "% of workforce reported as female",
y = "Total Salary in the occupation (Healthcare"
) +
scale_x_continuous(labels = percent_format()) +
scale_y_continuous(labels = dollar_format()) +
expand_limits(y = 0)7 Task and Discussion
Complete the Data Dictionary. Create the graph shown and discuss the following questions:
- What kind of chart is used in the figure?
- What geometries have been used and to which variables have these geometries been mapped?
- Based on this graph, do you think gender plays a role in salaries? What is the trend you see?
- If SALARY, NO_OF_WORKERS, GENDER, OCCUPATION were available in the original dataset, what pre-processing would have been necessary to obtain this plot?





