Problem Statement

In this project, you’re given a text file with chess tournament results where the information has some structure. Your job is to create an R Markdown file that generates a .CSV file (that could for example be imported into a SQL database) with the following information for all of the players: Player’s Name, Player’s State, Total Number of Points, Player’s Pre-Rating, and Average Pre Chess Rating of Opponents For the first player, the information would be: Gary Hua, ON, 6.0, 1794, 1605

Load Data from Github

Remove Legacy Column Headers

## [1] -----------------------------------------------------------------------------------------
## [2]     1 | GARY HUA                        |6.0  |W  39|W  21|W  18|W  14|W   7|D  12|D   4|
## [3]    ON | 15445895 / R: 1794   ->1817     |N:2  |W    |B    |W    |B    |W    |B    |W    |
## [4] -----------------------------------------------------------------------------------------
## [5]     2 | DAKSHESH DARURI                 |6.0  |W  63|W  58|L   4|W  17|W  16|W  20|W   7|
## [6]    MI | 14598900 / R: 1553   ->1663     |N:2  |B    |W    |B    |W    |B    |W    |B    |
## 131 Levels: ----------------------------------------------------------------------------------------- ...

Subset the data for transformation

## [1]     1 | GARY HUA                        |6.0  |W  39|W  21|W  18|W  14|W   7|D  12|D   4|
## [2]     2 | DAKSHESH DARURI                 |6.0  |W  63|W  58|L   4|W  17|W  16|W  20|W   7|
## [3]     3 | ADITYA BAJAJ                    |6.0  |L   8|W  61|W  25|W  21|W  11|W  13|W  12|
## 131 Levels: ----------------------------------------------------------------------------------------- ...
## [1]    ON | 15445895 / R: 1794   ->1817     |N:2  |W    |B    |W    |B    |W    |B    |W    |
## [2]    MI | 14598900 / R: 1553   ->1663     |N:2  |B    |W    |B    |W    |B    |W    |B    |
## [3]    MI | 14959604 / R: 1384   ->1640     |N:2  |W    |B    |W    |B    |W    |B    |W    |
## 131 Levels: ----------------------------------------------------------------------------------------- ...

Final DataSet

Exploratorory Analysis

## [1] "data.frame"
## [1] 64  5
## [1] "PlayerName"        "HomeState"         "TotalPoints"      
## [4] "PlayerPreRating"   "OpponentPreRating"
## [1] FALSE
## [1] FALSE
##                 PlayerName HomeState  TotalPoints    PlayerPreRating
##  ADITYA BAJAJ        : 1   MI:55     Min.   :1.000   Min.   : 377   
##  ALAN BUI            : 1   OH: 1     1st Qu.:2.500   1st Qu.:1227   
##  ALEX KONG           : 1   ON: 8     Median :3.500   Median :1407   
##  AMIYATOSH PWNANANDAM: 1             Mean   :3.438   Mean   :1378   
##  ANVIT RAO           : 1             3rd Qu.:4.000   3rd Qu.:1583   
##  ASHWIN BALAJI       : 1             Max.   :6.000   Max.   :1794   
##  (Other)             :58                                            
##  OpponentPreRating
##  Min.   :1107     
##  1st Qu.:1310     
##  Median :1382     
##  Mean   :1379     
##  3rd Qu.:1481     
##  Max.   :1605     
## 

Bring Tableau in rmarkdowm

I wanted to see if i can embed a tableau dashboard in rmarkdown. I was able to embed my tableau dashboard to rmarkdown using iframe after some research. I created a simple tableau dashboard using the final output .csv data and published it to my tableau public server which is a free platform for everyone. I wanted my dashboard to have search option. You can search any player to see how they performed.