Skip to content

Commit

Permalink
change default options in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
joAschauer committed Nov 29, 2023
1 parent 9c62984 commit 0eebf08
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def make_sidebar(api: PtxboaAPI):
"(RE source, mode of transportation). For other regions, "
"default settings will be used."
),
index=region_list.get_loc("Morocco"), # Morocco as default
)
st.sidebar.toggle(
"Include subregions",
Expand All @@ -38,13 +39,16 @@ def make_sidebar(api: PtxboaAPI):
),
key="include_subregions",
)

countries = api.get_dimension("country").index
st.session_state["country"] = st.sidebar.selectbox(
"Demand country:",
api.get_dimension("country").index,
countries,
help=(
"The country you aim to export to. Some key info on the demand country you "
"choose here are displayed in the info box."
),
index=countries.get_loc("Germany"),
)
# get chain as combination of product, electrolyzer type and reconversion option:
c1, c2 = st.sidebar.columns(2)
Expand All @@ -61,6 +65,7 @@ def make_sidebar(api: PtxboaAPI):
"Ft e-fuels",
],
help="The product you want to export.",
index=4, # Methane as default
)
with c2:
ely = st.selectbox(
Expand All @@ -71,6 +76,7 @@ def make_sidebar(api: PtxboaAPI):
"SEOC",
],
help="The electrolyzer type you wish to use.",
index=0, # AEL as default
)
if product in ["Ammonia", "Methane"]:
use_reconversion = st.sidebar.toggle(
Expand Down

0 comments on commit 0eebf08

Please sign in to comment.