Data Analysis on Mental Health in the Workplace
The skills I demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
A dashboard was made using RShiny to visualize mental health survey data. The dashboard can be viewed here, and the code for this project is hosted on Github.
Introduction
According the US Center for Disease Control (CDC), mental health issues cause some of the greatest burdens on the country as a whole1. In particular, working adults with mental health issues can face negative consequences like poor job performance and low engagement with their work. Therefore, it's important to spread awareness about mental health in order to improve communication and encourage employers to create stronger support networks at the workplace.
The Data
A voluntary survey was administered by Open Sourcing Mental Illness Ltd., a non-profit with the mission of raising awareness around mental wellness in the technology sector. As part of their mission, OSMI has released the data under a free creative commons license. The survey was conducted online and has been running annually since 2014. (The 2014 survey is popular on the data science community kaggle.) The questions change from year to year - ranging from 27 the first year to 83 in the most recent year - and fall into general categories, such as:
- what type of company do you work at?
- do you have a mental illness?
- are you comfortable discussing your mental illness with your coworkesr?
- does your employer-sponsored insurance include mental health coverage?
Exploratory Data Analysis
A dashboard is great way to explore a large data and look for trends. Questions like, "How does your mental illness impact your work?" are important to understand in different contexts, like between different countries or companies of different sizes. In a dashboard, it is easy to compare these types of questions to better understand the data.
How do different countries compare?
The first page of the dashboard allows for exploring survey questions by country. An initial review of the data shows that the United States is #1 for the percentage of respondents who say they have a mental illness.

This may be alarming at first, but many organizations - like OSMI - have been working hard to increase mental health awareness. Hypothetically speaking, all ten countries could have the same rates of mental illness, but the United States may be more aware of their illness and more likely to answer, "Yes," on a survey.
Indeed, when we look at how often mental illness impacts work, the United States is near the middle of the ranking.

In fact, the country where workers feel their work is most impacted by mental illness is India. This is surprising, given that India had the lowest percentage of respondents who admitted to having a mental illness. From this limited sample size, it looks like India could see the greatest benefit of future mental health awareness promotion efforts.
How do different company sizes compare?
The biggest difference between companies is also the least surprising - that large companies are far more likely offer mental health benefits as part of their employer-sponsored healthcare plans than smaller companies. This is expected, because larger benefits packages are usually included in compensation at larger companies.

What could be potentially more surprising is how often mental health issues actually affect people at different company sizes. When we dig into it, we see that small companies (<25 people) have a sizeable increase of people who say their mental illness often impacts their work.

There are two conclusions that you could draw from this for promoting mental health awareness: (1) if you have a mental illness and you are on the job hunt, you may want to focus on larger companies, because you are more likely to have healthcare coverage, and (2) promotion of mental health awareness should be more focused on smaller companies, because small companies have the most room for improvement.
Conclusions
The first component of any data project is to make sure you really understand your data, and one of the best ways to understand your data is to visualize it. When you visualize data, trends will pop out that you didn't expect that lead to valuable insights.
In this case, the data has shown us two new directions that OSMI could focus their marketing efforts to promote mental health awareness. The first is to focus more attention on a country like India where survey respondents claim to be more impacted by mental health issues at work. The second is to focus more attention on small businesses or early stage startups (<25 people) where respondents also claim to have more difficulty with mental health at work.
Further Reading
If you would like to learn more about Open Sourcing Mental Illness Ltd., or if you want to participate in the 2020 Mental Health in Tech Survey, you can read more on their website: https://osmihelp.org/research