Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size_by argument to model_tree() #720

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Commits on Sep 30, 2024

  1. Add size_by argument to model_tree()

     - Allows users to control the node sizing by a particular column present in `.log_df`
    
     - Important to note that `ofv` cant be used without first calling `add_summary()`, which is consistent with the previous behavior of `color_by` and `include_info`
    
     - This argument does support logical columns, however I noticed that the normalized sizing can differ here depending when the first `TRUE` value originates. If it's the first value, all the nodes appear smaller. Anywhere else and the "base size" is larger. This observation is likely true for numeric columns too, though is less apparent when the values are all closer to each other.
        - `collapsibleTree::collapsibleTreeNetwork` is only intended to support numeric columns for sizing, so I opted to map these values to: TRUE=5, FALSE=1, NA=3 for the time being. We may want to revisit NA values for both numeric and logical columns
    
     - Added examples to docs
    barrettk committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    55f6d44 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Add tests for new size_by argument

     - While the implementation and tests are done, I think we still want to revist the NA handling, which also impacts the "start" node size.
    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    ca905f7 View commit details
    Browse the repository at this point in the history
  2. bug fix: coloring for numeric columns

     - While updating the vignette, I noticed that the size_by and color_by arguments occasionally didnt line up for numeric columns. Numeric columns need to be sorted first so the right colors are assigned. This was previously "tested" using the character 'run' column, though was more observable when testing against objective function values (which dont necessarily appear in ascending/descending order)
    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    6d11e25 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    af33e7b View commit details
    Browse the repository at this point in the history
  4. Restore previous sizing if size_by is not provided

     - uses leafCount, which makes the nodes containing more child nodes, larger
    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    b266693 View commit details
    Browse the repository at this point in the history
  5. Update vignette to include new example

     - Improve formatting of code in some cases
    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    d5bd396 View commit details
    Browse the repository at this point in the history
  6. add font_size argument

    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    93b003e View commit details
    Browse the repository at this point in the history
  7. Formatting fix: dont display tooltips for 'start' node

     - They were always NA previously
    barrettk committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    fc65532 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6913820 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Dont support logical columns, improve error formatting

     - Adds additional tests when required or specified columns are missing
    
     - doc adjustments
    barrettk committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    f6e6554 View commit details
    Browse the repository at this point in the history
  2. Include color_by and size_by columns in include_info

     - If color_by or size_by is specified, ensure these columns are also part of the tooltip. This avoids the need for specifying new columns (e.g., 'Out of Date') in both the tooltip and color_by
    barrettk committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    7acae5f View commit details
    Browse the repository at this point in the history
  3. vignette and test helper function fixes

     - doc and text adjustments
     - Revert change from previous commit (comment it out) until a decision has been made.
    barrettk committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    6dce4d8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    48ca4e0 View commit details
    Browse the repository at this point in the history