Skip to content
Snippets Groups Projects
Notebook.ipynb 17.4 KiB
Newer Older
   "cells": [
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "# Anxiety in Computer-Gamers: differences, similiratires and learnings\n",
            "\n",
            "# Overview \n",
            "\n",
            "In this project we decided to analyze anxiety in Gamers. We picked the dataset from kaggle because it intersected our personal interests. The data and survey can be found [here](https://www.kaggle.com/datasets/divyansh22/online-gaming-anxiety-data)\n",
            "\n",
            "The data was acquired by a survey published and shared online. This way everyone could participate. For us that also means taking into account that the distribution and answers can be scewed. \n",
            "\n",
            "## Motivation - "
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "import matplotlib.pyplot as plt\n",
            "from src.Dataset import Dataset\n",
            "from src.Plotter import Plotter\n",
            "\n",
            "dataset = Dataset(\"data\\GamingStudy_data.csv\")\n",
            "dataframe = dataset.get_dataframe()\n",
            "print(dataset)\n",
            "plotter = Plotter(dataset)"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "# Data Exploration\n",
            "\n",
            "Because the data was accumulated in a semi-professional way for a pre-study we had to clean it up and make some changes. \n",
            "\n",
            "Some columns could be answered with an open text field. Naturally the answeres in those columns are very diversified and hard to analyze. \n",
            "\n",
            "#### Affected Columns\n",
            "+ Whyplay\n",
            "+ Earnings \n",
            "+ League\n",
            "\n",
            "In the following we will explain if and how we used these columns. \n",
            "\n",
            "Stuff like deleted columns, general overview of the distribution (men women, games, platform) and problems with it \n",
            "\n"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Distribution of Participants \n",
            "### Gender"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "plotter.distribution_plot(\"Gender\")\n",
            "pass"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Explanation of technical terms \n",
            "\n",
            "### SPIN \n",
            "SPIN stands for Social Phobia Inventory \n",
            "The SPIN is a standardized set of 17 question. After answering the questionnaire a “SPIN” value is calculated which is effective for screening for and measuring the severity of social anxiety disorder\n",
            "1. I am afraid of people in authority.\n",
            "2. I am bothered by blushing in front of people.\n",
            "3. Parties and social events scare me.\n",
            "4. I avoid talking to people I don’t know.\n",
            "5. Being criticized scares me a lot.\n",
            "6. I avoid doing things or speaking to people for fear of embarrassment.\n",
            "7. Sweating in front of people causes me distress.\n",
            "8. I avoid going to parties.\n",
            "9. I avoid activities in which I am the center of attention.\n",
            "10. Talking to strangers scares me.\n",
            "11. I avoid having to give speeches.\n",
            "12. I would do anything to avoid being criticized.\n",
            "13. Heart palpitations bother me when I am around people.\n",
            "14. I am afraid of doing things when people might be watching.\n",
            "15. Being embarrassed or looking stupid are among my worst fears.\n",
            "16. I avoid speaking to anyone in authority.\n",
            "17. Trembling or shaking in front of others is distressing to me. \n",
            "### GAD \n",
            "is a mental and behavioral, disorder, specifally an anxiety disorder characterized by excessive, uncontrollable and often irrational worry about events or activities. There are specific questionaires you can use to evaluate the disorder. In the questionnaire the minimum is 0 and maximum is 21 \n",
            "#### Worries of concern\n",
            "- Health\n",
            "- Finances\n",
            "- Death\n",
            "- Family\n",
            "- Relationships\n",
            "- Work\n",
            "#### Symptoms \n",
            "- Excessive worry\n",
            "- Restlessness,\n",
            "- Low Concentration\n",
            "- Trouble sleeping\n",
            "- Exhaustion / Fatigablity\n",
            "- Irritability\n",
            "- Sweating\n",
            "- Trembling (Muscle contraction)\n",
            "In the questionnaire the question target these symptoms and worries and summarize them into a score between 0 and 21. \n",
            "### SWL\n",
            "#### Explanation\n",
            "The survey has 5 questions. You fill it in yourself (not a psychiatrist).\n",
            "For each question, you choose any integer between 1 (highly disagree) to 7 (highly agree).\n",
            "In general, lower numbers mean you are less satisfied with life in a certain way.\n",
            "This means you can score between 5 (least satisfied) to 35 (most satisfied).\n",
            "#### Interpretation\n",
            "The (total) SWL score can be interpreted as:\n",
            "\n",
            "- 31 - 35 Extremely satisfied\n",
            "- 26 - 30 Satisfied\n",
            "- 21 - 25 Slightly satisfied\n",
            "- 20 Neutral\n",
            "- 15 - 19 Slightly dissatisfied\n",
            "- 10 - 14 Dissatisfied\n",
            "- 5 - 9 Extremely dissatisfied\n",
            "\n",
            "A more detailed interpretation can be found [here](http://labs.psychology.illinois.edu/~ediener/Documents/Understanding%20SWLS%20Scores.pdf).\n",
            "\n",
            "Residents of developed nations (e.g. DE) usually score 20-24.\n",
            "#### Questions \n",
            "____ In most ways my life is close to my ideal.<br>\n",
            "____ The conditions of my life are excellent.<br>\n",
            "____ I am satisfied with my life.<br>\n",
            "____ So far I have gotten the important things I want in life.<br>\n",
            "____ If I could live my life over, I would change almost nothing.<br>\n",
            "\n",
            "---"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "# Analysis\n",
            "\n",
            "## Preprocessing \n",
            "* Explained new columns and why we did that *\n",
            "\n",
            "Some columns gave the options to write individual responses. Naturally those are not useful in data analysis. In some cases we cleaned the columns and changes the unusual cases to \"Other\"/\"NA\"\n",
            "### Cleaned Columns\n",
            "+ \"Whyplay\" \n",
            "+ Accept \n",
            "## Normalizing the Data \n",
            "\n",
            "### Creating [\"Is_narcissist\"]\n",
            "### Creating [\"Anxiety_score\"]"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "# Executing and showing new columns \n",
            "dataset.get_combined_anxiety_score(dataset.get_dataframe())"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "### Creating [\"Is_competetive\"]"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Q1 -  Which gamers are more anxiety prone ? \n",
            "\n",
            "Text .......\n",
            "\n",
            "We compare\n",
            "\n",
            "### Women vs Men \n",
            "\n",
            "Explanation \n",
            "![Example Plot](https://cdn.discordapp.com/attachments/806128836332879924/1127988009627832320/Unbenannt.png)"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\n",
            "\"\"\"# SIDE BY SIDE PLOTS \n",
            "# LEFT = LINE Graph distribution of Anxiety Score Related to Group\n",
            "# RIGHT = Stacked Bars comparing the GROUP with = \n",
            "# 1.[Work] - 4 Bars\n",
            "# 2.[Degree] - 5 Bars\n",
            "# 3.[Whyplay ] - 4 Bars (Everything until \"All of them\")\n",
            "\"\"\"\n",
            "#"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "### Competetive vs Easy Going Players \n",
            "Explanation "
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\"\"\"# SIDE BY SIDE PLOTS \n",
            "# LEFT = LINE Graph distribution of Anxiety Score Related to Group\n",
            "# RIGHT = Stacked Bars comparing the GROUP with = \n",
            "# 1.[Work] - 4 Bars\n",
            "# 2.[Degree] - 5 Bars\n",
            "# 3.[Whyplay ] - 4 Bars (Everything until \"All of them\")\"\"\""
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "### Narcissist vs Non-Narcissist"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\"\"\"\"# SIDE BY SIDE PLOTS \n",
            "# LEFT = LINE Graph distribution of Anxiety Score Related to Group\n",
            "# RIGHT = Stacked Bars comparing the GROUP with = \n",
            "# 1.[Work] - 4 Bars\n",
            "# 2.[Degree] - 5 Bars\n",
            "# 3.[Whyplay ] - 4 Bars (Everything until \"All of them\")\"\"\""
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Q2 - Correlations between played hours and one's well being.\n",
            "**Maybe we can even add if hours watching Streams effect it**\n",
            "\n",
            "For research question two we wanted to know if there is a correlation \n",
            "between played hours and the player's well being. We went into the question\n",
            "with the expectation that players which play longer hours are more anxiety prone\n",
            "and less satisfied with life than those who play less. If that would be the \n",
            "case, a positive correlation of hours played and our combined anxiety score \n",
            "variable would be expected. We want to take a look at the data using a scatter-\n",
            "plot, showing the correlation of both variables of interest, using the\n",
            "plot_scatterplot() function of our Plotter class:\n",
            "code below: plotter.plot_scatterplot(\"Hours\", \"Anxiety_score\")"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "plotter.plot_scatterplot(\"Hours\", \"Anxiety_score\") \n",
            "\n",
            "#Still needs to be prettier"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Q3 - Effect of the reason for playing on the satisfaction with life "
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "In this question, we visualise and discuss how a player's reason for playing and their satisfaction with life score (SWL) effect each other.\n",
            "\n",
            "Although a description of the columns are not given, we briefly describe them as follows:\n",
            "* \"improving\": players are competitive and derive satisfaction from outperforming themselves and others. \n",
            "* \"winning\": players are more competitive than those who wish to improve, and derive immense satisfaction from outperforming. Players who play to win experience games more intensely than those in other categories.\n",
            "* \"having fun\": players are not competitive. They are not particularly invested in improving or the outcome of the game, but instead play as a form of recreation. This does not imply the intensity or difficulty of a game is easy; a challenging game can still be fun as long as players derive satisfaction not from the outcome, but from the gameplay or environs (friends, etc).\n",
            "* \"relaxing\": players are playing to relax, and may play games to reduce their anxiety.\n",
            "* \"all of the above\": players in this category are generally competitive but also see the importance of enjoying the game itself."
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\"\"\" Horizontal bar chart, one row for every reason for with top width\n",
            "# Anxiety colored in for the amount of anxiety in that group \n",
            "\"\"\"\n",
            "print(\"Category distribution:\")\n",
            "print(dataframe.groupby(\"whyplay\").size().sort_values(ascending=False))\n",
            "\n",
            "fig, ax = plt.subplots(figsize=(8,6))\n",
            "order = [\"relaxing\", \"having fun\", \"other\", \"improving\", \"winning\"]\n",
            "fig.suptitle(\"\")\n",
            "dataframe[dataframe[\"whyplay\"] != \"other\"].boxplot(column=[\"SWL_T\"], by=\"whyplay\", ax=ax)\n",
            "pass"
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "As seen in this plot, we can discover the following:\n",
            "* On average, those who play to have fun are more satisfied with life than any other group.\n",
            "    * We find this outcome reasonable. Those that are more satisfied with life generally do not rely so much on gaming as a means of fulfillment.\n",
            "* As expected, those who play to win are the least satisfied with their lives, as they disproportionately value being the best over enjoying the game.\n",
            "* Interestingly, those who play to relax are also less satisfied with their lives on average. This may be because this category of players are not satisfied with life and use gaming as a means to destress.\n",
            "* Those who selected \"all of the above\" have a much smaller range of SWL metrics. This is due to the small sample size."
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "### Effects of income level (`work`) and education level (`Degree`) on the reason to play"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\n",
            "\"\"\"#Overlaying Histogram \n",
            "\n",
            "# Histogram for the income level Y = %, X = low to high \n",
            "# One in Green for the income \n",
            "# One in Red for the Anxiety for those people \"\"\""
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "## Q4 - Gamers from different countries "
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "1. Do they play different games ? \n",
            "    1. Are they reacting differently to those games \n",
            "2. Is the amount of educated players similar "
         ]
      },
      {
         "cell_type": "markdown",
         "metadata": {},
         "source": [
            "![Scatter](https://cdn.discordapp.com/attachments/1127973734884581386/1127973829344493679/image.png)"
         ]
      },
      {
         "cell_type": "code",
         "execution_count": null,
         "metadata": {},
         "source": [
            "\"\"\"#### Analyze the countries amounting to Top 7 or 90% of the survey. \n",
            "\n",
            "\n",
            "#Q4.MAP PLOT = Most played game per country (Dont do it if its League everywhere. )\n",
            "#Q4 MAP PLOT = Heat Map with redder areas for more Anxiety in the country. \n",
            "#Q1.2 Grouped Bar Chart with the top game next to the \"Anxiety Score\"\n",
            "\n",
            "#2 Scatter PLot like in the example \"\"\""
         ]
      }
   "metadata": {
      "kernelspec": {
         "display_name": "base",
         "language": "python",
         "name": "python3"
      },
      "language_info": {
         "codemirror_mode": {
            "name": "ipython",
            "version": 3
         },
         "file_extension": ".py",
         "mimetype": "text/x-python",
         "name": "python",
         "nbconvert_exporter": "python",
         "pygments_lexer": "ipython3",
         "version": "3.10.9"
      },
      "orig_nbformat": 4
   "nbformat": 4,
   "nbformat_minor": 2