Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wokenny13
Copy link
Collaborator

Current progress on addressing the legend labels in TADA_TwoCharacteristicScatterplot. See previous comments for details.

…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
@hillarymarler
Copy link
Collaborator

@wokenny13 - it looks like there are some check failures related to use of this function in at least one vignette? Do you want to try and troubleshoot that before I review? Or do you want me to look into it/correct it as part of my review?

@wokenny13
Copy link
Collaborator Author

@hillarymarler I think it would be good practice for me to try to troubleshoot the issues found in the checks on my own.

However, do you think it would be appropriate for you to review the functionality of the TADA_TwoCharacteristicScatterplot updates, to determine if it functions appropriately, or if the updated arguments to the function should be included/excluded, prior to updating any vignette with changes that were made to the TADA_TwoCharacteristicScatterplot first?

-Or should a pull request only be made if all checks can be passed first?

@hillarymarler
Copy link
Collaborator

@wokenny13 - I can review the function updates while you are working on check issues related to vignette(s). I'll take a look either later this afternoon or first thing tomorrow morning and we can discuss during our working session tomorrow.

Copy link
Collaborator

@hillarymarler hillarymarler left a comment

Choose a reason for hiding this comment

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

From a functionality standpoint, your changes make sense. I'll run a few more examples to see if I come up with any additional questions before we meet to discuss.

Overall, I think the documentation and param names could be updated to provide clarity for the user. I think we may want to consider some constraints on the columns that users can select for various arguments. For example, limiting id_cols to TADA.CharacteristicName, CharacteristicName, or TADA.ComparableDataIdentifier (or just TADA.ComparableDataIdentifier?). I think we should also consider what should happen if a user provides only one "group".

Great work so far!

R/Figures.R Outdated
#' TADA_TwoCharacteristicScatterplot(df, id_cols = "MonitoringLocationName", groups = c("Upper Red Lake: West", "Upper Red Lake: West-Central"))
#'
TADA_TwoCharacteristicScatterplot <- function(.data, id_cols = "TADA.ComparableDataIdentifier", groups) {
TADA_TwoCharacteristicScatterplot <- function(.data, id_cols = "TADA.ComparableDataIdentifier", groups, id_cols2 = NULL, groups2 = NULL) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the new params have more descriptive names? Should group be characteristic(s) and groups2 by groups?

R/Figures.R Outdated
#' data(Data_6Tribes_5y_Harmonized)
#' # Filter the example data so it includes only one TADA.ComparableDataIdentifier
#' df <- dplyr::filter(Data_6Tribes_5y_Harmonized, TADA.ComparableDataIdentifier == "TOTAL PHOSPHORUS, MIXED FORMS_UNFILTERED_AS P_MG/L")
#' # Creates a scatterplot including the two specified sites in the same plot:
Copy link
Collaborator

Choose a reason for hiding this comment

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

New params need to be added in function description. Will there be a list of allowable values for the new params? Or can the user enter any column name as a group?

R/Figures.R Outdated
stop("The 'groups' vector contains one or more inputs that are not found within your input dataset. Check spelling and try again.")
}

# check that groups are length two for comparing two characteristics
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reword comment? Do the groups need to be two characteristics? Couldn't you be comparing one characteristic at two locations?

R/Figures.R Outdated

# check that groups are length two for comparing two characteristics
if (length(groups) != 2) {
stop("The 'groups' vector does not contain two characteristics to compare.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this first "groups" param be able to accept only one characteristic? For cases when you want to compare one characteristic at multiple locations?

R/Figures.R Outdated
}
}

# check that groups2 are length two for comparing two groups
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should the function generate a plot anyway if there is only one group? There wouldn't be a comparison, but it seems like a plot could still be generated? Or should the message prompt the user to use TADA_Scatterplot?

hillarymarler and others added 10 commits July 8, 2024 06:57
…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
Handles other scenarios such as user inputs to specify characteristic and handle missing groups arguments using top 4 by counts
@hillarymarler
Copy link
Collaborator

Thanks for adding that new function and linking the issue. I'll review changes to scatterplot function and NA removal function tomorrow!

change name of function to remove NAs from title strings
Changed name of TADA_MultiScatterplot to TADA_GroupedScatterplot
Updated error messages and notes to provide more specific information to user
Update examples for TADA_CharStringRemovNA
used TADA_CharStringRemoveNA in TAD_DepthProfilePlot
Added TADA_CharStringRemoveNA for boxplot, histogram
Documentation and code comments updates
@wokenny13
Copy link
Collaborator Author

newplot
Do you think this color schema works better when 4 plots are plotted? I changed the color palette for parmC and parm D to try to make it more visually pleasing. I haven't pushed this commit though so you can view what it currently looks like and let me know your thoughts

@hillarymarler
Copy link
Collaborator

I like that color update!

wokenny13 and others added 2 commits July 26, 2024 13:00
…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
@wokenny13
Copy link
Collaborator Author

I've pushed the small changes through, with editing some of the coloring and remove the rm(depthcols) line. The checks have gone through.

  • I will keep a note, or post an issue, to consider adding a figure title for the legends in a future update for TADA.GroupedScatter. And take note to address potential TADA color palette consistency pairings.

@hillarymarler hillarymarler merged commit 00dbc2e into develop Jul 29, 2024
@hillarymarler hillarymarler deleted the 485-tadacomparabledataidentifier-is-used-for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols branch July 29, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants