Analyzing Employee Sentiment and Minimum Wage

An analysis to see if companies that provide a “liveable” wage have happier employees.

Recently, the topic of raising the minimum wage in the U.S. to a more liveable $15 dollars an hour has been a hot-button issue, as evidenced by the tweet above. While some tote the benefits of raising the minimum wage, others cite potential risks.

Modern stores that are emblematic of this issue include two large big-box retailers: Walmart and Costco. Walmart is well-known for maintaining a low minimum starting wage, which is currently $11. In opposition, Costco is known for paying its entry level employees well, with a current minimum starting wage of $16.

Data Sources

The primary source of data I used was from Indeed, a worldwide employment website for job listings. I limited my analysis to the 1000 most recent reviews in the U.S. from both Walmart and Costco. I scraped Indeed for review title, review text, star rating, city of review, and review date.

Example of a review scraped

I also utilized Kaggle’s data set titled US Minimum Wage by State from 1968 to 2020 to generate results about minimum wage over time.

I used data from Google Trends to gain insight on the current state of both companies, and hand-scraped a list of state names and their abbreviations from the Social Security webpage.

To analyze the data, I used R Studio. For select tables, I exported to Google Sheets in order to format.

State of Minimum Wage in the U.S.

First, I performed analysis on the minimum wage over time in the U.S. to examine its current state.

Looking at the minimum wage by year, it looks as if there is a clear increasing trend (shown with the blue trend line), with a stair step for certain stretches of years before the wage is raised by legislation.

However, when looking at the federal minimum wage adjusted for inflation in 2020 dollars, there is a shocking difference. From the blue trend line, we can see that the relative federal minimum wage has actually declined in real numbers. This could explain some of the resistance from those born in older years to raising the minimum wage, since although the wage looks higher before 1990, it has actually decreased. To ensure my data was in real terms, the remainder of my analysis is in 2020 dollars.

Next, I computed the five U.S. states or territories with the highest 2020 minimum wage, which were the District of Columbia, Washington, California, Massachusetts, and Arizona, and graphed their minimum wages since 1968 using the usmaps package. CA, DC, MA, and WA seem to follow similar trajectories throughout the years. AZ followed a different pattern, with a sharp spike from the late 2000s.

Next, I analyzed all 50 states throughout the years in a novel visualization, a heatmap. From the maps above, we can see that a cluster of states in the deep south, notably Louisiana, Alabama, Mississippi, South Carolina, and Tennessee, have had the lowest relative minimum wage in the U.S. from 2000 to 2020.

On the other hand, we see a similar geographic trend to the line plot: the states with the highest relative minimum wage is Washington, Massachusetts, and Arizona. The previous trend from Arizona is also present in the maps: in 2000, Arizona has a low relative minimum wage, but by 2020, it has a high relative minimum wage. This trend also occurs with Florida.

Later, I will examine if these minimum wage trends are correlated with sentiment from employees.

Walmart Sentiment Analysis

First, I analyzed Walmart as my example of a company that pays their employees minimum wage to gauge employee sentiment. I performed sentiment analysis on the review text.

To gauge if there were any outliers in Walmart employee sentiment that may need to be excluded from my data, I first performed a emotional valence analysis on the 1000 most recent reviews.

In general, it seems as if Walmart has both high and low sentiment scores in review over time. Thus, there are no real outlier periods and no need to exclude any time periods from my analysis.

An interesting point to note is that there seem to be higher highs in sentiment scores rather than lower lows, which indicates that Walmart employees in general may have more positive rather than negative sentiment about their workplace.

Then, I looked at average sentiment by state and city and found the top 10 states and cities in terms of Walmart sentiment.

For states, New Mexico, South Carolina, Hawaii, New Jersey, and Idaho top the list for most positive sentiment. Interestingly enough, none of these states match with the states that have the highest minimum wage.

In terms of cities, the ones with the highest average sentiment were Albuquerque (NM), Eddystone (PA), and Topeka (KS).

