jimmyday12 / fitzRoy

A set of functions to easily access AFL data
https://jimmyday12.github.io/fitzRoy
Other
129 stars 27 forks source link

Calculate Footywire rounds from HTML rather than calendar weeks #134

Closed cfranklin11 closed 4 years ago

cfranklin11 commented 4 years ago

Resolves #130

This uses the round labels in Footywire's tables to calculate round numbers for the data sets rather than using incrementing calendar weeks. Overall, I think it simplifies the code a bit, especially since it makes correcting all the special exceptions no longer necessary. The necessary addition of of reduce to insert cumulative round names into the raw match/betting data adds a bit of complexity, but I think it's still better on net.

An added benefit of this change is that it reduces maintenance costs, as the AFL's penchant for creative fixtures don't require one-off fixes anymore.

While working on this, I noticed that Season.Game wasn't being calculated correctly, so I fixed that while I was in the neighbourhood.

jimmyday12 commented 4 years ago

Awesome! Looks good to me and passing all tests so I'll merge in now