Project Part 2

Interactive and static plots of Wage Gaps from 1970 to 2016

  1. Packages I will use to read in and plot the data
  1. Read the data in from part 1
country_wageGap  <- read_csv(here::here("country_wageGap.csv"))

Interactive graph

country_wageGap   %>%
  group_by(country)  %>%
  e_charts(x = Year)   %>% 
  e_river(serie = WageGap, legend=FALSE)  %>% 
  e_tooltip(trigger = "axis")  %>% 
  e_title(text = "Annual Wage Gap, by country",
          subtext = "(in percentages). Source: Our World in Data",
          sublink = "https://ourworldindata.org/economic-inequality-by-gender",
          left = "center")  %>% 
  e_theme("roma")  

Static graph

country_wageGap   %>% 
  ggplot(aes(x = Year, y = WageGap, 
             fill = country)) +
  geom_area() +
  colorspace::scale_fill_discrete_divergingx(palette = "roma", nmax =11) +
  theme_classic() +
  theme(legend.position = "bottom") +
  labs( y = "in billions of tonnes",
       fill = NULL)

These plots show a decrease in wage gaps since 1970. Wage gaps have continued to decrease with occasional spikes.

ggsave(filename = here::here("_posts/2022-05-07-project-part-2/preview.png"))