R at Bet Better
Pull the daily bookmaker margin index into R
28 September 2026. R, readr, dplyr, ggplot2.
The Bet Better Margin Index is a daily CSV of the margin bookmakers build into their odds, by sport, market class and market shape, measured across tens of millions of pre-match markets. Here is how to load it, tidy it and plot it in R.
1. Read the file straight from the web
library(readr)
library(dplyr)
mi <- read_csv("https://betbetter.world/studies/margin-index?format=csv",
show_col_types = FALSE)
glimpse(mi)
# as_of_date, sport, market_class, shape, markets_n, books_n,
# mean_pct, median_pct, min_pct, max_pct
Each row is one day, one sport, one market class (head to head, spread, total, player prop) and one shape (two-way or three-way). mean_pct is the average margin in per cent of stake and markets_n is how many markets were measured that day.
2. The latest day, by sport
latest <- mi %>%
filter(as_of_date == max(as_of_date),
market_class == "h2h", shape == "2way",
sport != "ALL", markets_n >= 50) %>%
arrange(mean_pct) %>%
select(sport, mean_pct, markets_n, books_n)
latest
On most days the NFL and college football sit at the cheap end, about 4.4 cents in the dollar, and T20 cricket at the dear end, near 7.
3. The trend across the season
library(ggplot2)
mi %>%
filter(sport == "ALL", market_class == "h2h", shape == "2way") %>%
ggplot(aes(as_of_date, mean_pct)) +
geom_line() +
labs(x = NULL, y = "Average margin (% of stake)",
title = "What bookmakers keep on a two-way bet, every day",
caption = "Bet Better Margin Index, CC BY 4.0")
Reuse
The file is CC BY 4.0. Cite it as: Glush, E. (2026). The Bet Better Margin Index: daily measured bookmaker margins across market types. https://betbetter.world/studies/margin-index
Data licensed CC BY 4.0, free to reuse with a credit. Model estimates, not advice. 18+. If gambling is causing you harm: gamblinghelponline.org.au.