Thursday, January 25, 2018

The Website - A Page A Day, Part III - NHL's Yearly Tendencies

Prologue
Part I
Part II

Despite all the delays we move on to League's Yearly Tendencies.

PART III

This view shows stacked bars of various event counts per season in the NHL.All the stats are presented per game, since the amount of games played varied every season.

For the first time we encounter the stat selection menu, on top of the graphs. On this page it features the following options:

  • Category of the stats
  • Stage of the games (Regular or Playoff)

Available stats are:
  • Shots
    • Goals (available since 1987, from Boxscore reports)
    • Shots on Goal (available since 1987, from Boxscore reports)
    • Misses (available since 2005, from PBP reports)
    • Blocks (avaliable since 2005, from PBP reports)
  • Icings (available since 2002, from PBP reports)
  • Margin of victory (available since 1987, from Boxscore reports)
  • Penalties
    • Minor
    • Major
    • Fighting
    • Misconduct
    • Match Penalty
  • Goals per Game
The stats are available for regular season, playoffs and both stages combined.

The PBP reports from the NHL dating before 2005 are wildly inconsistent, thus we didn't use them for MISSES and BLOCKS.

We are using the wonderful d3js library for producing these graphs.

WE NEED YOUR HELP!
If you are an experienced Webmaster, especially with Javascript and CSS we would greatly appreciate the potential tidy-up and enrichment you could provide to these graphs. Your work will be credited for future reference! Write to us, or get in touch with us on Twitter. Thanks!

Possible future additions:
  • PowerPlay success
  • Minor penalty breakdown
  • Aggregations and overlays
  • Mouse graph manipulations
  • Your ideas are welcome!

Tuesday, January 16, 2018

The Website - A Page A Day, Part II - The League section and the Daily Summary

Prologue
Part I

It looks like it's time to resume our Website - A Page A Day series.

PART II

The first section available on our website is the League section. It contains pages either describe statistics applicable to the entire league, rather than to a specific team, player or coach, such as, for example, the West vs East account, or the statistics go across different categories, for instance, the Warm Welcome page that is applicable to the teams as we as the goaltenders.

We'll start with the first page of this first section - the Daily Summary.

This page looks like most of the data pages of this website:

  • A menu on the top (we remove the game ticker to lighten the pages)
  • A section navigation on the left
  • Main data pane on the right, featuring graphs and tables
  • A utility menu on the bottom.

This page features the summaries applicable for today's games. This page is planned very much like an ever going work in progress, but currently only two items are featured:

The historic tally of today's coaches against each other

Our database features games from the season 1987/88 through current. Our statistics account for these games in the last 30+ years. This is usually sufficient to cover all active coaches' encounters. However we plan to integrate the remaining seventy years, from 1917 to 1986, as they became available from NHL.

The predictions for today's games by our model

We display the matches for the day where we calculate the expected number of goals by each team against its opponent, and derive the probability of a win from these expected scores.

As the rosters become available for the upcoming games, we adjust our prediction by these rosters, otherwise best-scoring rosters are used. This may change in the future. The predictions by the published rosters are marked by asterisks.

Beneath the table there is a set of useful links:

  • 'Table' link that produces a pristine, unstyled table in a separate frame for easy re-use
  • 'Link' link that points at the table which is currently being displayed (this one is more useful for paged and/or filtered listings)
  • Tweet button that allows you to share this page on Twitter
  • Like button that allows you to like this page for Facebook
Possible future additions:
  • Historical browsing of previous predictions
  • Elaboration of the scoring components
  • Change in the win probability formula
  • Your ideas are welcome!

Monday, January 15, 2018

A suggestion for the All-Star Game

While the series "Website - A Page A Day" is being delayed by all kinds of things, here comes a short post on a different topic.

Last year, in my opinion, the accuracy shooting competition which included shooting the pack from the goal line into a small hole was, in my opinion a total failure. Mike Smith's spectacular score across the rink did the injustice and provided a false impression this skill contest was any good. Otherwise, the competition was not exciting to say the least.

Therefore, here's a suggestion to replace it: reverse shootouts.

Let the goaltenders shed their equipment for once, and let the skaters don it instead. Let's have a competition where the goaltenders skate and attempt to score in shootout, while the skaters try to stop them. I am sure that somewhere in the back of their minds that would fulfill a little dream both parties would have!

Wednesday, January 10, 2018

The Website - A Page A Day, Part I - Home Page

The main page of the website shows the summary of all its features.

The site menu features the main statistical sections:

  • League - league-wide statistics
  • Teams - team-based statistics
  • Players - personal statistics
  • Coaches - statistics for the NHL coaches
  • Drafts - statistics for currently drafted players and the historical performance by draft
  • Fantasy - tools to help the fantasy player

On the top we have a ticker of the scores, as predicted by the model. The ticker is always scrolled to the current date, however you can navigate it back and forth using the two arrows at the edges. The away team is on the top, and the home team is on the bottom. The predicted score is in the Prdct column. The actual score is in the Act column. The projected winner is displayed in bold. If the prediction failed, the displayed teams will be painted red. We never adjust our predictions backwards. Only the scores for the current season are featured.

Then, on the top right we have three very important links that would help you with understanding the pages:

  • Learn More - about the methodology of the Website
  • Glossary - about the terms used in the pages
  • Blog - link to this blog which, as you see, also takes time to elaborate on the site.
We also display our latest addition to the website and the latest blog entry.

Then we have three random snippets in the columns. The snippets represent excerpts from the tables published elsewhere on the site and may change after each publication, which happens overnight. The snippets currently (hopefully they would become more diverse) are:
Only current season data is displayed in the snippets.
Below the random snippets we feature a permanent snippet that shows the best projected picks for the daily fantasy competitions. We provide a model-based evaluation of the expected score for players in the three most popular Daily Fantasy websites - Yahoo, FanDuel and DraftKings.

