Skip to content

Commit

Permalink
Merge branch 'develop' into 319-getting-all-combinations-of-character…
Browse files Browse the repository at this point in the history
…istic-fraction-speciation-unit-in-harmonization-table
  • Loading branch information
hillarymarler committed Jul 29, 2024
2 parents 6ad0052 + 00dbc2e commit a0e42f3
Show file tree
Hide file tree
Showing 8 changed files with 656 additions and 120 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export(TADA_AutoFilter)
export(TADA_BigDataRetrieval)
export(TADA_Boxplot)
export(TADA_CalculateTotalNP)
export(TADA_CharStringRemoveNA)
export(TADA_ColorPalette)
export(TADA_ConvertDepthUnits)
export(TADA_ConvertResultUnits)
Expand Down Expand Up @@ -51,6 +52,7 @@ export(TADA_GetTemplate)
export(TADA_GetUSGSSynonymRef)
export(TADA_GetUniqueNearbySites)
export(TADA_GetWQXCharValRef)
export(TADA_GroupedScatterplot)
export(TADA_HarmonizeSynonyms)
export(TADA_Histogram)
export(TADA_IDCensoredData)
Expand Down
90 changes: 36 additions & 54 deletions R/DepthProfile.R
Original file line number Diff line number Diff line change
Expand Up @@ -1136,15 +1136,12 @@ TADA_DepthProfilePlot <- function(.data,
data = param1,
x = ~TADA.ResultMeasureValue,
y = ~TADA.ConsolidatedDepth,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param1$TADA.ResultSampleFractionText[1], " ",
param1$TADA.CharacteristicName[1], " ",
param1$TADA.MethodSpeciationName[1], " ",
"(", param1$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param1$TADA.ResultSampleFractionText[1], " ",
param1$TADA.CharacteristicName[1], " ",
param1$TADA.MethodSpeciationName[1], " ",
"(", param1$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
marker = list(
size = 10,
color = tada.pal[10]
Expand Down Expand Up @@ -1173,15 +1170,12 @@ TADA_DepthProfilePlot <- function(.data,
plotly::add_lines(
y = param1$TADA.ResultMeasureValue[1],
x = xrange,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param1$TADA.ResultSampleFractionText[1], " ",
param1$TADA.CharacteristicName[1], " ",
param1$TADA.MethodSpeciationName[1], " ",
"(", param1$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param1$TADA.ResultSampleFractionText[1], " ",
param1$TADA.CharacteristicName[1], " ",
param1$TADA.MethodSpeciationName[1], " ",
"(", param1$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
showlegend = TRUE,
line = list(color = tada.pal[10], dash = "dash"),
hoverinfo = "text",
Expand All @@ -1208,15 +1202,12 @@ TADA_DepthProfilePlot <- function(.data,
data = param2,
x = ~TADA.ResultMeasureValue,
y = ~TADA.ConsolidatedDepth,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param2$TADA.ResultSampleFractionText[1], " ",
param2$TADA.CharacteristicName[1], " ",
param2$TADA.MethodSpeciationName[1], " ",
"(", param2$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param2$TADA.ResultSampleFractionText[1], " ",
param2$TADA.CharacteristicName[1], " ",
param2$TADA.MethodSpeciationName[1], " ",
"(", param2$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
marker = list(
size = 10,
color = tada.pal[12]
Expand Down Expand Up @@ -1245,15 +1236,12 @@ TADA_DepthProfilePlot <- function(.data,
plotly::add_lines(
y = param2$TADA.ResultMeasureValue[1],
x = xrange,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param2$TADA.ResultSampleFractionText[1], " ",
param2$TADA.CharacteristicName[1], " ",
param2$TADA.MethodSpeciationName[1], " ",
"(", param2$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param2$TADA.ResultSampleFractionText[1], " ",
param2$TADA.CharacteristicName[1], " ",
param2$TADA.MethodSpeciationName[1], " ",
"(", param2$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
# inherit = FALSE,
showlegend = TRUE,
line = list(color = tada.pal[12], dash = "dash"),
Expand Down Expand Up @@ -1281,15 +1269,12 @@ TADA_DepthProfilePlot <- function(.data,
data = param3,
x = ~TADA.ResultMeasureValue,
y = ~TADA.ConsolidatedDepth,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param3$TADA.ResultSampleFractionText[1], " ",
param3$TADA.CharacteristicName[1], " ",
param3$TADA.MethodSpeciationName[1], " ",
"(", param3$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param3$TADA.ResultSampleFractionText[1], " ",
param3$TADA.CharacteristicName[1], " ",
param3$TADA.MethodSpeciationName[1], " ",
"(", param3$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
marker = list(
size = 10,
color = tada.pal[11]
Expand Down Expand Up @@ -1318,15 +1303,12 @@ TADA_DepthProfilePlot <- function(.data,
plotly::add_lines(
y = param3$TADA.ResultMeasureValue[1],
x = xrange,
name = stringr::str_remove_all(stringr::str_remove_all(
stringr::str_remove_all(paste0(
param3$TADA.ResultSampleFractionText[1], " ",
param3$TADA.CharacteristicName[1], " ",
param3$TADA.MethodSpeciationName[1], " ",
"(", param3$TADA.ResultMeasure.MeasureUnitCode[1], ")"
), stringr::fixed(" (NA)")),
stringr::fixed("NA ")
), stringr::fixed(" NA")),
name = TADA_CharStringRemoveNA(paste0(
param3$TADA.ResultSampleFractionText[1], " ",
param3$TADA.CharacteristicName[1], " ",
param3$TADA.MethodSpeciationName[1], " ",
"(", param3$TADA.ResultMeasure.MeasureUnitCode[1], ")"
)),
# inherit = FALSE,
showlegend = TRUE,
line = list(color = tada.pal[11], dash = "dash"),
Expand Down
Loading

0 comments on commit a0e42f3

Please sign in to comment.