1

Historical weekly stats for Hockey

Are historical weekly stats for players available for Fantasy Hockey? I tried the following query, but no stats are returned at all:

/fantasy/v2/player/248.p.1772/stats;type=week;week=1

Here's the response:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<fantasy_content xml:lang=\"en-US\" yahoo:uri=\"http://fantasysports.yahooapis.com/fantasy/v2/player/248.p.1772/stats;type=week;week=1\" xmlns:yahoo=\"http://www.yahooapis.com/v1/base.rng\" time=\"60.920000076294ms\" copyright=\"Data provided by Yahoo! and STATS, LLC\" xmlns=\"http://fantasysports.yahooapis.com/fantasy/v2/base.rng\">
<player>
<player_key>248.p.1772</player_key>
<player_id>1772</player_id>
<name>
<full>Martin St. Louis</full>
<first>Martin</first>
<last>St. Louis</last>
<ascii_first>Martin</ascii_first>
<ascii_last>St. Louis</ascii_last>
</name>
<editorial_player_key>nhl.p.1772</editorial_player_key>
<editorial_team_key>nhl.t.20</editorial_team_key>
<editorial_team_full_name>Tampa Bay Lightning</editorial_team_full_name>
<editorial_team_abbr>TB</editorial_team_abbr>
<uniform_number>26</uniform_number>
<display_position>RW</display_position>
<image_url>http://l.yimg.com/a/i/us/sp/v/nhl/players_l/20101123/1772.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=164&amp;hc=215&amp;q=100&amp;sig=QiUJlEONhFz_TmQWJSx6OA--</image_url>
<is_undroppable>0</is_undroppable>
<eligible_positions>
<position>RW</position>
</eligible_positions>
</player>
</fantasy_content>

If I make a normal query for season stats (e.g. /fantasy/v2/player/{player_key}/stats), I get the proper result.

Am I doing something wrong, or does the data even exist for hockey?

by
4 Replies
  • QUOTE (Scott @ Jun 29 2011, 03:30 PM) <{POST_SNAPBACK}>
    Are historical weekly stats for players available for Fantasy Hockey? I tried the following query, but no stats are returned at all:

    /fantasy/v2/player/248.p.1772/stats;type=week;week=1

    Here's the response:

    <?xml version=\"1.0\" encoding=\"UTF-8\"?>
    <fantasy_content xml:lang=\"en-US\" yahoo:uri=\"http://fantasysports.yahooapis.com/fantasy/v2/player/248.p.1772/stats;type=week;week=1\" xmlns:yahoo=\"http://www.yahooapis.com/v1/base.rng\" time=\"60.920000076294ms\" copyright=\"Data provided by Yahoo! and STATS, LLC\" xmlns=\"http://fantasysports.yahooapis.com/fantasy/v2/base.rng\">
    <player>
    <player_key>248.p.1772</player_key>
    <player_id>1772</player_id>
    <name>
    <full>Martin St. Louis</full>
    <first>Martin</first>
    <last>St. Louis</last>
    <ascii_first>Martin</ascii_first>
    <ascii_last>St. Louis</ascii_last>
    </name>
    <editorial_player_key>nhl.p.1772</editorial_player_key>
    <editorial_team_key>nhl.t.20</editorial_team_key>
    <editorial_team_full_name>Tampa Bay Lightning</editorial_team_full_name>
    <editorial_team_abbr>TB</editorial_team_abbr>
    <uniform_number>26</uniform_number>
    <display_position>RW</display_position>
    <image_url>http://l.yimg.com/a/i/us/sp/v/nhl/players_l/20101123/1772.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=164&amp;hc=215&amp;q=100&amp;sig=QiUJlEONhFz_TmQWJSx6OA--</image_url>
    <is_undroppable>0</is_undroppable>
    <eligible_positions>
    <position>RW</position>
    </eligible_positions>
    </player>
    </fantasy_content>

    If I make a normal query for season stats (e.g. /fantasy/v2/player/{player_key}/stats), I get the proper result.

    Am I doing something wrong, or does the data even exist for hockey?

    Hrrrm. So, we don't aggregate week-by-week stats for players in NHL, MLB, or NBA unless you're in a team context, and even then, we only do it for H2H leagues. At the league-independent level like you're trying to query, you'd only be able to pull out date stats, season stats, or a couple of "relative to today" collections like "lastweek" or "lastmonth". You could potentially query each day and sum the stats yourself, though you'd need to recalculate all of the composite stats on your own. Was there a particular reason that you wanted to see weekly stats for a player (versus daily stats)?

    Note: for NFL, that type of query would work fine, since we index everything by week instead of date for NFL.
    1
  • QUOTE (Sean Montgomery @ Jul 18 2011, 09:42 PM) <{POST_SNAPBACK}>
    Hrrrm. So, we don't aggregate week-by-week stats for players in NHL, MLB, or NBA unless you're in a team context, and even then, we only do it for H2H leagues. At the league-independent level like you're trying to query, you'd only be able to pull out date stats, season stats, or a couple of "relative to today" collections like "lastweek" or "lastmonth". You could potentially query each day and sum the stats yourself, though you'd need to recalculate all of the composite stats on your own. Was there a particular reason that you wanted to see weekly stats for a player (versus daily stats)?

    Note: for NFL, that type of query would work fine, since we index everything by week instead of date for NFL.


    I was thinking about trying to chart player performance week-by-week, to help make roster decisions. Honestly, I haven't really though it out yet, as I'm still working on my Yahoo API project in clojure, but I think it would be interesting to view a player's performance over time. Currently, I'm interested in historical stats (i.e. last season), but I'd probably want to do this during next season as well.

    Is there a better way of going about this?
    0
  • Unfortunately, at the time, there isn&#39;t really a better way of going about that. We just don&#39;t track week-by-week statistical data for our NHL, MLB, or NBA games, unless you&#39;re in a team context in an H2H league (and then only the stats earned by the players for the team, ie, not counting if they were benched). We only have day-by-day statistical data for those games.
    0
  • I am also interested in hockey points, but in real time. I have bot this working for basketball, but cannot figure out how to do it for hockey.   Any pointers you could give would be greatly appreciated.  Thank you.
    1

Recent Posts

in Fantasy Sports API