Betfair Dashboard project in Google Colab

Post Reply
User avatar
gazuty
Posts: 2557
Joined: Sun Jun 26, 2011 11:03 am

I’ve been working on a Betfair Dashboard project in Google Colab, and I’m excited to share it.

It’s designed for beginners but structured so experienced coders can follow or contribute easily.

📂 GitHub repo (with code + README):
https://github.com/gazuty/betfair-dashboard

🚀 Try it out directly in Colab:
https://colab.research.google.com/githu ... ults.ipynb

📊 Betfair Dashboard Looker Studio Template

I have provided a Looker Studio template that you can use to visualize your Betfair data!

👉 [Open the Betfair Looker Studio Template](https://lookerstudio.google.com/s/vYrmf16mdp8)

### How to use the template:
1️⃣ Click the link above to open the template
2️⃣ In Looker Studio: go to `File → Make a copy`
3️⃣ When prompted, connect your own Google Sheet as the data source
4️⃣ Your Google Sheet should use the same structure (sheet names and column headers) as generated by this project:
- Sheet names like `By Day`, `By Week`, `By Sport`
- Columns like `Day`, `Profit_Loss`, `Cumulative_Profit_Loss`

✅ Once connected, your personal Betfair data will drive the charts.

⚠️ **Note:** You need to connect your own data to see your results.

Here is what it can look like.
Capture.PNG

Gaz
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 23571
Joined: Sun Aug 09, 2015 10:57 pm

Looks to be a great bit of work Gazuty, thanks for sharing!


Image
User avatar
gazuty
Posts: 2557
Joined: Sun Jun 26, 2011 11:03 am

Dallas wrote:
Mon Jul 07, 2025 6:30 pm
Looks to be a great bit of work Gazuty, thanks for sharing!


Image
Thanks for the big thumb, Dallas. Thought it might help some newbies who want to track results and might even appeal to some old hands.

Hope you, Peter and all the BA team are going well.

Gaz
User avatar
gazuty
Posts: 2557
Joined: Sun Jun 26, 2011 11:03 am

Now provided scripting to add charts to google sheets.

📊 Adding the Dashboard Charts (Optional)
If you'd like to automatically insert charts into the Dashboard tab in your Google Sheet:

🔧 Step-by-Step Instructions
Open your Google Sheet named Betfair Dashboard
(this is the one your Colab notebook pushes results to)

Go to Extensions > Apps Script

Delete any default code and paste in the contents of
scripts/dashboard_charts.gs from this repo

Save the project with any name (e.g., DashboardChartBuilder)

Close the Apps Script editor

Back in your sheet, refresh the page. You will see a new menu:
📊 Dashboard > Refresh Charts

Click Refresh Charts to automatically insert visual summaries including:

Profit/Loss by day, week, and month
Cumulative performance
Sport breakdowns
Top/bottom horse tracks
Strike rates
⚠️ If prompted for authorization the first time, grant permission to run the script.
User avatar
gazuty
Posts: 2557
Joined: Sun Jun 26, 2011 11:03 am

Program now updated with rolling 2, 4, 8 week summaries for overall p/l and horses and greyhounds.

Dashboard script for graphs also updated.

At this link - https://github.com/gazuty/betfair-dashboard

🧠 Betfair Dashboard
This project is a personal analytics pipeline for historical betting data from Betfair.

📁 Repository Structure
Results.ipynb: Main Colab notebook to process Betfair exports and generate summaries
scripts/dashboard_charts.gs: Google Apps Script to generate dashboard charts (optional)
Betfair_Master.csv: Master historical dataset (auto-updated)
combined_cleaned.csv: Archived snapshot of cleaned data
⚙️ Features
Loads and deduplicates raw Betfair CSVs
Archives processed files to /Archive
Extracts Sport, Track, Country, and Event features
Generates summaries:
Daily and cumulative profit/loss
Weekly (Sun–Sat) and Monthly summaries
Rolling 2, 4, 8 week summaries (from 1 March)
Performance by sport and country
Daily and rolling summaries for Horse Racing and Greyhounds
Top/bottom tracks and strike rates
Pushes all tables to a Google Sheet titled Betfair Dashboard
Generates a KPI summary in a Dashboard tab
📓 How to Use
Download your Betfair "Betting Profit and Loss" CSV files
Upload them to your Google Drive under /My Drive/Betfair/
Open Results.ipynb in Google Colab
Run all cells to:
Update the master dataset
Build summary tables
Export results to the Google Sheet
Your target Google Sheet must be titled exactly:
Betfair Dashboard

📊 Add Dashboard Charts (Optional)
To automatically generate charts in the Dashboard tab:

🛠 Step-by-Step Instructions
Open your Google Sheet: Betfair Dashboard
Go to Extensions > Apps Script
Delete any default code and paste in the contents of:
scripts/dashboard_charts.gs
Save the Apps Script project (e.g. DashboardChartBuilder)
Reload your sheet — a new menu will appear:
📊 Dashboard > Refresh Charts
Click Refresh Charts to add:
Profit/Loss by day, week, and month
Cumulative performance
Rolling 2, 4, 8 week summaries (with legend)
Horse and Greyhound P/L and rolling
Top/bottom tracks and strike rates
⚠️ If prompted, authorize the script to access your sheet.

👨‍💻 Author
Built by Gazuty (c) 2025
Post Reply

Return to “Trade analysis & record keeping”