Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs498ccafinalproject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
antao
cs498ccafinalproject
Commits
af76eacf
Commit
af76eacf
authored
6 years ago
by
rkr2
Browse files
Options
Downloads
Patches
Plain Diff
Updated report and question 4 viz
parent
0b014163
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/CS498_CCA_Final_Project_RR.doc
+0
-0
0 additions, 0 deletions
docs/CS498_CCA_Final_Project_RR.doc
notebooks/question4_viz.Rmd
+4
-10
4 additions, 10 deletions
notebooks/question4_viz.Rmd
results/question4_viz.html
+11
-11
11 additions, 11 deletions
results/question4_viz.html
with
15 additions
and
21 deletions
docs/CS498_CCA_Final_Project_RR.doc
0 → 100755
+
0
−
0
View file @
af76eacf
File added
This diff is collapsed.
Click to expand it.
notebooks/question4_viz.Rmd
+
4
−
10
View file @
af76eacf
#### Who has performed better, Left Handed or Right Handed Pitchers? Has this trend changed over time?
##### Visualizing the Data
We were able to use Apache Spark to extract data that would help us determine the performance of right
...
...
@@ -28,8 +27,8 @@ begin the visualization by reading the summary from the comma delimited file.
```{r}
# Read the data from the CSV
question4aData <- read.csv(file = 'spark_question4_BAOpp_right_vs_lefty_pitchers.csv')
question4bData <- read.csv(file = 'spark_question4_ERA_right_vs_lefty_pitchers.csv')
question4aData <- read.csv(file = '
./
spark_question4_BAOpp_right_vs_lefty_pitchers.csv')
question4bData <- read.csv(file = '
../reports/
spark_question4_ERA_right_vs_lefty_pitchers.csv')
```
The visualizations are generated using the highcharter package which generates highcharts visualizations
...
...
@@ -47,13 +46,11 @@ chart4a <- hchart(question4aData, "line", hcaes(x = yearID, y = BAOpp, group = t
hc_credits(enabled = TRUE, text = "Source: Sean Lahman, Baseball Database Website",
href = "http://www.seanlahman.com/baseball-archive/statistics/",
style = list(fontSize = '10px'))
```
```{r}
# Display the visualization
chart4a
```
```{r}
chart4b <- hchart(question4bData, "line", hcaes(x = yearID, y = ERA, group = throws)) %>%
hc_title(text = 'Left Handed vs Right Handed Pitching Earned Runs Average Over Time') %>%
...
...
@@ -62,11 +59,8 @@ chart4b <- hchart(question4bData, "line", hcaes(x = yearID, y = ERA, group = thr
hc_credits(enabled = TRUE, text = "Source: Sean Lahman, Baseball Database Website",
href = "http://www.seanlahman.com/baseball-archive/statistics/",
style = list(fontSize = '10px'))
```
```{r}
# Display the visualization
chart4a
chart4b
```
This diff is collapsed.
Click to expand it.
results/question4_viz.html
+
11
−
11
View file @
af76eacf
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment