Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dashboards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
María Gabriela Castrellón
Dashboards
Commits
90e33067
Commit
90e33067
authored
3 months ago
by
M. G. Castrellon
Browse files
Options
Downloads
Patches
Plain Diff
Added an option for visualization of depth-averaged values
parent
3e12b04f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dashboardDash/app_salinity.py
+14
-1
14 additions, 1 deletion
dashboardDash/app_salinity.py
with
14 additions
and
1 deletion
dashboardDash/app_salinity.py
+
14
−
1
View file @
90e33067
...
...
@@ -72,7 +72,7 @@ app.layout = html.Div([
),
dcc
.
Dropdown
(
# Dropdown for filtering by category 2
id
=
'
depth-dropdown
'
,
options
=
[
'
0-5
'
,
'
5-15
'
,
'
>15
'
],
options
=
[
'
0-5
'
,
'
5-15
'
,
'
>15
'
,
'
All
'
],
placeholder
=
"
Select a depth group
"
,
value
=
'
0-5
'
,
# Default value
),
...
...
@@ -94,6 +94,19 @@ def update_markers(selected_variable, selected_period, selected_depth):
filtered_df
=
freq
.
loc
[
condition01
&
condition02
,
:]
\
.
copy
(
deep
=
True
).
reset_index
()
# Filter data according to dropdown menu options
## Selected period
filtered_df
=
freq
.
loc
[
freq
[
'
Period
'
]
==
selected_period
,
:].
copy
(
deep
=
True
)
## Selected depth
if
selected_depth
==
'
All
'
:
filtered_df
=
filtered_df
.
groupby
([
'
Station_ID
'
,
'
Period
'
],
observed
=
True
)
\
.
mean
(
numeric_only
=
True
).
reset_index
()
else
:
filtered_df
=
filtered_df
.
loc
[
filtered_df
[
'
Depth_Group
'
]
==
selected_depth
,
:]
# Generate hexagons
hexagons
=
create_hexagrid
(
df
=
filtered_df
,
var
=
selected_variable
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment