Tuesday, October 05, 2010

Scoring Chance App

A couple of years ago I wrote a small scoring chance app for Dennis King. This was done to make life easier for him. Last year several people used this app to record the scoring chances in hundreds of NHL hockey games. It has been updated to record this season's games, and can be found here.

The team needs to be selected from a drop down menu. This generates a form where the user inputs the five digit NHL game number as well as all of the individual scoring chances, and the time they occurred.

The output is the set of tables that Dennis uses in his posts. Like this one.

Occasionally this script fails due to inconsistent formatting of the NHL.com data sheets. If anyone experiences such difficulties with this app, please leave a comment in this thread. I'll check in here from time to time throughout the season and attempt to fix any problems if and when they occur.


Blogger Foon said...


Will there be an update for the WOWY script for this season too?

10/05/2010 10:59 am  
Blogger Scott Reynolds said...

You are awesome, Vic!

10/05/2010 12:02 pm  
Blogger Kent W. said...

Someone needs to start paying you for this stuff.

10/05/2010 2:30 pm  
Blogger Olivier said...

Christmas in october!

Happy grueling scoring chance marathon to everyone!

10/05/2010 3:10 pm  
Blogger Michael said...

I'm totally sporting a chubby right now.

Thanks for this, Vic.

10/05/2010 8:02 pm  
Blogger Dennis said...

Thanks again Vic! And I'll be posting the results over at Ty's page as usual.

Once again, thanks:)

10/06/2010 9:26 am  
Blogger Coach pb9617 said...

Thanks Vic! Since the NW is taken again, I think I'm heading out east to do a team this season.

10/07/2010 12:10 pm  
Blogger Coach pb9617 said...

I've also recruited a Rangers fan to do the Atlantic.

10/07/2010 12:26 pm  
Blogger George E. Ays said...

Indeed. I'm going to track the Rangers this year.

10/07/2010 7:24 pm  
Blogger Vic Ferrari said...

I'm impressed that so many people are going to track scoring chances this year. Dennis really started something with this.

What teams are being covered besides the Oilers, Flames and Habs?

10/08/2010 11:53 am  
Blogger Vic Ferrari said...


I suspect that I'll get around to it eventually.

10/08/2010 11:54 am  
Blogger Coach pb9617 said...

I'm taking on the Panthers and if I have time, the Islanders. Someone, the name escapes me now, takes the Leafs and George has the Rangers.

I supposed I should take a Pacific team rather than the Islanders since it's the only division we're not seeing coverage in.

10/08/2010 12:25 pm  
Blogger Slava said...

I decided to have another go at tracking the Leafs this season (hopefully I make it all the way through this one too, we'll see). Thanks for the script, Vic, and thanks to all who've volunteered to count chances for other teams.

10/08/2010 3:39 pm  
Blogger Michael said...

I'll be tracking the Caps this season

10/09/2010 2:45 pm  
Blogger NeilRMNB said...

Thanks for this Vic! I will be tracking the Caps. Mike and I will prob be comparing notes throughout the season.

10/12/2010 6:06 am  
Blogger Vic Ferrari said...

Cool. Good to see that at least one good team is being tracked. The rest of us were well on our way to becoming experts on crappy hockey teams. :)

10/12/2010 9:26 am  
Blogger Olivier said...

I'd like to add that, If you have a blog where you intend to the data, please leave a note about it here. If you don't have a blog/publishing place, Derek Zona suggested doing a fanpost on behindthenethockey.com, which seems an excellent idea to me.

I'll probably fry my keyboard drooling at the Capitals numbers. I get the feeling those who think Semin is some sort of slacker who only shoots from far away are in for a surprise.

10/12/2010 9:32 am  
Blogger Vic Ferrari said...

You can post it here if you want, Olivier. If you have the energy to translate your posts to English. I can just add you as a contributor if you'd like.

Or were you thinking of place with a copy of all recorded games?

10/12/2010 9:42 am  
Blogger Olivier said...

I was thinking of a place to send their scoring chances results for those of us who don't have a blog or don't intend to score all chances for a given team. So some kind of a repository, yes.

That way, if some dude who follows the Coyotes feels like scoring their Saturday night games, he can do so and then send the output somewhere public.

That being said, because a) it seems I still come across as a rational human being around these parts and I wouldn't want to mess with that and b) I'm a lazy person, I don't plan on translating my ramblings, but thanks for the offer :).

These days, I'm mostly devoting my blogging energies to hammering scripts helping me output my cross-tables with color-coding indicating h2h time on ice. It's a bitch but the result is pretty cool I think (see an example here)

10/12/2010 9:53 am  
Blogger NeilRMNB said...

This comment has been removed by the author.

10/13/2010 5:56 am  
Blogger NeilRMNB said...

This comment has been removed by the author.

10/13/2010 5:58 am  
Blogger NeilRMNB said...

I am posting a summary of the scoring chances for the Caps on Google Docs for public viewing every week.

Here is the first three games.

Feedback/suggestions are welcome.

I will also be using it in posts on Russian Machine Never Breaks and the Washington Post.

10/13/2010 5:59 am  
Blogger George E. Ays said...

That's some fancy work Neil, thanks for that.

Rangers chances will be going up on Blueshirt Banter as I get them done.

Vic..question for you. I recorded one chance for Dubinsky that was in an EN (he shot it from the scoring position area at least). It's not coming up when I run the query, is this by design?

10/13/2010 10:58 am  
Blogger Boris Frumball said...

Awesome, thanks for sharing this tool (as well as so much of your other work). I am unable to commit to following any given team all season, but anyway...


10/16/2010 8:29 pm  
Blogger NeilRMNB said...

Looks like the Scoring chance script is acting weird. It's not adding up the chances for individuals or by period.

Do these things usually work itself out?

WSH v ATL thru 2

10/23/2010 6:49 pm  
Blogger Vic Ferrari said...


I suspect that some of the non-alphanumeric characters that you are using in the comment field are confusing my simple parsing script.

If you still have the original input file, try removing one non-alphabetic character at a time to see which one is doing the damage.

10/26/2010 8:45 am  
Blogger Vic Ferrari said...


Looks like the '>' character is the culprit.

IIRC my script takes your data input as an html table, then parses it into an array, probably using a regular expression search/replace. So > and < characters in the comment field will cause failure.

10/26/2010 8:54 am  
Blogger NeilRMNB said...

Ahh - makes sense. I'll use different notation.

Thanks Vic!

10/26/2010 9:17 am  
Blogger Boris Frumball said...

Game 20198 - output tables are assigning incorrect name/number combination for players on both teams.

11/07/2010 5:40 pm  
Blogger Jim Philips said...

You did a great job with it. For everybody makes easier the choices and It helps me a lot with the pph free demo

5/30/2013 11:39 pm  

Post a Comment

<< Home