Skip to content

kminde/MHvsHappiness

Repository files navigation

MHvsHappiness

Exploratory Data Analysis & Regression Modeling:

Happiness vs. Mental Health Disorders

Objective

The aim of this project is to analyze rates of happiness, as assigned by World Happiness Report, vs rates of mental health disorders provided by Our World in Data: Mental Health. We provide a linear regression model of the data, correlating metrics, and graphs for data visualization. The linear regression model strives to determine whether rates of mental health disorders are predictive of happiness. In addition, we have provided functionality to review averages as well as customize sort order.

Conclusion

  • Rates of mental health disorders are not predictive of happiness scores
  • Rates of mental health disorders and happiness scores do not significantly vary across years between the period of 2005-2019
  • Rates of mental health disorders and happiness scores significantly vary between countries

Prerequisites

Before you begin, please be sure to download the virtual environment provided. Necessary packages can be found within the requirements.txt file, and are listed below:

  • python 3.9
  • pandas 1.4.1
  • numpy 1.22.2
  • skikit-learn 1.0.2
  • matplotlib 3.5.1

Utilizing Happiness vs Mental Health Disorders

While utilizing Happiness vs Disorders, you have the ability to select the visualization, averages, and sort order of the data. In addition, metrics related to the evaluation of the model, such as coefficient of determination, mean squared error, mean absolute error, and root mean squared error, will output to the console upon running the script.

-p will select the type of visualization, options include the initial data set (-p Data), the linear regression of happiness vs disorders (-p Regression), happiness by country (-p HappinessByCountry), disorders by country (-p DisordersByCountry), happiness by year (-p HappinessByYear), and disorders by year (-p DisordersByYear)

-m will provide a CSV of average data based on your selection, options include happiness by year (-m HappinessByYear), disorder by year (-m DisorderByYear), happiness by country (-m HappinessByCountry), and disorder by country (-m DisorderByCountry)

-s will provide a CSV of the data sorted by happiness score or disorder prevalence, options include happiness score (-s Happiness) and disorder prevalence (-s MHDisorders)

For example:

python3 main.py -p Regression -m HappinessByYear -s Happiness

Contributors

Katrina Wheeler- katrina.wheeler@du.edu

Nicole Pierick- nicole.pierick@du.edu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages