Teen Games

Author

Program_ing

Data Dictionary 📕

Downloading & Libraries

First, I downloaded the different libraries that were needed for this project.

library(ggplot2)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ lubridate 1.9.4     ✔ tibble    3.3.0
✔ purrr     1.0.4     ✔ tidyr     1.3.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(forcats)
library(dplyr)
library(readr)

I made it easier for the data set to be loaded in for the case of an empty Environment.

Teen_Game <- read_csv("Fav Games of Teens Survey (Online) - Sheet1.csv")
Rows: 27 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): Sex, Residence, PCGame, MGame
dbl (1): Age

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Teen_Game <- Teen_Game %>%
  mutate_at(vars(Age, Sex, Residence, PCGame, MGame), as.factor)

Favorite PC Games

Then, I created a graph that portrayed the amount of people who considered what PC (Personal Computer) game they considered to be their favorite. I had 27 sureyees.

ggplot(Teen_Game)+
  aes(PCGame) +
  geom_bar() +
  scale_y_continuous(breaks = scales::pretty_breaks(n = 10)) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  theme(text = element_text(size = 14)) +
  labs(y = "Count")

Favorite Mobile Games

To follow, I did the same but with Mobile Games.

ggplot(Teen_Game)+
  aes(MGame) +
  geom_bar() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  labs(y = "Count")

Unfinished work, need to paste some material.