Saturday, October 15, 2011

At some point I need to build a front end for this site, to make it more accessible.

I write this because I'm looking for volunteers. It's not easy to get data from there, as you know. You have to be a hardcore fan to even bother trying to learn the URLs. Despite that there is a lot of traffic and it's growing, hockey math is taking off. And though I may regret thinking it ... maybe we should make it easier on folks.

If you have the requisite skills, or would like to volunteer a 'How To' or FAQ page ... this would be the place to do it. Just chime in below.

That said, I'm happy to leave it as it is.


Blogger BSH EricT said...

Hi. I'm looking for help from Vic and this was the best way I could come up with to reach him -- so sorry for the unfortunate coincidence that I reply to a request for help with a request of my own.

We have a couple of teams tracking zone entries this year (see this article), and it'd be really cool to use the shift chart data to add info about who was on the ice for each entry for and against.

I'm guessing this is part of what your scoring chance app does, so I'm wondering if I/you could easily adapt it to my needs. In my ideal world, I'd feed a .csv input with the entry list (~200 per game) into a script and it would spit out an output with the on-ice info appended to each line.

You can reach me at bsh.erict(at) I'd appreciate any help you can provide.

10/18/2011 12:27 pm  
Blogger John Fischer said...

Vic - I love TOI, and a front end would be fantastic for when I refer to it in a recap or another post.

I think Red Army Line's FAQ on how to use Time on Ice would suffice as a good guide in lieu of a front end.

10/19/2011 7:20 pm  
Blogger Vic Ferrari said...


You should just be able to use the scoring chance script. If you trial run that you'll see a mammoth url in PHP format. Just write a script to convert your csv data into that PHP URL and it should work.

I might have included a limit on the number of scoring chances allowed per game, but I don't think so. Let me know if that works.

10/20/2011 6:57 pm  
Blogger BSH EricT said...

The idea of putting 200+ entries into a URL strikes me as hilarious, but you're right, that should be doable. Thanks for the suggestion.

10/20/2011 7:04 pm  
Blogger Vic Ferrari said...


Thanks for the link, Red Line Station is a good blog. The guy is hardcore, I've added his site to my feed reader.

That post pretty much sums it up. I'll provide a link to that at timeonice when I think of it. RedLineStation should change the scoring chance link from xsc20.php to xsc30.php, beyond that it's good.

Would be cool if someone fluent in HTML offered to draft a front end ... but that's too much to hope for. This will do.


10/20/2011 7:04 pm  
Blogger Vic Ferrari said...

mplayershots app has been up for a couple of days, btw.

10/21/2011 12:48 pm  
Blogger Josh said...

Vic, quick issue for you. I'm tracking the Stars chances for the SCP and DefendingBigD, and I was getting crazy outputs from the app.

It looks like something weird happened with this game file:

Scroll down to the bottom and over to the right. Five players' data goes on t0 84 minutes with registered ice time.

10/22/2011 9:35 am  
Blogger Vic Ferrari said...


Like the DbigD blog, it's been good for a long time.

In this case it looks like the NHL scorer screwed up. It happens. They show Lehtonen not playing at all in the third period, this according to the TOI sheets. Just change the "V" to an "H" to get the home team's numbers.

My xsc30.php script only uses two data sheets, the home and visitor TOI sheets ... if they fail, my script fails.

I could write an xsc31.php script that is exactly the same except it gets these sheets from instead of Then you could download the sheets. edit one of them them to add the missing goalie row (the only problem that's shown up so far, the same thing happens a few times a year) ... send them to me via email ... I'd upload them to and the xsc31.php script would work.

Anyone with similar problems in the future could do the same.

Follow me?

10/22/2011 12:01 pm  
Blogger Josh said...

If you can do that I'd be happy to edit it, and send it to you. I'm guessing the code isn't too difficult to decipher.

10/22/2011 7:39 pm  
Blogger Vic Ferrari said...

The only things the scoring chance script uses are the period, shift start and shift end columns. Those are the only things you need to edit.

In you case the file is TV020094 ... and the scorer had some blond moments at the end of the second. he doesn't record Lehtonen playing at all, and every Star on the ice had their shifts recorded as ending at 0:00 (the beginning of the period) instead of 20:00.

Use an HTML editor, Kompozer is free and works well.

I just editted the TOI file, took about 5 minutes to edit it ... though a bit longer than that to find the mistakes.

It should run at xsc31.php and xdennis31.php now.

In future I'll leave folks to edit their own and send them to me at vic dot ferrari at timeonice dot com. And drop a note here as well, because I don't check that email very often.

10/23/2011 11:02 am  
Blogger Olivier said...

Vic, I just had the exact same problem, the game #20143 scorer (Boston @ MTL oct 29) forgot Tukka Rask's shift in the second period.

I sent you the original TH20143.htm and the corrected TV20143.htm files at your timeonice dot com adress.

Simply reply here when the files are uploaded and I'll run the xsc31.php script.


10/30/2011 5:20 pm  
Blogger Vic Ferrari said...

Should work now, Olivier. Try the xdennis30.php.. url as xdennis31.php...

Let me know how it goes.

10/31/2011 4:47 pm  
Blogger Olivier said...

Worked perfectly.

Thanks Vic!

10/31/2011 5:03 pm  
Blogger garik16 said...

Vic, out of curiosity, is there any way to use your script to read what scoring chance recorders for a team have recorded?

My team, the Isles, just had a person start recording chances this year, and it's a pain to go through each of his posts to get the data in nice spreadsheet form. Any help?

Thanks for everything.

11/01/2011 1:32 pm  
Blogger Josh said...

Vic, has something changed for WOWY charts for the 11/12 season? I've been able to generate them for other seasons, but 1112 is taking me to a 404 page.

Am I just high?

1/11/2012 9:57 pm  
Blogger Cam Charron said...

Hey Vic-

On the timeonice scripts there's a bit of a bug in Vancouver and Phoenix's numbers. Games 20944 and 20836 were switched by the teams so 20944 is listed as coming before 20836.

The issue this has created is that the app doesn't record anything as having happened between games 20837 and 20943 without 20944 being included. As a result, when I did the tally for the Canucks: it lists Cody Hodgson as playing 55 games rather than 63 because he didn't play in 20944.

Is there an easy way to fix this bug or a way I can amend the URL to get around it?

2/29/2012 2:00 pm  
Blogger Brett Mitchell said...

Hi Vic,

Would be more than happy to throw together a nice front-end to your wealth of data; perhaps spice up your results too for sortable columns and whatnot?

Give me a shout at brett (dot) mitchell (at) gmail (dot) com and I can show you some ideas?



3/28/2012 2:32 pm  
Blogger Jim Philips said...

You are right but the experience helps a lot to get more into. I am an amateur but I really like to get a better understanding to improve. The first step is the price per head free trial

5/30/2013 11:31 pm  

Post a Comment

<< Home