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

Closes #1636 allows Visualize_Metric() to run on just results #1833

Merged
merged 19 commits into from
Sep 23, 2024
Merged

Conversation

zdz2101
Copy link
Collaborator

@zdz2101 zdz2101 commented Sep 11, 2024

Overview

  • Widget_Barchart() , Widget_Scatterplot(), Widget_TimeSeries() should be able to run on just results
  • Logic was introduced with the use of insertion of NULL and if(is.null()) to allow Visualize_Metric() to run on just the results as well

Test Notes/Sample Code

@zdz2101 zdz2101 linked an issue Sep 11, 2024 that may be closed by this pull request
strGroupLevel = lMetric$GroupLevel
)
if(!is.null(dfGroups)) {
lCharts$metricTable <- Report_MetricTable(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lauramaxwell do you know if Report_MetricTable() is meant to be one of the visualizations that can be rendered with just results? If so, I think I need to make some modifications there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, although we should always have participant counts. Still if it's not too much effort this is a good candidate to optionalize group metadata.

strGroupLevel = c("Site", "Country", "Study"),
strGroupDetailsParams = NULL,
vFlags = c(-2, -1, 1, 2)
) {
if(!is.null(dfGroups)) {
Copy link
Collaborator Author

@zdz2101 zdz2101 Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samussiah was this what you had in mind? Or was it even allow add_Groups_metadata() to run regardless with NULL values? If the latter, that looks non-trivial, especially the widen_dfGroups() utility function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I had in mind!

Merge remote-tracking branch 'origin/dev' into fix-1636
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@zdz2101 zdz2101 marked this pull request as ready for review September 12, 2024 16:45
Copy link
Contributor

@samussiah samussiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there @zdz2101 - Report_MetricTable looks great, but if dfBounds or dfMetrics aren't passed into Visualize_Metric the function bombs where it filters on strMetricID. btw I added a little logic to the individual widgets to more robustly handle the data type of lMetric, so make sure you pull the latest commit.

strGroupLevel = c("Site", "Country", "Study"),
strGroupDetailsParams = NULL,
vFlags = c(-2, -1, 1, 2)
) {
if(!is.null(dfGroups)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly what I had in mind!

@zdz2101 zdz2101 requested a review from samussiah September 17, 2024 17:07
Copy link
Contributor

@samussiah samussiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everyone wants options 🥇

@samussiah samussiah merged commit 612dd52 into dev Sep 23, 2024
5 checks passed
@samussiah samussiah deleted the fix-1636 branch September 23, 2024 14:15
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.

Feature: Make parameters optional in Visualize_Metric()
2 participants