Skip to content
Snippets Groups Projects
Commit 93c107d4 authored by Sortofamudkip's avatar Sortofamudkip
Browse files

Merge branch 'master' of...

Merge branch 'master' of gitup.uni-potsdam.de:nifranz/rse-23-group-assignment-shervud-pitawanik-franz
parents 078ad9c7 5243e22d
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
# Anxiety in Computer-Gamers: differences, similiratires and learnings
# Overview
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)
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.
## Motivation -
%% Cell type:code id: tags:
``` python
import matplotlib.pyplot as plt
from src.Dataset import Dataset
dataset = Dataset("data\GamingStudy_data.csv")
dataframe = dataset.get_dataframe()
print(dataset)
```
%% Output
<src.Dataset.Dataset object at 0x000001CD53BDA250>
%% Cell type:markdown id: tags:
# Data Exploration
Because the data was accumulated in a semi-professional way for a pre-study we had to clean it up and make some changes.
Some columns could be answered with an open text field. Naturally the answeres in those columns are very diversified and hard to analyze.
#### Affected Columns
+ Whyplay
+ Earnings
+ League
In the following we will explain if and how we used these columns.
Stuff like deleted columns, general overview of the distribution (men women, games, platform) and problems with it
%% Cell type:code id: tags:
``` python
"""
4 Plots/Way to shows the distribution of
Gender,
Platform (where they found the survey)
Games Top 5
and Console
"""
```
%% Output
'\n4 Plots/Way to shows the distribution of \nGender, \nPlatform (where they found the survey)\nGames Top 5 \nand Console\n\n'
%% Cell type:markdown id: tags:
## Explanation of technical terms
### SPIN
SPIN stands for Social Phobia Inventory
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
1. I am afraid of people in authority.
2. I am bothered by blushing in front of people.
3. Parties and social events scare me.
4. I avoid talking to people I don’t know.
5. Being criticized scares me a lot.
6. I avoid doing things or speaking to people for fear of embarrassment.
7. Sweating in front of people causes me distress.
8. I avoid going to parties.
9. I avoid activities in which I am the center of attention.
10. Talking to strangers scares me.
11. I avoid having to give speeches.
12. I would do anything to avoid being criticized.
13. Heart palpitations bother me when I am around people.
14. I am afraid of doing things when people might be watching.
15. Being embarrassed or looking stupid are among my worst fears.
16. I avoid speaking to anyone in authority.
17. Trembling or shaking in front of others is distressing to me.
### GAD
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
#### Worries of concern
- Health
- Finances
- Death
- Family
- Relationships
- Work
#### Symptoms
- Excessive worry
- Restlessness,
- Low Concentration
- Trouble sleeping
- Exhaustion / Fatigablity
- Irritability
- Sweating
- Trembling (Muscle contraction)
In the questionnaire the question target these symptoms and worries and summarize them into a score between 0 and 21.
### SWL
#### Explanation
The survey has 5 questions. You fill it in yourself (not a psychiatrist).
For each question, you choose any integer between 1 (highly disagree) to 7 (highly agree).
In general, lower numbers mean you are less satisfied with life in a certain way.
This means you can score between 5 (least satisfied) to 35 (most satisfied).
#### Interpretation
The (total) SWL score can be interpreted as:
- 31 - 35 Extremely satisfied
- 26 - 30 Satisfied
- 21 - 25 Slightly satisfied
- 20 Neutral
- 15 - 19 Slightly dissatisfied
- 10 - 14 Dissatisfied
- 5 - 9 Extremely dissatisfied
A more detailed interpretation can be found [here](http://labs.psychology.illinois.edu/~ediener/Documents/Understanding%20SWLS%20Scores.pdf).
Residents of developed nations (e.g. DE) usually score 20-24.
#### Questions
____ In most ways my life is close to my ideal.<br>
____ The conditions of my life are excellent.<br>
____ I am satisfied with my life.<br>
____ So far I have gotten the important things I want in life.<br>
____ If I could live my life over, I would change almost nothing.<br>
---
%% Cell type:markdown id: tags:
# Analysis
## Preprocessing
* Explained new columns and why we did that *
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"
### Cleaned Columns
+ "Whyplay"
+ Accept
## Normalizing the Data
### Creating ["Is_narcissist"]
### Creating ["Anxiety_score"]
%% Cell type:code id: tags:
``` python
# Executing and showing new columns
dataset.get_combined_anxiety_score(dataset.get_dataframe())
```
%% Output
0 0.202288
1 0.517320
2 0.497993
3 0.272969
4 0.533567
...
13459 0.212092
13460 0.601914
13461 0.125210
13462 0.591783
13463 0.243231
Length: 12838, dtype: float64
%% Cell type:markdown id: tags:
### Creating ["Is_competetive"]
%% Cell type:markdown id: tags:
## Q1 - Which gamers are more anxiety prone ?
Text .......
We compare
### Women vs Men
Explanation
![Example Plot](https://cdn.discordapp.com/attachments/806128836332879924/1127988009627832320/Unbenannt.png)
%% Cell type:code id: tags:
``` python
"""# SIDE BY SIDE PLOTS
# LEFT = LINE Graph distribution of Anxiety Score Related to Group
# RIGHT = Stacked Bars comparing the GROUP with =
# 1.[Work] - 4 Bars
# 2.[Degree] - 5 Bars
# 3.[Whyplay ] - 4 Bars (Everything until "All of them")
"""
#
```
%% Output
'# 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'
%% Cell type:markdown id: tags:
### Competetive vs Easy Going Players
Explanation
%% Cell type:code id: tags:
``` python
"""# SIDE BY SIDE PLOTS
# LEFT = LINE Graph distribution of Anxiety Score Related to Group
# RIGHT = Stacked Bars comparing the GROUP with =
# 1.[Work] - 4 Bars
# 2.[Degree] - 5 Bars
# 3.[Whyplay ] - 4 Bars (Everything until "All of them")"""
```
%% Output
'# 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 id: tags:
### Narcissist vs Non-Narcissist
%% Cell type:code id: tags:
``` python
""""# SIDE BY SIDE PLOTS
# LEFT = LINE Graph distribution of Anxiety Score Related to Group
# RIGHT = Stacked Bars comparing the GROUP with =
# 1.[Work] - 4 Bars
# 2.[Degree] - 5 Bars
# 3.[Whyplay ] - 4 Bars (Everything until "All of them")"""
```
%% Output
'"# 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 id: tags:
## Q2 - Correlations between played hours and one's well being.
**Maybe we can even add if hours watching Streams effect it**
%% Cell type:code id: tags:
``` python
"""
"""
```
%% Cell type:markdown id: tags:
## Q3 - Effect of the reason for playing on the satisfaction with life
%% Cell type:markdown id: tags:
In this question, we visualise and discuss how a player's reason for playing and their satisfaction with life score (SWL) effect each other.
Although a description of the columns are not given, we briefly describe them as follows:
* "improving": players are competitive and derive satisfaction from outperforming themselves and others.
* "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.
* "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).
* "relaxing": players are playing to relax, and may play games to reduce their anxiety.
* "all of the above": players in this category are generally competitive but also see the importance of enjoying the game itself.
%% Cell type:code id: tags:
``` python
""" Horizontal bar chart, one row for every reason for with top width
# Anxiety colored in for the amount of anxiety in that group
"""
print("Category distribution:")
print(dataframe.groupby("whyplay").size().sort_values(ascending=False))
fig, ax = plt.subplots(figsize=(8,6))
order = ["relaxing", "having fun", "other", "improving", "winning"]
fig.suptitle("")
dataframe[dataframe["whyplay"] != "other"].boxplot(column=["SWL_T"], by="whyplay", ax=ax)
pass
```
%% Output
Category distribution:
whyplay
having fun 5105
improving 4661
winning 1977
relaxing 623
other 424
all of the above 48
dtype: int64
%% Cell type:markdown id: tags:
As seen in this plot, we can discover the following:
* On average, those who play to have fun are more satisfied with life than any other group.
* 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.
* 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.
* 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.
* 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 id: tags:
### Effects of income level (`work`) and education level (`Degree`) on the reason to play
%% Cell type:code id: tags:
``` python
"""#Overlaying Histogram
# Histogram for the income level Y = %, X = low to high
# One in Green for the income
# One in Red for the Anxiety for those people """
```
%% Output
'#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 id: tags:
## Q4 - Gamers from different countries
%% Cell type:markdown id: tags:
1. Do they play different games ?
1. Are they reacting differently to those games
2. Is the amount of educated players similar
%% Cell type:markdown id: tags:
![Scatter](https://cdn.discordapp.com/attachments/1127973734884581386/1127973829344493679/image.png)
%% Cell type:code id: tags:
``` python
"""#### Analyze the countries amounting to Top 7 or 90% of the survey.
#Q4.MAP PLOT = Most played game per country (Dont do it if its League everywhere. )
#Q4 MAP PLOT = Heat Map with redder areas for more Anxiety in the country.
#Q1.2 Grouped Bar Chart with the top game next to the "Anxiety Score"
#2 Scatter PLot like in the example """
```
%% Output
'#### 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 '
......
......@@ -13,7 +13,17 @@ class Plotter:
def customize_plot(self, fig, ax, styling_params):
if styling_params.get('title'):
ax.set_title(styling_params["title"])
def distribution_plot(self, target, styling_params = {}):
grouped_data = self.df.groupby(target).size()
plt.barh(grouped_data.index, grouped_data.values)
print(str(grouped_data), str(grouped_data.index), str(grouped_data.values))
plt.xlabel("Size")
plt.ylabel(target)
plt.title(f"Distribution of {target}")
def plot_categorical_bar_chart(self, category1, category2, styling_params = {}):
ct = pd.crosstab(self.df[category1], self.df[category2])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment