microsoft / wpa

R package for analyzing and visualizing data from Microsoft Workplace Analytics
https://microsoft.github.io/wpa
Other
30 stars 10 forks source link

Discussion: person-averaging for `flex_index()` components #134

Open martinctc opened 3 years ago

martinctc commented 3 years ago

Problem

When calculating the components for the Flexibility Index in flex_index() , i.e. TakeBreaks, ControlHours, and ChangeHours, the current "table" return calculates the percentages per org without person averaging. This means that the interpretation of the outputs would be,

x % of work weeks in Org A involve habitual breaks being taken.

Whilst this output is simple to understand/interpret, it is inconsistent with other functions in the package, e.g. create_bar(), where the person-averaging approach is always used. This means that an average for the person is first calculated, and that average for the org is then re-calculated using those person-averages.

Solution

The alternative output is for the "table" return to calculate the percentages per org using person averaging. The interpretation would then become:

On average, employees in Org A take breaks y % of the time.

Possible solutions

There are three possible options:

  1. Stick to the current method without person-averaging.

  2. Apply the new person-averaging method, replacing the old calculation. Note that this will be a breaking change to the package, and users will need to manipulate on the "data" output themselves to reproduce old calculations.

  3. Enable both options with an additional argument, such as "pavg" which can either be set to TRUE or FALSE. Alternatively, we can allow an additional return option of "table-pavg", which will calculate the table with person averaging. This may increase the complexity of the function, but will offer the largest range of flexibility (!) to the user.

Would love to hear any additional feedback on this proposed change.

rosamaryo commented 3 years ago

Good call out! Option #3 would be my preference. This came up with a customer when explaining the measure, but because they understood that people may be shifting from taking breaks one week, but not the next they were comfortable with the current methodology. Although to your point, I think the KPI would be more impactful if we could express as % of employees vs % of workweeks.