Import Data

stats <- read_csv("../00_data/myData.csv")
## New names:
## Rows: 39 Columns: 8
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (2): Country, ...8 dbl (5): Kill/Death Ratio, Player Rating, Headshot
## Percentage, Kills Per Rou... lgl (1): ...7
## ℹ 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.
## • `` -> `...7`
## • `` -> `...8`
stats <- stats %>%
    janitor::clean_names()

Introduction

Questions

Variation

Visualizing distributions

stats %>%
    ggplot(aes(x = player_impact)) +
    geom_bar()

stats  %>%
    ggplot(aes(x = player_rating)) +
    geom_bar()

Typical values

stats  %>%
    
    # Filter out higher player impact
    filter(player_impact < 1.06) %>%
    
    # Plot
    ggplot(aes(x = player_impact)) +
    geom_histogram(binwidth = 0.005)

stats %>%
   
 # Filter out higher player rating
    filter(player_rating < 1.05) %>%
    
    # Plot
    ggplot(aes(x = player_rating)) +
    geom_histogram(binwidth = 0.005)

Unusual values

Missing Values

Covariation

stats %>%
    
    ggplot(aes(x = player_impact, y = country)) +
    geom_boxplot()

stats %>%
    
    ggplot(aes(x = player_rating, y = country)) +
    geom_boxplot()

A categorical and continuous variable

Two categorical variables

Two continous variables

Patterns and models