Below each snippet there is a link to the page with the full data.

At the bottom we have a collection of information links. Make sure you visit the Glossary and the About pages. The Links page has an ever-growing collection of hockey-related links. The Forum link leads to hockeyforums.net, the site we're partnering with - this blog is broadcast there as well. The Data section shows the software and the data sources this website is built with.

Hopefully this small introduction proves helpful and entices you to pay another visit to MoreHockeyStats, and to share this site with your friends. Follow us on Twitter, through the site or through this blog!

Tuesday, January 9, 2018

The Website - A Page A Day - Prologue

Hello, hockey world, from Mr. Van Winkle...

This prolonged silence was caused by a lot of factors, led, naturally, by REAL LIFE™. But I also made a fundamental mistake in the infrastructure setup, and so I had to roll out a hastily patched setup when the season was starting; I then went back and worked on this infrastructure fix, the work which continued over three months and is now complete! Unfortunately, all this work will not be visible to the visitor, with possible exception of a slightly faster page loading - all the changes belong to the back end.

But now, once again, with REAL LIFE™ limitations I am able to work on improving the website look, speed and features. I am being somewhat torn apart since I also need to hone the models I'm using, but I decided the models can wait with half of the hockey season gone by now. In addition I'll try to put an extra effort to promote the site and made it more visible on the Web.

One of the things I was not able to complete is to release my code as the open source. This has also been put into a bottom drawer. However, I still welcome cooperation very much and will gladly share the code with people who would want to contribute to the project. The areas I could really use some help are:
  • JavaScript/HTML/CSS
  • MongoDB query and database optimization
  • SEO optimization
So if you feel like helping - drop me a mail.

Also I will begin a series "Website - A Page A Day", where I plan to describe each and every statistical page on the site because I have a feeling I haven't been clear enough with the explanations until now; moreover it will help me discover errors and inconsistencies that probably crawled through.

So, stay tuned, here in this blog, on the website, and on Twitter!

Wednesday, August 16, 2017

A revision of HTML reports from the NHL website.

So, while revising and revisiting the data files, I did an extra scan of the HTML reports available on NHL.com .

The HTML reports are extracted through the following URL pattern: 

sprintf('http://www.nhl.com/scores/htmlreports/%d%d/%s%02d%04d.HTM', $season, $season+1, $type, $stage, $game_id) 

where $season is the start year of the season, $type is the type of the report, $stage is 2 for regular, 3 for playoff, and $game_id is the NHL game id for the season.

Below are the results for the problematic games, with the reports that are beyond salvage marked accordingly:

Season Stg GameId ES GS PL RO
1999 Reg 0029 M M N N
1999 Reg 0045 I I N N
1999 Reg 0050 I I N N
1999 Reg 0058 R R N N
1999 Reg 0071 I I N N
1999 Reg 0072 I I N N
1999 Reg 0081 I I N N
1999 Reg 0109 I I N N
1999 Reg 0130 I I N N
1999 Reg 0323 R R N N
1999 Reg 0619 I I N N
1999 Reg 0689 I I N N
1999 Reg 0690 B I N N
1999 Reg 0836 I I N N
1999 Reg 1034 I I N N
1999 P/O 0325 I I N N
2000 Reg 0029 R R N N
2000 Reg 0038 R R N N
2000 Reg 0039 I I N N
2000 Reg 0041 R R N N
2000 Reg 0042 R R N N
2000 Reg 0043 R R N N
2000 Reg 0044 R R N N
2000 Reg 0045 I I N N
2000 Reg 0049 R R N N
2000 Reg 0067 R R N N
2000 Reg 0072 I I N N
2000 Reg 0073 I I N N
2000 Reg 0077 I I N N
2000 Reg 0080 R R N N
2000 Reg 0083 R R N N
2000 Reg 0085 I I N N
2000 Reg 0095 R R N N
2000 Reg 0102 I I N N
2000 Reg 0112 R R N N
2000 Reg 0186 I I N N
2000 Reg 0187 I I N N
2000 Reg 0189 I I N N
2000 Reg 0920 R R N N
2000 Reg 0921 I I N N
2000 Reg 0924 R R N N
2000 Reg 0925 R R N N
2000 Reg 0926 R R N N
2000 Reg 0928 I I N N
2000 Reg 0983 B V N N
2000 Reg 1166 I I N N
2003 Reg 0191 V I V N
2003 Reg 1205 I I I N
2003 P/O 0134 V V B N
2005 Reg 0298 R V V N
2005 Reg 0458 B V V N
2005 Reg 0677 V V V B
2005 Reg 0679 V V V B
2005 Reg 0681 V V V B
2007 Reg 1178 I I B I
2008 Reg 0259 I I B I
2008 Reg 0409 I I B I
2008 Reg 1077 I I B I
2009 Reg 0081 I I B I
2009 Reg 0827 V I V V
2009 Reg 0836 V I V V
2009 Reg 0857 I I V V
2009 Reg 0863 I I V V
2009 Reg 0874 I I V I
2009 Reg 0885 I V V I
2010 Reg 0429 I I V V
2011 Reg 0259 I I V V
Legend:
I - incomplete (not through the end of the game)
B - broken (doesn't pass HTML parser)
M - misplaced (belongs to a different game that doesn't have a file associated with it)
R - replica (copy of a file from another game
N - not available (file not available on NHL.com)
V - file is good.

Friday, June 30, 2017

I'm not gone

For those few people who may be reading this -

This blog ain't dead. It's just that I've been so busy so far with my regular job, with my website rework and with moving into the new house, that I haven't a time to consider a proper post.

Stay tuned, though...