Skip to content

Use dittoViz#162

Open
dtm2451 wants to merge 5 commits into
develfrom
dittoviz-use
Open

Use dittoViz#162
dtm2451 wants to merge 5 commits into
develfrom
dittoviz-use

Conversation

@dtm2451

@dtm2451 dtm2451 commented Oct 7, 2025

Copy link
Copy Markdown
Owner

This update achieves a longstanding goal of replacing the bulk of dittoSeq innards with their dittoViz counterparts

Follows dittoViz branch 'dittoSeq-align', which has now been merged and become dittoViz-v1.0.5

Merge Timing: Now that dittoViz-v1.0.5 has been released through CRAN, I plan to merge this PR very soon!

Generally, dittoViz equivalents encompass ALL plotting functionalities of their dittoSeq counterpart. Thus, updates here allow dittoSeq functions to simplify down HEAVILY to just:

  1. Extract all needed data elements from the 'object' into a single dataframe
  2. Resolve any labeling defaults that dittoViz might resolve differently
  3. Pass to dittoViz

Update Details

Tests pass but careful before vs after comparison not yet complete so the summary below should be expected to change!

Initial Implementation Achieves:

  • Primarily replaces direct visualization code with dittoViz implementations:
    • dittoViz::barPlot() for dittoBarPlot()
    • dittoViz::freqPlot() for dittoFreqPlot()
    • dittoViz::yPlot() for dittoPlot() and dittoPlotVarsAcrossGroups()
    • dittoViz::scatterPlot() for dittoDimPlot() and dittoScatterPlot()
    • dittoViz::scatterHex() for dittoDimHex() and dittoScatterHex()
  • Includes features adds already available in dittoViz:
    • Expanded 'add.line' & 'add.(x|y|ab)line' capabilities
    • Optional swapping to number-based on-plot labeling with 'labels.use.numbers' wherever 'do.label' is available.
    • Added 'data.only' option for dittoBarPlot() and dittoFreqPlot()
    • Expanded default data plotting for 'do.hover' behavior with rounding of numbers past 'hover.round.digits' number of digits.

Also includes some feature changes:
- loss of separated from 'var' adjustment control for dittoScatterPlot() and dittoScatterHex() 'extra.vars'
- standardized column names within 'data.out' dataframe returns have been replaced with use of original, or modified-off-original, column names and a separate $cols_use output naming the column mappings
- others?

ToDo HERE:

  • add dittoViz version 1.0.5+ requirement
  • Assess 'data.out' element names, and update docs
  • Completed pass on 'data.out' / 'data.only' documentation
  • Assess reverse dependencies
    • re-export dittoColors insted of removing it from dittoSeq
  • Testing for added features:
    • 'add.line' & 'add.(x|y|ab)line'
    • 'labels.use.numbers'
    • 'data.only'

ToDo before full release:

  • Assess and improve 'hover.data' defaults
  • Bring back adjustments for 'extra.vars'? Never seemed useful.
  • Docs should note adjustments now work for metadata
  • Attach implementation of function-based adjustments via '*.adj.fxn' inputs? Feels potentially more confusing than helpful.
  • Full updates to '@details' sections that adds extraction -> dittoViz details
  • Check/improve passage of group aesthetic for sub-grouped yPlot representations

* Primarily replaces direct visualization code with dittoViz
  implementations:
    * dittoViz::barPlot() for dittoBarPlot()
    * dittoViz::freqPlot() for dittoFreqPlot()
    * dittoViz::yPlot() for dittoPlot() and dittoPlotVarsAcrossGroups()
    * dittoViz::scatterPlot() for dittoDimPlot() and dittoScatterPlot()
    * dittoViz::scatterHex() for dittoDimHex() and dittoScatterHex()
* Includes features adds available in dittoViz:
    * Expanded 'add.line' & 'add.(x|y|ab)line' capabilities
    * Optional swapping to number-based on-plot labeling with
      'labels.use.numbers' wherever 'do.label' is available.
    * Added 'data.only' option for dittoBarPlot() and dittoFreqPlot()
    * Expanded default data plotting for 'do.hover' behavior with
      rounding of numbers past 'hover.round.digits' number of digits.
* Some feature-loss:
    * separate from 'var' adjustment control for scatter 'extra.vars'
    * standardized column names within 'data.out' dataframe returns have
      been replaced with use of original, or modified-off-original, column
      names and a separate $cols_use output naming the column mappings
    * others?

**Tests pass but careful before vs after comparison not yet complete**

Squashed commit of the following:

commit 346979da5ed7de97b728e71c04ac47f74ac1e869
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Tue Oct 7 11:33:33 2025 -0400

    missed docs, imports cleanup

commit 505f6e5ecd67aa5cc9063b80b2f5f8415ffff4c1
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Tue Oct 7 01:31:35 2025 -0400

    finish initial implementation

commit 286861ec638d69ea1e78b4d7b109cb0d39a061a2
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Tue Oct 7 00:39:13 2025 -0400

    continue initial implementation

commit c20b461d7312e59b61c442a5bdb3e433b0989572
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Mon Oct 6 22:53:51 2025 -0400

    continue initial implementation

commit 3b5a7ff02ed00798dbbd7e8f079bb394a2916cfe
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Mon Oct 6 21:26:54 2025 -0400

    continue initial implementation

commit 3baf4db7d061edc95b53fc8838872e069dde88f5
Author: dtm2451 <daniel.bunis@ucsf.edu>
Date:   Mon Oct 6 18:54:19 2025 -0400

    initial implementation
@dtm2451 dtm2451 changed the title Squash of initial dittoViz implementation Use dittoViz Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant