diff --git a/app/sidebar.py b/app/sidebar.py index b52ee11d..8d51109f 100644 --- a/app/sidebar.py +++ b/app/sidebar.py @@ -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", @@ -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) @@ -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( @@ -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( @@ -138,20 +144,25 @@ def make_sidebar(api: PtxboaAPI): ) st.session_state["transport"] = st.sidebar.radio( "Mode of transportation (for selected supply country):", - api.get_dimension("transport").index, + ["Ship", "Pipeline"], horizontal=True, help="Help text", + index=1, # 'Pipeline' as default ) if st.session_state["transport"] == "Ship": st.session_state["ship_own_fuel"] = st.sidebar.toggle( "For shipping option: Use the product as own fuel?", help="Help text", ) + else: + st.session_state["ship_own_fuel"] = False + st.session_state["output_unit"] = st.sidebar.radio( "Unit for delivered costs:", - api.get_dimension("output_unit").index, + ["USD/MWh", "USD/t"], horizontal=True, help="Help text", + index=1, # 'USD/t' as default ) st.sidebar.toggle(