Zemmels review: updates to rolling average function
This issue is to improve consistency in how the data_type argument is being used: just the same value in both the function and documentation. Unlcear at the moment which is the best approach: need to investigate further. Also change the argument name from data_type to window_size.
Here are the two comments from #96 (closed):
The definition of the data_type
argument in the rolling_average
function documentation doesn't appear to match its usage in the ipynb examples. The documentation indicates that the argument must be a string like "7D"
, but I've yet to see it be set to anything other than an integer like 7
. Could this be clarified in the argument description?
Further, is there a more expressive name for the argument than data_type? I think this term connotes something different in general programming lingo. Maybe "window_size" or something similarly evocative is more appropriate?
Really appreciate this comment and agree. We have changed the input name to 'window_width' in functions accepting strings such as 'daily', '7-day', '14-day', etc. For the rolling_average utils function itself, we have changed the input to simply 'window', which differentiates it from the more verbose 'window_width', but is clearer than 'data_type'. We have also standardized the use of 'window' throughout the package documentation to take the form of a timedelta, like '1D', '7D', '28D', etc.