FantasyHockeyHelper — Technical Improvements 2024–2025

Tom Pedron
4 min readSep 1, 2024

--

The hockey season is almost back and so is FantasyHockeyHelper.ca! As usual, I’ve written a blog post that will give an overview of the improvements I’ve made to the site for the upcoming season so you can draft your team and manage it all season long using my Fantasy-Score algorithm and other tools I’ve made.

Login/Signup/Connect with Yahoo! Sports

Finally! After years of saying “ughh I’ll get to it later”, I’ve finally implemented Oauth and now you can login to FantasyHockeyHelper.ca (aka FHH) with your Yahoo account. Why Yahoo you may ask? Well its the most populate Fantasy Hockey Managing Software (as far as I know, there are others like ESPN or Fantrax but I’ve only used Yahoo for the last few years.

For now ITS JUST LOGIN but on signup when you accept scopes (aka permissions my app can do on your belalf on Yahoo, I can see your basic account info (so I know your email address so you can login via Yahoo) and I can access your Fantasy Sports Teams. This will allow me to implement new features to sync your team on Yahoo to FHH (so you do not need to do this manually anymore).

At this time I do not plan to do anything around altering your rosters in Yahoo from FHH. Just a sync to FHH to reflect changes to your team for evaluation. While that might be cool, it feels outside the scope of the problems I want to work on and adds risk around any bugs in my app hurting your team.

Click on the Connect With Yahoo! button
Go through the sign in process with Yahoo
Read and accept the scopes
You are now logged in to FHH through Yahoo

You can also go to https://login.yahoo.com/myaccount/activity/ to disconnect your Yahoo account from FHH via the Connected Apps > Fantasy Hockey Helper V2 > Details > Remove Access > Disconnect

In-Season Player Trends Visualization

Technically I wrote this new feature in February 2024 during the season (really the best time to write new features is when I think of them) but since it wasn’t in a blog post before, I’ve added it here. I’ve added graphs to be able to visualize a player’s performance over the course of the season. You can access this from any active player’s profile page. Below is Auston Matthew’s production across all tracked statistics in comparison to his peers.

Initially tweeted out on Feb 23 https://x.com/TPedr0n/status/1761072659360555259/photo/1

The tool being used for visualization is https://canvasjs.com, a simple client-side JS library to visualize a set of data points returned in the server-side HTML from the main Ruby on Rails app.

In-Season Player Comparison

Also, once the season starts, you can select 2 players for evaluating a trade/waivers/whatever and see a similar graph tracking their performance.

Originally tweeted on Feb 22 https://x.com/TPedr0n/status/1760740630517698909/photo/1

Re-Wrote NHL Schedule Data Collection

I have a confession: the team schedule data I was presenting not coming directly from an NHL source, but instead, a random google doc someone actively maintained that was easy to scrape. However, they have since stopped up updating it and honestly, it was time to start doing this myself via the NHL API.

Big shout out to Github user @Zmalski who documented the official NHL API here: https://github.com/Zmalski/NHL-API-Reference.

I am now retrieving schedule data from the official NHL Schedule API, determining B2B, off-night and Yahoo Scheduling info from them too to keep existing feature parity. The Team Schedules page looks the exact same (for now) but under the hood its all different and new. Previously I would scrape the data daily to a csv, write it to an S3 bucket (in case the doc was unavailable), then read it back and parse it to the database. Now, I just hit the NHL API for each NHL team, parse the data into schedule objects and write it to the database. Saved a couple steps too and maybe some S3 costs too, even though document storage is dirt cheap.

Now that I am in control, I expect I will make further improvements to this page as the season goes on and I think of things to do.

--

--

Tom Pedron
Tom Pedron

Written by Tom Pedron

Staff Software Engineer @ Copper CRM

No responses yet