MLB2016: MLB2016.

Description Usage Format Details Examples

Description

Major League Baseball (MLB) data for the 2016 season.

Usage

1

Format

A tibble with 20 variables:

GameID

same format as Retrosheets and BaseballReference data

EventDateTimeUTC

Time of the game in UTC

EventDateTimeET

Time of the game in Eastern Standardtime

AwayTeam

Team name of the Away Team

HomeTeam

Team name of the Home Team

DoubleHeaderGame

Indicates if this was a double Header

AwayStartingPitcher

Starting pitcher Away Team

HomeStartingPicher

Starting pitcher Home Team

FinalScoreAway

Runs scored by Away Team

FinalScoreHome

Runs scored by Home Team

EnteredDateTimeUTC

Time of the wager line in UTC

EnteredDateTimeET

Time of the wager line in Eastern Standardtime

SpreadTeam1

Spread Handicap for Away Team

SpreadUS1

Spread US odds for Away Team

SpreadUS2

Spread US odds for Home Team

MoneyUS1

Moneyline US odds for Away Team

MoneyUS2

Moneyline US odds for Home Team

TotalPoints

Total runs handicap

TotalUSOver

Total runs US odds for Over

TotalUSUnder

Total runs US odds for Under

Details

All wagering lines from Pinnacle for the 2016 MLB season

Examples

 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
if (require("tidyverse")) {
library(tidyverse)
# What was the range of expected total runs according to the prediction market at Pinnacle?
MLB2016 %>% 
 unnest() %>% 
 group_by(GameID) %>% 
 arrange(desc(EnteredDateTimeUTC)) %>% 
 slice(1) %>% 
 ungroup() %>% 
 group_by(TotalPoints) %>% 
 summarize(Count = n())

# How many games went Over/Under/Landed on the total?
MLB2016 %>% 
 unnest() %>% 
 group_by(GameID) %>% 
 arrange(desc(EnteredDateTimeUTC)) %>% 
 slice(1) %>% 
 ungroup() %>% 
 select(GameID,TotalPoints,FinalScoreAway,FinalScoreHome) %>% 
 mutate(TotalOutcome = case_when(
   FinalScoreAway + FinalScoreHome > TotalPoints ~ "Over",
   FinalScoreAway + FinalScoreHome < TotalPoints ~ "Under",
   FinalScoreAway + FinalScoreHome == TotalPoints ~ "Landed"
 )
 ) %>% 
 group_by(TotalPoints,TotalOutcome) %>% 
 summarize(Count = n()) %>% 
 print(n=100)
}

Example output

Loading required package: tibble
Loading required package: tidyverse
-- Attaching packages --------------------------------------- tidyverse 1.2.1 --
v ggplot2 3.1.1       v purrr   0.3.2  
v tidyr   0.8.3       v dplyr   0.8.0.1
v readr   1.3.1       v stringr 1.4.0  
v ggplot2 3.1.1       v forcats 0.4.0  
-- Conflicts ------------------------------------------ tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag()    masks stats::lag()
# A tibble: 37 x 3
# Groups:   TotalPoints [16]
   TotalPoints TotalOutcome Count
         <dbl> <chr>        <int>
 1         5.5 Under            2
 2         6   Over             7
 3         6   Under            9
 4         6.5 Over            30
 5         6.5 Under           24
 6         7   Landed          19
 7         7   Over            91
 8         7   Under           86
 9         7.5 Over           234
10         7.5 Under          230
11         8   Landed          31
12         8   Over           212
13         8   Under          178
14         8.5 Over           249
15         8.5 Under          264
16         9   Landed          52
17         9   Over           186
18         9   Under          187
19         9.5 Over            84
20         9.5 Under           96
21        10   Landed           5
22        10   Over            33
23        10   Under           36
24        10.5 Over            16
25        10.5 Under           30
26        11   Landed           2
27        11   Over            12
28        11   Under           10
29        11.5 Over            10
30        11.5 Under            8
31        12   Landed           2
32        12   Over             4
33        12   Under            5
34        12.5 Over             7
35        12.5 Under            8
36        13   Landed           1
37        13   Over             2

pinnacle.data documentation built on May 2, 2019, 3:34 p.m.