This repository contains a set of Google Apps Script files designed to automate the process of collecting and managing hockey player transfers and commitments from Elite Prospects.
The scripts pull raw data and process it to update various league and commitment sheets, helping to maintain a comprehensive and accurate database of player movements.
-
Automated Data Collection
Scripts can be set up with time-driven triggers to automatically scrape and update player transfers from Elite Prospects. -
Player Transfer Data
Thetransfer_BoardMacro.jsscript fetches and populates confirmed players transfer data from Elite Prospects. -
Commitment Tracking
Thecommitments_Updates.jsscript processes raw transfer data to track player commitments to various leagues (NCAA, USport, OHL, WHL, QMJHL). -
Data Normalization
Includes a helper script with functions to normalize text, making it easier to match player and team names and categorize them by league.
-
Create a Google Sheet
Open a new Google Sheet. -
Create Tabs
The scripts rely on specific sheet names. You must create separate tabs with the exact names:TransactionsNCAAUSportOHLWHLQMJHL
-
Create an Apps Script Project
From your Google Sheet, go to Extensions > Apps Script and start a new project. -
Copy the Code
Copy the contents of the.jsfiles from this repository into your Apps Script project. -
Set up Triggers
For automation, go to the Triggers section (the clock icon on the left) in your Apps Script project and set up a time-driven trigger for theTransactions_UpdateandupdatePlayerCommitmentsfunctions to run daily.
-
transfer_BoardMacro.js
UsesIMPORTHTMLto pull the latest player transfer data from Elite Prospects and populates theTransactionssheet.
This is the initial data-gathering step. -
commitments_Updates.js
Processes the data in theTransactionssheet and updates player commitment information across theNCAA,USport,OHL,WHL, andQMJHLsheets. -
transfer_Updates.js
Contains helper functions likenormalizeNameandgetTeamLeaguethat are used by the other scripts to ensure data consistency and accuracy.
Please note that these scripts rely on the specific HTML structure of the Elite Prospects website.
If the website changes its structure, the scripts may break and require updates.
I welcome contributions to this project! If you have any ideas for new features, bug fixes, or improvements, please feel free to open a pull request.
This project is licensed under the MIT License — see the LICENSE.md file for details.
Thierry Savaria
GitHub: thierrysavaria