Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MLWorkflowInterface
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
DestinE
MLWorkflowInterface
Commits
f553c22a
Commit
f553c22a
authored
Jan 9, 2024
by
Sabine Schröder
Browse files
Options
Downloads
Patches
Plain Diff
also provide plotting panels completely in German
parent
9445b7f0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/dashboard.py
+15
-10
15 additions, 10 deletions
src/pages/dashboard.py
with
15 additions
and
10 deletions
src/pages/dashboard.py
+
15
−
10
View file @
f553c22a
...
@@ -116,7 +116,7 @@ first_day_of_week = [0, 1]
...
@@ -116,7 +116,7 @@ first_day_of_week = [0, 1]
min_date_allowed
=
"
2017-02-20
"
min_date_allowed
=
"
2017-02-20
"
max_date_allowed
=
"
2018-08-09
"
max_date_allowed
=
"
2018-08-09
"
initial_visible_month
=
"
2017-02-01
"
initial_visible_month
=
"
2017-02-01
"
forecast_length_label
=
[
"
forecast length
:
"
,
"
Vorhersagedauer
:
"
]
forecast_length_label
=
[
"
forecast length
"
,
"
Vorhersagedauer
"
]
region_label
=
[
"
region:
"
,
"
Region:
"
]
region_label
=
[
"
region:
"
,
"
Region:
"
]
forecast_length_options
=
[[
"
4 days
"
,
"
3 days
"
,
"
2 days
"
,
"
1 day
"
],
forecast_length_options
=
[[
"
4 days
"
,
"
3 days
"
,
"
2 days
"
,
"
1 day
"
],
[
"
4 Tage
"
,
"
3 Tage
"
,
"
2 Tage
"
,
"
1 Tag
"
]]
[
"
4 Tage
"
,
"
3 Tage
"
,
"
2 Tage
"
,
"
1 Tag
"
]]
...
@@ -131,6 +131,11 @@ emis_scen_label = ["emission scenario:", "Emissionsszenario:"]
...
@@ -131,6 +131,11 @@ emis_scen_label = ["emission scenario:", "Emissionsszenario:"]
help_metrics_label
=
[
"
Help on metrics
"
,
"
Hilfe zu Ausgabemetriken
"
]
help_metrics_label
=
[
"
Help on metrics
"
,
"
Hilfe zu Ausgabemetriken
"
]
help_emissions_label
=
[
"
Help on emission scenarios
"
,
"
Hilfe zu Emissions-Szenarien
"
]
help_emissions_label
=
[
"
Help on emission scenarios
"
,
"
Hilfe zu Emissions-Szenarien
"
]
map_select_label
=
[
"
Select on map
"
,
"
auf Karte auswählen
"
]
map_select_label
=
[
"
Select on map
"
,
"
auf Karte auswählen
"
]
time_step_label
=
[
"
Time step
"
,
"
Zeitschritt
"
]
start_date_label
=
[
"
Start date
"
,
"
Startdatum
"
]
location_label
=
[
"
Location
"
,
"
Ort
"
]
day_label
=
[
"
day
"
,
"
Tag
"
]
day_plural_label
=
[
"
s
"
,
"
e
"
]
save_label
=
[
"
Save Results
"
,
"
Ergebnisse sichern
"
]
save_label
=
[
"
Save Results
"
,
"
Ergebnisse sichern
"
]
download_label
=
[
"
Download Data
"
,
"
Daten herunterladen
"
]
download_label
=
[
"
Download Data
"
,
"
Daten herunterladen
"
]
downscaling_label
=
[
"
Postprocessing with ML-Downscaling
"
,
"
Postprocessing mit ML-Downscaling
"
]
downscaling_label
=
[
"
Postprocessing with ML-Downscaling
"
,
"
Postprocessing mit ML-Downscaling
"
]
...
@@ -264,7 +269,7 @@ def generate_ml_fcast_body(language_id=0):
...
@@ -264,7 +269,7 @@ def generate_ml_fcast_body(language_id=0):
def
generate_ml_fcast_output_body
(
language_id
):
def
generate_ml_fcast_output_body
(
language_id
):
return
[
return
[
dbc
.
Row
(
dbc
.
Label
(
"
S
tart
date: 17 June 2017, ozone, Nordrhein Westfalen
"
)),
dbc
.
Row
(
dbc
.
Label
(
f
"
{
s
tart
_
date
_label
[
language_id
]
}
: 17 June 2017, ozone, Nordrhein Westfalen
"
)),
dbc
.
Row
([
dbc
.
Row
([
dbc
.
Col
(
dbc
.
Label
(
"
station:
"
),
width
=
3
),
dbc
.
Col
(
dbc
.
Label
(
"
station:
"
),
width
=
3
),
dbc
.
Col
(
dbc
.
Col
(
...
@@ -327,7 +332,7 @@ def generate_eurad_im_body(language_id=0):
...
@@ -327,7 +332,7 @@ def generate_eurad_im_body(language_id=0):
dbc
.
Col
(
dcc
.
DatePickerSingle
(
date
=
dt
.
date
.
today
(),
dbc
.
Col
(
dcc
.
DatePickerSingle
(
date
=
dt
.
date
.
today
(),
display_format
=
date_format
[
language_id
],
display_format
=
date_format
[
language_id
],
first_day_of_week
=
first_day_of_week
[
language_id
])),
first_day_of_week
=
first_day_of_week
[
language_id
])),
dbc
.
Col
(
dbc
.
Label
(
forecast_length_label
[
language_id
])),
dbc
.
Col
(
dbc
.
Label
(
f
"
{
forecast_length_label
[
language_id
]
}
:
"
)),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
forecast_length_options
[
language_id
][
0
],
options
=
forecast_length_options
[
language_id
]))
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
forecast_length_options
[
language_id
][
0
],
options
=
forecast_length_options
[
language_id
]))
],
class_name
=
"
row mt-3
"
),
],
class_name
=
"
row mt-3
"
),
dbc
.
Row
([
dbc
.
Row
([
...
@@ -370,23 +375,23 @@ def generate_eurad_im_output_body(language_id, context):
...
@@ -370,23 +375,23 @@ def generate_eurad_im_output_body(language_id, context):
# TODO: Zeit in Stunden seit Start
# TODO: Zeit in Stunden seit Start
start_date
=
pd
.
to_datetime
(
timestep_list
[
0
]).
strftime
(
"
%d %B %Y
"
)
start_date
=
pd
.
to_datetime
(
timestep_list
[
0
]).
strftime
(
"
%d %B %Y
"
)
fc_leng
h
t
=
(
len
(
timestep_list
)
-
1
)
//
24
fc_lengt
h
=
(
len
(
timestep_list
)
-
1
)
//
24
fc_leng
h
t_str
=
"
{}
day
{}
"
.
format
(
fc_leng
ht
,
"
s
"
if
fc_leng
h
t
>
1
else
""
)
fc_lengt
h
_str
=
"
{}
{}
{}
"
.
format
(
fc_leng
th
,
day_label
[
language_id
],
day_plural_label
[
language_id
]
if
fc_lengt
h
>
1
else
""
)
variables_list
=
info
.
get_available_variables
(
infile
)
variables_list
=
info
.
get_available_variables
(
infile
)
stations_list
=
info
.
get_available_stations
()
stations_list
=
info
.
get_available_stations
()
stations_list
=
sorted
(
stations_list
)
stations_list
=
sorted
(
stations_list
)
return
[
return
[
dbc
.
Row
([
dbc
.
Label
(
"
S
tart
date
: {
}, forecast
length
: {}
"
.
format
(
start_date
,
fc_leng
h
t_str
)
)]),
dbc
.
Row
([
dbc
.
Label
(
f
"
{
s
tart
_
date
_label
[
language_id
]
}
:
{
start_date
}
,
{
forecast
_
length
_label
[
language_id
]
}
:
{
fc_lengt
h
_str
}
"
)]),
dbc
.
Row
([
dbc
.
Row
([
dbc
.
Col
(
dbc
.
Label
(
"
T
ime
step
:
"
),
width
=
3
),
dbc
.
Col
(
dbc
.
Label
(
f
"
{
t
ime
_
step
_label
[
language_id
]
}
"
),
width
=
3
),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
timestep_strings
[
0
],
options
=
timestep_strings
,
id
=
'
time-step-dropdown-{}
'
.
format
(
context
)),
width
=
3
)
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
timestep_strings
[
0
],
options
=
timestep_strings
,
id
=
'
time-step-dropdown-{}
'
.
format
(
context
)),
width
=
3
)
],
class_name
=
"
row mt-3
"
),
],
class_name
=
"
row mt-3
"
),
dbc
.
Row
([
dbc
.
Row
([
dbc
.
Col
(
dbc
.
Label
(
"
Variable:
"
),
width
=
3
),
dbc
.
Col
(
dbc
.
Label
(
"
Variable:
"
),
width
=
3
),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
variables_list
[
0
],
options
=
variables_list
,
id
=
'
variable-dropdown-{}
'
.
format
(
context
)),
width
=
3
),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
variables_list
[
0
],
options
=
variables_list
,
id
=
'
variable-dropdown-{}
'
.
format
(
context
)),
width
=
3
),
dbc
.
Col
(
dbc
.
Label
(
"
L
ocation:
"
),
width
=
3
),
dbc
.
Col
(
dbc
.
Label
(
f
"
{
l
ocation
_label
[
language_id
]
}
:
"
),
width
=
3
),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
stations_list
[
0
],
options
=
stations_list
,
id
=
'
station-dropdown-{}
'
.
format
(
context
)),
width
=
3
)
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
stations_list
[
0
],
options
=
stations_list
,
id
=
'
station-dropdown-{}
'
.
format
(
context
)),
width
=
3
)
],
class_name
=
"
row mt-3
"
),
],
class_name
=
"
row mt-3
"
),
dbc
.
Row
([
dbc
.
Row
([
...
@@ -399,7 +404,7 @@ def generate_eurad_im_output_body(language_id, context):
...
@@ -399,7 +404,7 @@ def generate_eurad_im_output_body(language_id, context):
dbc
.
Row
([
dbc
.
Row
([
dbc
.
Col
(
html
.
Br
(),
width
=
12
),
dbc
.
Col
(
html
.
Br
(),
width
=
12
),
dbc
.
Col
([
dbc
.
Col
([
dbc
.
Checkbox
(
label
=
f
"
{
show_downscaling_label
[
language_id
]
}
"
,
value
=
1
)
dbc
.
Checkbox
(
label
=
f
"
{
show_downscaling_label
[
language_id
]
}
"
,
value
=
0
)
],
style
=
{
"
display
"
:
"
flex
"
}),
],
style
=
{
"
display
"
:
"
flex
"
}),
],
class_name
=
"
row mt-3f
"
),
],
class_name
=
"
row mt-3f
"
),
]
]
...
@@ -465,7 +470,7 @@ def generate_eurad_scen_body(language_id):
...
@@ -465,7 +470,7 @@ def generate_eurad_scen_body(language_id):
dbc
.
Col
(
dcc
.
DatePickerSingle
(
date
=
dt
.
date
.
today
(),
dbc
.
Col
(
dcc
.
DatePickerSingle
(
date
=
dt
.
date
.
today
(),
display_format
=
date_format
[
language_id
],
display_format
=
date_format
[
language_id
],
first_day_of_week
=
first_day_of_week
[
language_id
])),
first_day_of_week
=
first_day_of_week
[
language_id
])),
dbc
.
Col
(
dbc
.
Label
(
f
"
{
forecast_length_label
[
language_id
]
}
"
)),
dbc
.
Col
(
dbc
.
Label
(
f
"
{
forecast_length_label
[
language_id
]
}
:
"
)),
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
forecast_length_options
[
language_id
][
0
],
options
=
forecast_length_options
[
language_id
]))
dbc
.
Col
(
dcc
.
Dropdown
(
value
=
forecast_length_options
[
language_id
][
0
],
options
=
forecast_length_options
[
language_id
]))
],
class_name
=
"
row mt-3
"
),
],
class_name
=
"
row mt-3
"
),
dbc
.
Row
([
dbc
.
Row
([
...
...
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
sign in
to comment