-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
177 lines (148 loc) · 5.96 KB
/
index.html
File metadata and controls
177 lines (148 loc) · 5.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<title>NFL Player Data, 12/18/2016</title>
<meta charset="utf-8">
<meta name="description" content="NFL Player Data, 12/18/2016">
<meta name="author" content="Harrison Hassig">
<meta name="generator" content="slidify" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<link rel="stylesheet" href="libraries/frameworks/io2012/css/default.css" media="all" >
<link rel="stylesheet" href="libraries/frameworks/io2012/css/phone.css"
media="only screen and (max-device-width: 480px)" >
<link rel="stylesheet" href="libraries/frameworks/io2012/css/slidify.css" >
<link rel="stylesheet" href="libraries/highlighters/highlight.js/css/tomorrow.css" />
<base target="_blank"> <!-- This amazingness opens all links in a new tab. --> <link rel=stylesheet href="./assets/css/ribbons.css"></link>
<!-- Grab CDN jQuery, fall back to local if offline -->
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js"></script>
<script>window.jQuery || document.write('<script src="libraries/widgets/quiz/js/jquery.js"><\/script>')</script>
<script data-main="libraries/frameworks/io2012/js/slides"
src="libraries/frameworks/io2012/js/require-1.0.8.min.js">
</script>
</head>
<body style="opacity: 0">
<slides class="layout-widescreen">
<!-- LOGO SLIDE -->
<slide class="title-slide segue nobackground">
<hgroup class="auto-fadein">
<h1>NFL Player Data, 12/18/2016</h1>
<h2>Coursera Developing Data Products Course Project</h2>
<p>Harrison Hassig<br/></p>
</hgroup>
<article></article>
</slide>
<!-- SLIDES -->
<slide class="" id="slide-1" style="background:;">
<hgroup>
<h2>Overview</h2>
</hgroup>
<article data-timings="">
<p>This project is designed to give an graphical representation of NFL player's daily fantasy salary compared to their respective average daily fantasy points. This is broken down by position, according to FanDuel.
After plotting the players, a regression line is drawn. This is great, as visual learners can see which players are above average for their position, and which aren't.</p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-2" style="background:;">
<hgroup>
<h2>Data Sources</h2>
</hgroup>
<article data-timings="">
<p>The data comes from FanDuel's website for the "Main" entry pool of NFL games on Sunday, December 18th 2016.
FanDuel is nice enough to provide a CSV file for this data, which is unlinkable, but is included in the github repo and hosted here:</p>
<p>(<a href="https://www.dropbox.com/s/px1yv5ioqj79i2l/playerData.csv">https://www.dropbox.com/s/px1yv5ioqj79i2l/playerData.csv</a>)</p>
<pre><code>## Loading required package: ggplot2
</code></pre>
<pre><code>##
## Attaching package: 'plotly'
</code></pre>
<pre><code>## The following object is masked from 'package:ggplot2':
##
## last_plot
</code></pre>
<pre><code>## The following object is masked from 'package:stats':
##
## filter
</code></pre>
<pre><code>## The following object is masked from 'package:graphics':
##
## layout
</code></pre>
<pre><code class="r">summary(mydata$Position)
</code></pre>
<pre><code>## D K QB RB TE WR
## 26 26 82 156 130 193
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-3" style="background:;">
<hgroup>
<h2>Calculations</h2>
</hgroup>
<article data-timings="">
<p>Here, we plot the players Salary (x-axis) against their Average Fantasy Points (FFPG) (y-axis) and then add our regression line. "input$position" allows for user input, part of the assignment. The code is shown below:</p>
<pre><code class="r">mydata <- subset(mydata, Position == input$position)
ggplot(data = mydata, aes(x = Salary, y = FPPG, label = LastName)) +
geom_point(aes(colour = Position)) +
geom_smooth(size = .5, method = loess) +
xlab("Salary") +
ylab("Average Points per Game") +
ggtitle("NFL Data 12/18/2016")
</code></pre>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="" id="slide-4" style="background:;">
<hgroup>
<h2>Output</h2>
</hgroup>
<article data-timings="">
<p>The final output will be a shiny app that will include a brief explanation, a radio input block for the user to select which position they would like to see charted. This will then show the different players of that position graphed with their salary and average points per game. You can see a working version here:</p>
<p>(<a href="https://hhassig.shinyapps.io/project_week_4/">https://hhassig.shinyapps.io/project_week_4/</a>)</p>
<p><img src="figure/unnamed-chunk-4-1.png" alt="plot of chunk unnamed-chunk-4"></p>
</article>
<!-- Presenter Notes -->
</slide>
<slide class="backdrop"></slide>
</slides>
<div class="pagination pagination-small" id='io2012-ptoc' style="display:none;">
<ul>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=1 title='Overview'>
1
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=2 title='Data Sources'>
2
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=3 title='Calculations'>
3
</a>
</li>
<li>
<a href="#" target="_self" rel='tooltip'
data-slide=4 title='Output'>
4
</a>
</li>
</ul>
</div> <!--[if IE]>
<script
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js">
</script>
<script>CFInstall.check({mode: 'overlay'});</script>
<![endif]-->
</body>
<!-- Load Javascripts for Widgets -->
<!-- LOAD HIGHLIGHTER JS FILES -->
<script src="libraries/highlighters/highlight.js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<!-- DONE LOADING HIGHLIGHTER JS FILES -->
</html>