-
Notifications
You must be signed in to change notification settings - Fork 23
485 tadacomparabledataidentifier is used for legend labels in tada twocharacteristicscatterplot uses a different column for id cols #490
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
485 tadacomparabledataidentifier is used for legend labels in tada twocharacteristicscatterplot uses a different column for id cols #490
Conversation
Fixed param filters, reduced size of markers, return an error message if NA found
…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
|
@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? |
|
@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? |
|
@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. |
hillarymarler
left a comment
There was a problem hiding this 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) { |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
…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
|
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
|
I like that color update! |
…for-legend-labels-in-tada_twocharacteristicscatterplot-uses-a-different-column-for-id_cols
|
I've pushed the small changes through, with editing some of the coloring and remove the rm(depthcols) line. The checks have gone through.
|
Current progress on addressing the legend labels in TADA_TwoCharacteristicScatterplot. See previous comments for details.