Refactor: improvements on workingpatterns_classify_bw() #215
Merged
Conversation
Create a temporary function to refactor function. Required in order to ensure reproducibility of results.
Improved variable names, and solved a classification issue
directly changing `workpatterns_classify()` instead
This was
linked to
issues
May 30, 2022
Plus improve documentation on code
Using only a single set of personas, but updating these to eight archetypes to ensure consistent representation of flexibility.
applied to "prop" method
Implement this on binary method
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch improves the existing
workpatterns_classify_bw()to:Note that this branch introduces several breaking changes. This pull request mainly addresses #216 and the intention is to bundle this PR in the release of
v1.8.0.Package version is incremented
v1.7.0.9000.Changes
The changes made in this PR are:
This new archetype satisfies the mutually exclusive, collectively exhaustive (MECE) principle, and addresses certain ambiguities of for instance, whether standard hour continuous is technically 'standard hours'. Previously, the output archetypes were:
The algorithm for
workpatterns_classify_bw()is streamlined, and now there is an option for user to supply expected hours worked (exp_hours) as an argument. Previously, this was calculated as a simple difference betweenstart_hourandend_hour, which may not necessarily be appropriate for all scenarios (e.g. lunch breaks).Adds the ability of
workpatterns_rank()to return heatmapped plots instead of binary plots.workpatterns_report()retains binary plots. (Refactor: improvements onworkingpatterns_classify_bw()#215)Captions contain more parameter information when running
workpatterns_classify()(Feature request: print parameters in captions for working patterns visualizations #137)Provide a
modeoption inworkpatterns_rank()andflex_index()that will enable heatmapped plots. (Feature request: heatmap visual forflex_index()#212)Relevant functions now use a single plotting backend function
plot_hourly_pat().workpatterns_classify()andflex_index()Checks
roxygen2::roxygenise()has been run prior to merging to ensure that.RdandNAMESPACEfiles are up to date.NEWS.mdhas been updated.Notes
This fixes #137, #153, #187, #215, and #216.