Gender Pay Gap in USA

Column

USA State wise biggest gender wage gap in 2019


Gender pay gap in top 5 industral sectors in USA in 2019

Column

Median hourly earnings of women by race (2015 -2019)


Women’s weekly earnings as a percentage of men by age group

Gender Pay Gap in World

Column

Countries in Share of women among low pay earners

Column

Gender Inequality Index

Story and References

Story:

Still in 21st century ,there remains a disparity in how men and women are paid, even when all compensable factors are controlled, meaning that women are still being paid less than men due to no attributable reason other than gender.Although Women are working longer hours and pursuing higher education in greater numbers. However, despite this progress, significant wage gaps between men and women persist.

Here is the story of how gender inequality still exist in work :

“The Biggest Stories About Gender Inequality at Work” | https://www.theatlantic.com/business/archive/2015/12/gender-equality-workplace-2015/422328

References:

  1. Ortiz-Ospina, E. and Roser, M., 2021. Economic inequality by gender. [online] Our World in Data. Available at: https://ourworldindata.org/economic-inequality-by-gender [Accessed 4 May 2021].

  2. Our World in Data. 2021. Ratio of female-to-male median earnings by age, US. [online] Available at: https://ourworldindata.org/grapher/womens-weekly-earnings-as-a-percentage-of-mens-by-age-bureau-of-labor-statistics-2017 [Accessed 16 May 2021].

  3. Our World in Data. 2021. Share of women among low pay earners. [online] Available at: https://ourworldindata.org/grapher/female-share-of-low-pay-earners [Accessed 18 May 2021].

  4. Zippia.com. 2021. Zippia’s Annual Gender Pay Gap Report For 2019. [online] Available at: https://www.zippia.com/research/gender-pay-gap/#ranking-table [Accessed 6 June 2021].

  5. Hdr.undp.org. 2021. Gender Inequality Index (GII) | Human Development Reports. [online] Available at: http://hdr.undp.org/en/content/gender-inequality-index-gii [Accessed 2 June 2021].

  6. Data.census.gov. 2021. Explore Census Data. [online] Available at: https://data.census.gov/cedsci/table?q=S2413&tid=ACSST1Y2019.S2413&hidePreview=true [Accessed 30 May 2021].

  7. Rmarkdown.rstudio.com. 2021. R Markdown Format for Flexible Dashboards. [online] Available at: https://rmarkdown.rstudio.com/flexdashboard/ [Accessed 2 May 2021].

    1. [online] Available at: https://www.theatlantic.com/business/archive/2015/12/gender-equality-workplace-2015/422328 [Accessed 22 May 2021].
    1. [online] Available at: https://www.bls.gov/cps/earnings.htm [Accessed 30 May 2021].
---
title: "Gender pay gap across USA and Rest of the world"
author:Aparupa Mitra ,StudentID: s3831724
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(readxl)
library(plotly)
library(tidyr)
library(ggplot2)
library(dplyr)
library(readr)

```

Gender Pay Gap in USA
=====================================

Column {data-width=450}
-----------------------------------------------------------------------

### USA State wise biggest gender wage gap in 2019

```{r}

states <- read_excel("states.xlsx")


states$State <- factor(states$State , levels = unique(states$State  )[order(states$`Pay Gap in 2019 ( in %)` )])

states <-states[order(-states$`Pay Gap in 2019 ( in %)`),]


states <- head(states ,10)

p1 <-plot_ly() %>% add_trace(data= states, type ="bar",
                             x =states$`Pay Gap in 2019 ( in %)`,
                             y = states$State,
                             color = states$State ) %>% layout(title = "USA top 10 states with biggest gender wage gap in 2019",
                                                                                    xaxis = list(title = " Statewise gender wage gap in percentage(%)  ",
                                                                                                 zeroline = FALSE),
                                                                                    yaxis = list(title = "States of USA",
                                                                                                 zeroline = FALSE))

p1

```


-----------------------------------------------------------------------

### Gender pay gap in top 5 industral sectors in USA in 2019

```{r}
                                        

gendermedian <- read_excel("~/gendermedian.xlsx")

genmedian<-gendermedian

genmedian<- head(genmedian ,5)

genmedian1<-genmedian%>%select(Profession, Median_earnings_male ,Median_earnings_female)

gathermed <-gather(genmedian ,"Gender" ,"Median_earnings",2:3)


p2 <-plot_ly() %>% add_trace(data= gathermed, type ="bar",
                             y = gathermed$Profession,
                             x = gathermed$Median_earnings,
                             color = gathermed$Gender ) %>% layout(title = "Gender pay gap in top 5 industrial sector in USA in 2019",
                                                                                    xaxis = list(title = "Median_earnings in dollar($) ",
                                                                                                 zeroline = FALSE),
                                                                                    yaxis = list(title = "Industrial sectors",
                                                                                                 zeroline = FALSE))
p2

```

Column {data-width=450}
--------------------------------------------
### Median hourly earnings of women by race (2015 -2019)

```{r}


women_earning_2019 <- read_excel("women_earning_2019.xlsx")


women<-women_earning_2019
women<- tail(women ,5)

women1<-women%>%select(Year,White ,`Black or African American` ,  Asian ,`Hispanic or Latino ethnicity`   )

gatherwomen <-gather(women1 ,"Race" ,"Median_hourly_earnings",2:5)


p3 <-plot_ly() %>% add_trace(data= gatherwomen, type ="bar",
                             y = gatherwomen$Median_hourly_earnings,
                             x = gatherwomen$Year,
                             color = gatherwomen$Race) %>% layout(title = "Median hourly earnings of women by race in USA in 2019",
                                                                   xaxis = list(title = "Year ",
                                                                                zeroline = FALSE),
                                                                   yaxis = list(title = "Median hourly earnings in dollar($) ",
                                                                                zeroline = FALSE))
