-
Notifications
You must be signed in to change notification settings - Fork 23
Color Palette Set Up #462
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
Color Palette Set Up #462
Conversation
Draft function working other than displaying "adding missing grouping variables" - need to figure out where that is coming from
Documentation and print message updates
Update CharacteristicName to TADA.CharacteristicName in function
updated print messages for daily agg options
updates to documentation and remove intermediate objects
Added clean option for returning data frame. Style updates.
Added depth column info to documentation, changed clean to aggregatedonly, specified location types in documentation
Updated dailyagg and documentation, made sure depthcat.list was used throughout function, updated printed messages to match updated dailyagg
fixed error in example
Added option for user to input meters from surface/bottom that should be considered for surface and bottom samples.
started work on creating depth profile figure
Figure updates and fixed length units issue in WQX ref table. Target unit is m only for length units
update to add TADA.ConsolidatedDepth to flag function
|
My thoughts so far:
Yes I will add those to require.cols in RequiredCols.R
This is not difficult technically, but I will do that separately as I will need seem time to figure out which colors to add so that the palette remains colorblind accessible
Yes, I'll change this
Yes, I'll change this
I have noticed that the order of the colors in the palette does not seem to determine which colors are selected first in TAD_FieldValuesPie. I think we should specify the order we want the colors used in, but it may need to happen within the plotly functions used to create the figure. I think there is a way to tell it to use the colors in order from the palette or specify the order within the function. I'll take a look at this and figure out the best place to do it. |
Updated TADA_DepthCategory.Flag to TADA_FlagDepthCategory to keep naming convention consistent with rest of package
Updates for TADA_FlagDepthCategory documentation and for documentation for other functions that use it
Added columns created in TADA_FlagDepthCategory to required cols
Changed outline for makers to a darker orange color (#7 from tada palette)
Change outline to dark blue (tada.pal[6])
Updated colors in TADA_TwoCharacteristicScatterplot and TADA_FieldValuesPie, some updates to TADA_ColorPalette to expand color palette
Did not modify ATTAINS map colors, reverted to original colors
Control colors by using add_boxplot
All boxplot features working correctly in simplified code (no need to use add_boxplot)
Fix so that correct number of colors are assigned for data set
Modified palette to agree with viewATTAINS map colors (slight changes) and hard-coded color choices into a palette rather than relying on a color ramp off an existing palette
updated to reflect additional distinct colors in pie chart
Updated color ramp function to build larger color palette to run off new tada palette, not default palette
@cristinamullin should "null" be the default for surfacevalue and bottomvalue in this function? |
|
I like what you have now (consistent with the default used to the categories) but null would work too.
From: hillarymarler ***@***.***>
Sent: Thursday, May 23, 2024 3:23 PM
To: USEPA/TADA ***@***.***>
Cc: Mullin, Cristina (she/her/hers) ***@***.***>; Mention ***@***.***>
Subject: Re: [USEPA/TADA] Color Palette Set Up (PR #462)
Caution: This email originated from outside EPA, please exercise additional caution when deciding whether to open attachments or click on provided links.
@hillarymarler<https://github.com/hillarymarler> I tried running TADA_DepthProfilePlot with the surfacevalue and bottomvalue null which currently produces as error message. Recommendation: update this so that when these inputs are null, the function returns the figure without the black horizontal lines and text on the figure marking surface, middle, and bottom.
TADA_DepthProfilePlot(Data_6Tribes_5y_Harmonized,
+ groups = c("TEMPERATURE_NA_NA_DEG C", "PH_NA_NA_NA", "DEPTH, SECCHI DISK DEPTH_NA_NA_M"),
+ location = "REDLAKE_WQX-ANKE",
+ activity_date = "2018-10-04",
+ surfacevalue = NULL,
+ bottomvalue = NULL)
[1] "TADA_DepthProfilePlot: Running TADA_DepthCategoryFlag function to add required columns to data frame"
[1] "TADA_DepthCategory.Flag: checking data set for depth values. 69516 results have depth values available."
[1] "TADA_DepthCategory.Flag: assigning depth categories."
[1] "TADA_DepthCategory.Flag: Grouping results by MonitoringLocationIdentifier, OrganizationIdentifier, CharacteristicName, and ActivityStartDate for aggregation for entire water column."
[1] "TADA_DepthCategory.Flag: No aggregation performed."
[1] "TADA_DepthProfilePlot: Depth unit in data set matches depth unit specified by user for plot. No conversion necessary."
[1] "TADA_DepthProfilePlot: Identifying available depth profile data."
[1] "TADA_DepthProfilePlot: Any results for DEPTH, SECCHI DISK DEPTH, DEPTH, SECCHI DISK DEPTH (CHOICE LIST), DEPTH, SECCHI DISK DEPTH REAPPEARS, DEPTH, DATA-LOGGER (NON-PORTED), DEPTH, DATA-LOGGER (PORTED), RBP STREAM DEPTH - RIFFLE, RBP STREAM DEPTH - RUN, THALWEG DEPTH match the depth unit selected for the figure."
Joining with `by = join_by(ActivityTypeCode, TADA.ActivityType.Flag, ActivityMediaName, TADA.ActivityMediaName,
ActivityMediaSubdivisionName, ResultSampleFractionText, TADA.ResultSampleFractionText, TADA.SampleFraction.Flag,
TADA.FractionAssumptions, CharacteristicName, TADA.CharacteristicName, TADA.CharacteristicNameAssumptions, SubjectTaxonomicName,
SampleTissueAnatomyName, MethodSpeciationName, TADA.MethodSpeciationName, TADA.MethodSpeciation.Flag,
TADA.SpeciationAssumptions, TADA.ComparableDataIdentifier, TADA.Harmonized.Flag, ActivityStartDate, ActivityStartTime.Time,
ActivityStartTime.TimeZoneCode, ActivityStartDateTime, ResultMeasureValue, TADA.ResultMeasureValue,
TADA.ResultMeasureValueDataTypes.Flag, ResultValueTypeName, TADA.ResultValueAboveUpperThreshold.Flag,
TADA.ResultValueBelowLowerThreshold.Flag, ResultMeasure.MeasureUnitCode, TADA.ResultMeasure.MeasureUnitCode,
TADA.WQXResultUnitConversion, TADA.ResultUnit.Flag, ResultDetectionConditionText, DetectionQuantitationLimitTypeName,
DetectionQuantitationLimitMeasure.MeasureValue, TADA.DetectionQuantitationLimitMeasure.MeasureValue,
TADA.DetectionQuantitationLimitMeasure.MeasureValueDataTypes.Flag, DetectionQuantitationLimitMeasure.MeasureUnitCode,
TADA.DetectionQuantitationLimitMeasure.MeasureUnitCode, TADA.CensoredData.Flag, TADA.CensoredMethod, TADA.ConsolidatedDepth,
TADA.ConsolidatedDepth.Unit, ResultDepthHeightMeasure.MeasureValue, TADA.ResultDepthHeightMeasure.MeasureValue,
TADA.ResultDepthHeightMeasure.MeasureValueDataTypes.Flag, ResultDepthHeightMeasure.MeasureUnitCode,
TADA.ResultDepthHeightMeasure.MeasureUnitCode, ResultDepthAltitudeReferencePointText, ActivityRelativeDepthName,
ActivityDepthHeightMeasure.MeasureValue, TADA.ActivityDepthHeightMeasure.MeasureValue,
TADA.ActivityDepthHeightMeasure.MeasureValueDataTypes.Flag, ActivityDepthHeightMeasure.MeasureUnitCode,
TADA.ActivityDepthHeightMeasure.MeasureUnitCode, ActivityTopDepthHeightMeasure.MeasureValue,
TADA.ActivityTopDepthHeightMeasure.MeasureValue, TADA.ActivityTopDepthHeightMeasure.MeasureValueDataTypes.Flag,
ActivityTopDepthHeightMeasure.MeasureUnitCode, TADA.ActivityTopDepthHeightMeasure.MeasureUnitCode,
ActivityBottomDepthHeightMeasure.MeasureValue, TADA.ActivityBottomDepthHeightMeasure.MeasureValue,
TADA.ActivityBottomDepthHeightMeasure.MeasureValueDataTypes.Flag, ActivityBottomDepthHeightMeasure.MeasureUnitCode,
TADA.ActivityBottomDepthHeightMeasure.MeasureUnitCode, ResultTimeBasisText, StatisticalBaseCode, ResultFileUrl,
ResultAnalyticalMethod.MethodName, ResultAnalyticalMethod.MethodDescriptionText, ResultAnalyticalMethod.MethodIdentifier,
ResultAnalyticalMethod.MethodIdentifierContext, ResultAnalyticalMethod.MethodUrl, TADA.AnalyticalMethod.Flag,
SampleCollectionMethod.MethodIdentifier, SampleCollectionMethod.MethodIdentifierContext, SampleCollectionMethod.MethodName,
SampleCollectionMethod.MethodDescriptionText, SampleCollectionEquipmentName, MeasureQualifierCode,
TADA.MeasureQualifierCode.Flag, TADA.MeasureQualifierCode.Def, ResultCommentText, ActivityCommentText, HydrologicCondition,
HydrologicEvent, DataQuality.PrecisionValue, DataQuality.BiasValue, DataQuality.ConfidenceIntervalValue,
DataQuality.UpperConfidenceLimitValue, DataQuality.LowerConfidenceLimitValue, SamplingDesignTypeCode, LaboratoryName,
ResultLaboratoryCommentText, ResultIdentifier, ActivityIdentifier, OrganizationIdentifier, OrganizationFormalName,
TADA.MultipleOrgDuplicate, TADA.MultipleOrgDupGroupID, TADA.ResultSelectedMultipleOrgs, TADA.SingleOrgDupGroupID,
TADA.SingleOrgDup.Flag, ProjectName, ProjectDescriptionText, ProjectIdentifier, ProjectFileUrl, QAPPApprovedIndicator,
QAPPApprovalAgencyName, CountryCode, StateCode, CountyCode, MonitoringLocationName, MonitoringLocationTypeName,
MonitoringLocationDescriptionText, LatitudeMeasure, TADA.LatitudeMeasure, LongitudeMeasure, TADA.LongitudeMeasure,
HorizontalCoordinateReferenceSystemDatumName, HUCEightDigitCode, MonitoringLocationIdentifier, TADA.NearbySiteGroups,
AquiferName, AquiferTypeName, LocalAqfrName, ConstructionDateText, WellDepthMeasure.MeasureValue,
WellDepthMeasure.MeasureUnitCode, WellHoleDepthMeasure.MeasureValue, WellHoleDepthMeasure.MeasureUnitCode,
ActivityDepthAltitudeReferencePointText, ActivityEndDate, ActivityEndTime.Time, ActivityEndTime.TimeZoneCode,
ActivityEndDateTime, ActivityConductingOrganizationText, SampleAquifer, ActivityLocation.LatitudeMeasure,
ActivityLocation.LongitudeMeasure, ResultStatusIdentifier, ResultWeightBasisText, ResultTemperatureBasisText,
ResultParticleSizeBasisText, USGSPCode, BinaryObjectFileName, BinaryObjectFileTypeCode, AnalysisStartDate,
ResultDetectionQuantitationLimitUrl, LabSamplePreparationUrl, timeZoneStart, timeZoneEnd, SourceMapScaleNumeric,
HorizontalAccuracyMeasure.MeasureValue, HorizontalAccuracyMeasure.MeasureUnitCode, HorizontalCollectionMethodName,
VerticalMeasure.MeasureValue, VerticalMeasure.MeasureUnitCode, VerticalAccuracyMeasure.MeasureValue,
VerticalAccuracyMeasure.MeasureUnitCode, VerticalCollectionMethodName, VerticalCoordinateReferenceSystemDatumName,
FormationTypeText, ProjectMonitoringLocationWeightingUrl, DrainageAreaMeasure.MeasureValue, DrainageAreaMeasure.MeasureUnitCode,
ContributingDrainageAreaMeasure.MeasureValue, ContributingDrainageAreaMeasure.MeasureUnitCode, ProviderName, LastUpdated,
TADA.ConsolidatedDepth.Bottom, TADA.DepthCategory.Flag, TADA.DepthProfileAggregation.Flag)`
[1] "TADA_DepthProfilePlot: Adding surface delination to figure."
Error: Must supply `x` and `y` attributes
@cristinamullin<https://github.com/cristinamullin> should "null" be the default for surfacevalue and bottomvalue in this function?
-
Reply to this email directly, view it on GitHub<#462 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALGLGYCRFU3QVLH6AI6F7U3ZDY62VAVCNFSM6AAAAABH4TNKAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXHA3TCOJUHA>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
…ile plot Updates to accept null values for surface value and bottom value in depth profile plot. Not complete yet.
…value Separated annotations for depth categories
Updated annotations so they are added one at a time (to accommodate null values for surfacevalue and bottomvalue.
Fix bugs related to null surface and bottomvalues
Switched colors to TADA Palette for DepthProfile Plot, updated documentation
Corrected TADA_FieldValuesPie so that an expanded color palette is created and applied as needed
|
@cristinamullin - ready for review |
|
|
||
| # Result Depth | ||
| "TADA.ConsolidatedDepth", | ||
| "TADA.ConsolidatedDepth.Bottom", |
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.
Is there a TADA.ConsolidatedDepth.Surface as well?
We may want to discuss some additional options for TADA_FieldValuesPieChart as the number of colors required can exceed the number in the palette (n = 9). Right now I am using color ramp to generate additional colors, but it doesn't always look great. Might be worth adding some additional colors to the palette in TADA_ColorPalette? And then only using color ramp if a really large number of colors is needed?