This analysis will explore factors that may contribute to the work-life balance ratings of the top rated large companies in work-life balance, according to employee reviews. This can help prospective employees of any of these companies learn more about what working at this company is like, and if they could be a good fit for the team.
This analysis was performed through scraping data from Comparably.com’s list of the top 100 companies for work-life balance in 2024. The data will be complied into a data frame which can used to create visualizations comparing different factors for different companies. Some factors that will be explored as potential drivers of work-life balance ratings are culture ratings, comapny rankings out of the top 100, employee ratings of their work experience, employee likelihood to recommend their company to others, and employee confidence and identification with company goal adherence.
Note: only 10 rows of the data (only the top 10 companies) were scraped for this assignment due to issues in getting all 100 to load, as it was a large inquiry to many different web pages each time
Analysis & exploration of results
Load the data set and required packages.
library(skimr) # For reading data setslibrary(tidyverse) # For tidy needs
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(httr) # Useful for web authenticationlibrary(rvest) # Useful tools for working with HTML and XML
Attaching package: 'rvest'
The following object is masked from 'package:readr':
guess_encoding
library(polite) # Promoting responsible web scrapinglibrary(magrittr) # Piping output easily with loops
Attaching package: 'magrittr'
The following object is masked from 'package:purrr':
set_names
The following object is masked from 'package:tidyr':
extract
library(chromote) # Work in a Chrome sessioncomparably1<-read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/fitzgeralde4_xavier_edu/EWVhbzFDvVxBr2dveyIuAmMBUKb9IBdCZ3Edtmi_fhyq4w?download=1")
Employee confidence in goals
This visualization shows the percentage of employee confidence in company goals for the 10 top companies in work-life balance. These top 10 companies all have over 75% of their employee that indicate confidence in the company goals. This is a relevant factor to work-life balance because if an employee is secure and in alignment with their company’s goals, they are more likely to feel satisfied and fulfilled by their work, and be less stressed in their life outside of employment hours since they are secure in their work.
comparably1%>%ggplot(aes(x=company_name1, y=goal_confidence))+geom_col()+labs(title="Employee confidence in company goals",y="Percent confident",x="Company name")
Workplace culture ratings
This visualization shows employee ratings of workplace culture on a 5-star scale for the top 10 companies in work-life balance. A strong, happy workplace culture is essential to maintaining a good work-life balance because it lessens the chance that an employee will be “bringing their work home” through stress or anxious anticipation of needing to return to a stressful environment. Additionally, strong workplace cultures typically treat employees with respect, a sentiment that likely also extends to respect of the employee’s time outside of work, not being overly demanding.
comparably1%>%ggplot(aes(x=company_name1, y=culture_rating))+geom_col()+labs(title="Employee culture rating out of 5 stars",y="Culture rating",x="Company name")
Positive employee reviews and employee recommendations
This visualization compares the percentages of employees that positively reviewed their company and the percentages of employees that would recommend working at their company to a friend, for the top 10 companies of work-life balance. This data shows that while no less than 90% of employee reviews for these companies are positive, there is more variation in employees who would recommend their company to a friend, ranging from less than 65% to over 80%. This may suggest that even though a company has a strong work-life balance rating, it could have other components of its business operations or strategies that employees seek out specifically to be a part of that are not for everyone; perhaps the nature of work that each company does, or a specific emphasis in a certain field that employees don’t think the average person would necessarily love, even if they do.
comparably1%>%ggplot(aes(x=positive_reviews, y=recommended_percent))+geom_point()+labs(title="Percentages of employee positive reviews and reccomended to a friend",y="Percent of employees that reccomend the company to a friend",x="Positive reviews percentage")
Positive reviews and culture ratings
This visualization considers the average percentage of positive reviews for the culture ratings (out of 5 stars) for the top 10 companies of work-life balance. This analysis reveals that, surprisingly, 4.8/5 star companies have higher average positive reviews than 4.9/5 star companies (even if only by a small amount). This suggest that employee ratings of culture and overall positive ratings of the company may not always be the same; when considering work-life balance, this also shows that many different factors may play in to how an employee chooses to rank their experience.
comparably1%>%ggplot(aes(x=as.character(culture_rating), y=positive_reviews))+geom_bar(stat="summary", fun=mean)+labs(title="Employee culture ratings out of 5 stars and percent of positive employee reviews",y="Positive reviews percentage",x="Culture rating out of 5 stars")
Company rankings and employee recommendations
This visualization compares the top 10 company’s rankings and percentage of employees that would recommend working at the company to a friend. This analysis that the recommendation percentage has somewhat of a positive correlation to ranking (lower ranking, lower recommendation), but there are some outliers, such as Vector Marketing, with the highest recommendation percentage yet the only ranked 7th in work-life balance. This suggests, again, that the likelihood of an employee to recommend working at their company has to do with many other factors than solely work-life balance.
comparably1 %>%ggplot(aes(x=reorder(company_name1, company_rank1),y=as.numeric(company_rank1), fill=recommended_percent))+geom_col()+scale_y_continuous(breaks =1:10)+labs(title="Company work-life balance rankings and reccomendations by employees",y="Company rank",x="Company name")