p3
                                                           


```



-----------------------------------------------------------------------
### Women's weekly earnings as a percentage of men by age group
```{r}

womens_weekly_earnings_as_a_percentage_of_mens_by_age_bureau_of_labor_statistics_2017 <- read_csv("womens-weekly-earnings-as-a-percentage-of-mens-by-age-bureau-of-labor-statistics-2017.csv")
womens_weekly_earningsby_age <-womens_weekly_earnings_as_a_percentage_of_mens_by_age_bureau_of_labor_statistics_2017

women_by_age <-womens_weekly_earningsby_age %>% group_by(Entity ) %>% 
  summarise(mean = mean(`Women's weekly earnings as a percentage of men's by age (Bureau of Labor Statistics (2017))` ,na.rm = TRUE))

women_by_age <-data.frame(women_by_age)

women_by_age$Entity <- factor(women_by_age$Entity , levels = unique(women_by_age$Entity )[order(women_by_age$mean, decreasing = FALSE)])

women_by_age_sorted <-women_by_age[order(-women_by_age$mean),]


figure<-plot_ly() %>% add_trace( women_by_age_sorted, labels =women_by_age_sorted$Entity , values =women_by_age_sorted$mean , type = 'pie'
                               ) %>% layout(title = "Women's weekly earnings as a percentage of men's by age in USA in 2017",
                                                                    xaxis = list(title = "Women's weekly earnings as a percentage of men by age group",
                                                                                 zeroline = FALSE ,showgrid = TRUE,showticklabels = TRUE),
                                                                    yaxis = list(title = "Age Group",
                                                                                 zeroline = FALSE,showgrid = TRUE,showticklabels = TRUE))


figure


```


Gender Pay Gap in World
========================================

Column  
-----------------------------------------------------------------------


### Countries in Share of women among low pay earners


```{r}


female_share_of_low_pay_earners <- read_csv("female-share-of-low-pay-earners.csv")

female_pay <-female_share_of_low_pay_earners %>% group_by(Entity ) %>% 
  summarise(mean = mean(`Female share of low pay earners (%)` ,na.rm = TRUE))

female_pay <-data.frame(female_pay)

female_pay$Entity <- factor(female_pay$Entity , levels = unique(female_pay$Entity )[order(female_pay$mean )])

female_pay_sorted <-female_pay[order(female_pay$mean),]

top10<- head(female_pay_sorted ,10)

fig3 <-plot_ly() %>% add_trace(data= top10, type ="bar",
                               x =top10$Entity ,
                               y = top10$mean ,
                               color = top10$Entity ,colors = "viridis") %>% layout(title = "Bottom 10 countries in Share of women among low pay earners (2015)",
                                                                  xaxis = list(title = "Country ",
                                                                               zeroline = FALSE),
                                                                  yaxis = list(title = "Percentage of low pay workers",
                                                                               zeroline = FALSE))
fig3

```
Column {.tabset}
-------------------------------------


### Gender Inequality Index

```{r}
index <- read_excel("index.xlsx")

index$`Gender Inequality Index (2019)`<- as.numeric(index$`Gender Inequality Index (2019)`)

index$`Gender Inequality Index (2019)` <- round(index$`Gender Inequality Index (2019)`,digits = 3)

index$Country <- factor(index$Country, levels = unique(index$Country )[order(index$`Gender Inequality Index (2019)` )])

index <-index[order(index$`Gender Inequality Index (2019)`),]

index <-head(index ,10)


pp <-plot_ly() %>% add_trace(data= index, type ="bar",
                             y = index$Country,
                             x =index$`Gender Inequality Index (2019)`,
                             color =index$Country ) %>% layout(title = "Top 10 countries with highest Gender Inequality Index in 2019",
                                                                   xaxis = list(title = "Gender inequality index ",
                                                                                zeroline = FALSE),
                                                                   yaxis = list(title = "Country",
                                                                                zeroline = FALSE))
pp




```



Story and References {data-orientation=columns} 
===========================================



Story:

Still in 21st century ,there remains a disparity in how men and women are paid, even when all compensable factors are controlled, meaning that women are still being paid less than men due to no attributable reason other than gender.Although Women are working longer hours and pursuing higher education in greater numbers. However, despite this progress, significant wage gaps between men and women persist. 

Here is the story of how gender inequality still exist in work :


"The Biggest Stories About Gender Inequality at Work" |  https://www.theatlantic.com/business/archive/2015/12/gender-equality-workplace-2015/422328



References:

1.	Ortiz-Ospina, E. and Roser, M., 2021. Economic inequality by gender. [online] Our World in Data. Available at:  [Accessed 4 May 2021].

2.	Our World in Data. 2021. Ratio of female-to-male median earnings by age, US. [online] Available at:  [Accessed 16 May 2021].

3.	Our World in Data. 2021. Share of women among low pay earners. [online] Available at:  [Accessed 18 May 2021].

4.	Zippia.com. 2021. Zippia's Annual Gender Pay Gap Report For 2019. [online] Available at:  [Accessed 6 June 2021].

5.	Hdr.undp.org. 2021. Gender Inequality Index (GII) | Human Development Reports. [online] Available at:  [Accessed 2 June 2021].

6.	Data.census.gov. 2021. Explore Census Data. [online] Available at:  [Accessed 30 May 2021].

7.	Rmarkdown.rstudio.com. 2021. R Markdown Format for Flexible Dashboards. [online] Available at:  [Accessed 2 May 2021].

8.	2021. [online] Available at:  [Accessed 22 May 2021].


9. 2021. [online] Available at:  [Accessed 30 May 2021].