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

Develop new "Depth" tab #138

Open
hillarymarler opened this issue Feb 12, 2024 · 0 comments
Open

Develop new "Depth" tab #138

hillarymarler opened this issue Feb 12, 2024 · 0 comments

Comments

@hillarymarler
Copy link
Collaborator

hillarymarler commented Feb 12, 2024

Add depth profile tab using TADA_DepthCategory.Flag, TADA_IDDepthProfile, and TADA_DepthProfilePlot functions from the package. Allow users to categorize results by depth, identify available depth profiles in the data set, and create a depth profile figure for up to three characteristics.

Steps:
Run

# Download example data
df0 <- TADA::TADA_DataRetrieval(
  organization = c("REDLAKE_WQX", 
                   "SFNOES_WQX", 
                   "PUEBLO_POJOAQUE", 
                   "FONDULAC_WQX",   
                   "PUEBLOOFTESUQUE", "CNENVSER"),
  startDate = "2018-01-01",
  endDate = "2023-01-01")

# FIRST
# Categorize depth data as surface, middle and bottom
df1 <- TADA::TADA_FlagDepthCategory(df0, 
                                    bycategory = "no", # require no in shiny?
                                    bottomvalue = 2, # include option for user input in shiny
                                    surfacevalue = 2, # include option for user input in shiny
                                    dailyagg = "none", # include option for user input in shiny, be aware if user chooses to calculate "avg", "min", or "max" this will increase the number of rows in the dataset
                                    clean = FALSE) # require FALSE in shiny?

# SECOND
# ID location/date/characteristic combinations in the data set that can be used for depth profile plots or analysis
 # This output will be used to generate options for the plot below
df2 <- TADA::TADA_IDDepthProfiles(df1, 
                                  nresults = TRUE, 
                                  nvalue = 2, # include option for user input in shiny 
                                  aggregates = FALSE)

# THIRD
# Users can now explore depth profiles for selected characteristics (up to 3) at specific site on a single date
# TADA_DepthProfilePlot can plot up to three characteristics against depth
TADA::TADA_DepthProfilePlot(df1, groups = c('TEMPERATURE, WATER_NA_NA_DEG C', 
                                            'DEPTH, SECCHI DISK DEPTH_NA_NA_M',
                                            'DISSOLVED OXYGEN (DO)_NA_NA_MG/L'), # second in shiny, after users select a specific location and date, users should select up to three chars (use TADA::TADA_IDDepthProfiles output (df2) to generate list of options)
                            location = "REDLAKE_WQX-LRC", # first in shiny, users should select a specific location and date (use TADA::TADA_IDDepthProfiles output (df2) to generate list of options)
                            activity_date = "2018-07-09", # first in shiny, users should select a specific location and date (use TADA::TADA_IDDepthProfiles output (df2) to generate list of options)
                            depthcat = TRUE, # include check box in shiny to turn off or on on plot. This could also be a TADA_DepthProfilePlot function update to inlcude the check bix in the fig itself instead of just shiny?
                            surfacevalue = 2, # include option for user input on shiny
                            bottomvalue = 2, # include option for user input on shiny
                            unit = "m") # include option for user input on shiny ("ft", "m", "in")

image

@hillarymarler hillarymarler self-assigned this Feb 12, 2024
@cristinamullin cristinamullin changed the title Add Depth Profile tab Develop new "Depth" tab Jun 4, 2024
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

No branches or pull requests

2 participants