Walmart LDA Models

Next, I created a control LDA to understand which aspects of the job Walmart employees were discussed the most. I assigned names to each of the five topics based on their general meaning.

Topic breakdown:

  • Duties: How the employee feels about tasks they must do
  • Management: How the employee feels about their managers and supervisors
  • Experience: How the general experience of working at Walmart is, how their quality of job is
  • Colleagues: How they perceive their fellow employees
  • Traits: The perks or demerits the job exemplifies

To explore using LDA analysis further, I divided my scraped review text data into three groups: ratings above 3 (positive group), ratings below 3 (negative group), and ratings that equaled 3 (neutral group), with star ratings out of 5. Then, I employed topic modeling on each group to see which aspects of Walmart employees loved (positive), disliked (negative), or had no strong sentiment about (neutral).

Positive LDA

Takeaways:

  • As compared to the overall and neutral LDA models, the positive model utilizes words like “good”, “nice”, and “breaks” to describe duties, “great” and “loved” to describe their daily experiences, “fun” to describe colleagues, and “flexible” and “steady” to describe the traits of their job.
  • However, words such as “bad” to describe duties, “issue” and “problem” to describe traits still manifested in the positive LDA, indicating that there are pervasive issues even for those who rated Walmart 4 or 5 stars.
Negative LDA

Takeaways:

  • As expected, more negative words crop up for the segment of reviews that are sub 3 stars. Words like “don’t” and “bad” are associated with duties, “rude” with management, “hard” with experiences, “worst” with colleagues, and “terrible” with traits.
  • It seems as if employees who rated Walmart very low feel low motivation to complete duties, feel their colleagues are bad, and have a hard overall experience.
  • However, words such as “good” and even “great” also are in the management topic, indicating that there may be some redeeming qualities that employees see in Walmart, even if they rate it low.
  • “Pay” or “wage” is not mentioned, but “money” is under the Duties column. This could indicate that wage is something employees care about when discussing their duties.
Neutral LDA

Takeaways:

  • The neutral LDA model skewed fairly similarly to the overall model, which makes sense. Employees that gave Walmart a rating of 3 have a similar feeling about the company as the overall model.
  • “Pay” is mentioned only in the neutral LDA model, which could indicate that pay is a neutral factor and is mentioned in 3 star reviews.

Walmart Linear Regression Analysis

Positive Linear Regression

Finally, I wanted to analyze the positive vs negative review groups in a different way. I used logistic regression on each group using the top 10 to find which words were most correlated for positive vs negative reviews.

The only statistically significant word with p = .00237 < .05 is “busy”, for the positive reviews. “Busy” also has a positive coefficient of 1.00, which indicates that employees who give highly positive reviews enjoy the busy aspect of working at Walmart.

Negative Linear Regression

On the other hand, all words were statistically significant for the negative linear regression, with p < .05. All words had positive coefficients, indicating that they all are correlated with negative reviews.

Of these words, “treat”, “favoritism”, “absolutely”, and “worth” had the highest coefficients. This could indicate that a large part of why employees rate Walmart lower is their treatment, with favoritism for certain employees over others. Other significant words like “managers”, “management”, and “employee” also lend credibility to this rationale.

As expected from previous LDA analysis, neither “pay” nor “wage” is mentioned as a word that is explicitly positively correlated or negatively correlated.

Costco Sentiment Analysis

I performed a very similar analysis on Costco, as Walmart’s big-box retail competitor. However, Costco pays its employees a wage higher than minimum wage in most states.

Similar to Walmart, I gauged if there were any outliers in Costco employee sentiment that may need to be excluded from my data, by performing a emotional valence analysis on the 1000 most recent reviews.

Again, it seems as if Costco has both high and low sentiment scores in review over time. Thus, there are no real outlier periods and no need to exclude any time periods from my analysis.

