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

HomeStartingPitcher

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)
}

marcoblume/pinnacle.MLB documentation built on May 21, 2019, 11:43 a.m.