# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .r
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: R
#     language: R
#     name: ir
# ---

library(ggplot2)
library(tidyverse)

options(repr.plot.height = 3.5, repr.plot.width = 6)
data <- read.csv('../data/top_10_male_jobs.csv')
data %>% ggplot(aes(year, female_prop, color = job)) + 
    geom_line()+
    scale_y_continuous(labels=scales::percent) +
    labs(title = 'Proportion of Women by Year',
        x = 'Year', y = 'Proportion of Women', color = 'Job')

data %>% 
    ggplot(aes(reorder(job, sort(total_prop_female)), total_prop_female, fill = job)) + 
    geom_col(position = 'dodge') +
    scale_y_continuous(labels=scales::percent) +
    coord_flip() +
    labs(title = 'Jobs by Proportion of Women(10 Most Male Dominant)',
        y = "Proportion of Women", fill = 'Job')

StarcoderdataJupyterScriptsDedupFiltered