An interesting point to note is that there are significantly higher highs in sentiment scores rather than lower lows, which indicates that Costco employees in general may have more positive rather than negative sentiment about their workplace. These sentiment scores skew much higher than Walmart’s.

I then examined Costco’s average sentiment by top 10 states and cities. In terms of top states/territories for sentiment, Washington D.C., Kansas, Oregon, Delaware, and Virginia are at the top. Interestingly, none of these top sentiment states match Walmart’s top sentiment states. Also, each state is in a different part of the country, from the Northeast to the Pacific Northwest.

Looking at top cities for Costco sentiment, Washington and Overland Park (KS) are the top cities by far. Unlike Walmart sentiment, the top cities seem to map closely to the top states, which could indicate that these top states are being heavily influenced by employees from certain top cities.

Costco LDA Model

Overall LDA

I analyzed Costco similarly to Walmart. I created a control LDA to understand which aspects of the job Costco employees were discussed the most. I altered one category to fit the topics better.

Topic breakdown:

  • Day-to-Day: How the employee feels about their day-to-day life
  • Management: How the employee feels about their managers and supervisors
  • Experience: How the general experience of working at Walmart is, how their quality of job is
  • Colleagues: How they perceive their fellow employees
  • Traits: The perks or demerits the job exemplifies

Again, I divided my scraped review text data into three groups: ratings above 3 (positive group), ratings below 3 (negative group), and ratings that equaled 3 (neutral group), with star ratings out of 5. Then, I employed topic modeling on each group to see which aspects of Costco employees loved (positive) or disliked (negative).

I omitted the neutral review model since I did not get much insight from them with my Walmart analysis.

Positive LDA

Takeaways:

  • It seems that employees feel that Costco keeps them busy, but is still “flexible” in terms of experience. For colleagues, this is where Costco shines, with employees feeling “good” and “great” about them.
Negative LDA

Takeaways:

  • From this negative LDA, I did not find a lot of relevant information. It seems as if a lot of generic/non-sentiment related words cropped up, such as “job”, “management”, “people”, “work”, and “store”. Thus, it is difficult for me to draw conclusions about how employees who rated Costco lower actually feel about each topic.

Walmart vs Costco

To gain an overview of the different companies, I pulled data from Google trends to see if either company had a significant amount of interest or controversy that may change employee perception.

However, I found that on average, Costco had less public interest than Walmart, which makes sense due to the lower spread and number of Costcos in the U.S. Also, the trends for both companies seem to be relatively stable, with dependable peaks during each holiday season. These most likely manifest as people are searching for gifts for loved ones.

Finally, I examined the difference in sentiment between Walmart and Costco to see if it was significant. From this two-sample t-test, I found that Costco workers are significantly happier than Walmart workers, with a higher mean of 2.32 vs Walmart’s 1.31.

Wage vs Sentiment

In the end, this project aims to analyze if a higher wage actually does improve sentiment. To investigate this, I ran a correlation between 2020 wage and mean Walmart sentiment in each state. The correlation factor I computed was:

.0130

Although the correlation is positive, it is low, which indicates that mean sentiment for Walmart is nearly the same, even when wage increases. To illustrate this, I created a scatterplot with wage vs sentiment:

This plot illustrates a similar trend — the flat line seems to indicate that there is no significant relationship between wage and Walmart/a minimum wage paying place’s sentiment.

Conclusion

Although my analysis originally set out to find if wage at these companies mattered in terms of sentiment, I surprisingly found little to no evidence that wage is highly important while parsing through company reviews. Thus, the result that Costco employees are happier than Walmart employees is most likely due to other factors, such as management, colleagues, and general environment.

As advice for these companies, it is clear that employees are integral parts of any company. Paying close attention to the factors that employees care about, from wage to anything else, is essential.

About Me

I am a sophomore at the University of Pennsylvania studying Business Analytics, Finance, and Math. This data project was conducted for the course OIDD245: Analytics & The Digital Economy.

Student @ Wharton

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store