Skip to content

Commit

Permalink
Merge pull request agoenergy#207 from agoenergy/typographycal_fixes
Browse files Browse the repository at this point in the history
Typographycal fixes
  • Loading branch information
markushal authored Dec 14, 2023
2 parents 3f4dfdd + 549ec67 commit a86f00e
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/excel_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def prepare_and_download_df_as_excel(df: pd.DataFrame, filename: str):
excel_stream = prepare_df_as_excel_stream(df)

st.download_button(
label="Download Table as Excel",
label="Download table as Excel",
data=excel_stream,
file_name=f"{filename}.xlsx",
help="Click to download this Table as Excel File.",
Expand Down
20 changes: 10 additions & 10 deletions app/layout_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def display_footer():
with c1:
st.markdown(
"""
##### Developed by:
##### Developed by
Öko-Institut<br/>
Merzhauser Straße 173<br/>
D-79100 Freiburg im Breisgau<br/>
Expand All @@ -111,7 +111,7 @@ def display_footer():
with c2:
st.markdown(
"""
##### On behalf of:
##### On behalf of
Agora Energiewende<br/>
Anna-Louisa-Karsch-Str. 2<br/>
D-10178 Berlin<br/>
Expand All @@ -122,14 +122,14 @@ def display_footer():
with c3:
st.markdown(
"""
##### Authors:
- Christoph Heinemann
- Dr. Roman Mendelevitch
- Markus Haller
- Christian Winger
- Johannes Aschauer
- Susanne Krieger
- Katharina Göckeler
##### Authors
Christoph Heinemann<br/>
Dr. Roman Mendelevitch<br/>
Markus Haller<br/>
Christian Winger<br/>
Johannes Aschauer<br/>
Susanne Krieger<br/>
Katharina Göckeler<br/>
""",
unsafe_allow_html=True,
)
Expand Down
10 changes: 5 additions & 5 deletions app/ptxboa_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,12 @@ def display_and_edit_input_data(
st.info(
(
"You can edit data directly in the table. When done, click the "
"**Apply Changes** button below to rerun calculations."
"**Apply changes** button below to rerun calculations."
)
)

st.form_submit_button(
"Apply Changes",
"Apply changes",
type="primary",
on_click=register_user_changes,
kwargs={
Expand Down Expand Up @@ -774,10 +774,10 @@ def change_index_names(df: pd.DataFrame, mapping: dict | None = None) -> pd.Data
if mapping is None:
mapping = {
"process_code": "Process",
"source_region_code": "Source Region",
"region": "Source Region",
"source_region_code": "Source region",
"region": "Source region",
"scenario": "Scenario",
"res_gen": "RE Source",
"res_gen": "RE source",
"chain": "Chain",
"flow_code": "Carrier/Material",
}
Expand Down
4 changes: 0 additions & 4 deletions app/tab_certification_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ def _render_scheme_info(context_data, scheme_name):
"""
**Explanations**
- Info on "Geographical scope":
- This field provides an answer to the question: if you want to address a specific
country of demand, which regulations and/or standards exist in this country
that require or allow proof of a specific product property?
- Info on "Lifecycle scope":
- Well-to-gate: GHG emissions are calculated up to production.
- Well-to-wheel: GHG emissions are calculated up to the time of use.
Expand Down
18 changes: 9 additions & 9 deletions app/tab_country_fact_sheets.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ def _create_fact_sheet_demand_country(context_data: dict):
with st.expander("**Demand**"):
c1, c2, c3 = st.columns(3)
with c1:
st.markdown("**Projected H2 demand in 2030:**")
st.markdown("**Projected H2 demand in 2030**")
if data["h2_demand_2030"] in ["", "-", "n/a"]:
st.markdown("no data")
else:
st.markdown(data["h2_demand_2030"])
st.markdown(f"*Source: {data['source_h2_demand_2030']}*")
with c2:
st.markdown("**Targeted sectors (main):**")
st.markdown("**Targeted sectors (main)**")
if data["demand_targeted_sectors_main"] in ["", "-", "n/a"]:
st.markdown("no data")
else:
st.markdown(data["demand_targeted_sectors_main"])
st.markdown(f"*Source: {data['source_targeted_sectors_main']}*")
with c3:
st.markdown("**Targeted sectors (secondary):**")
st.markdown("**Targeted sectors (secondary)**")
if data["demand_targeted_sectors_secondary"] in [
"",
"-",
Expand All @@ -57,22 +57,22 @@ def _create_fact_sheet_demand_country(context_data: dict):
st.markdown(f"*Source: {data['source_targeted_sectors_secondary']}*")

with st.expander("**Hydrogen strategy**"):
st.markdown("**Documents:**")
st.markdown("**Documents**")
st.markdown(data["h2_strategy_documents"])

st.markdown("**Authorities:**")
st.markdown("**Authorities**")
st.markdown(data["h2_strategy_authorities"])

with st.expander("**Hydrogen trade characteristics**"):
st.markdown(data["h2_trade_characteristics"])
st.markdown(f"*Source: {data['source_h2_trade_characteristics']}*")

with st.expander("**Infrastructure**"):
st.markdown("**LNG import terminals:**")
st.markdown("**LNG import terminals**")
st.markdown(data["lng_import_terminals"])
st.markdown(f"*Source: {data['source_lng_import_terminals']}*")

st.markdown("**H2 pipeline projects:**")
st.markdown("**H2 pipeline projects**")
st.markdown(data["h2_pipeline_projects"])
st.markdown(f"*Source: {data['source_h2_pipeline_projects']}*")

Expand Down Expand Up @@ -126,15 +126,15 @@ def _create_fact_sheet_supply_country(context_data: dict, api: PtxboaAPI):
)
st.markdown(text)

with st.expander("**Carbon Capture & Storage (CCS) Potentials**"):
with st.expander("**Carbon Capture & Storage (CCS) potentials**"):
value = data["ccs_pot"]
source = data["source_ccs1"]
if value == "n/a":
st.markdown("no data")
else:
st.markdown(f"**{value}**\n\n*Source: {source}*")

with st.expander("**Electricity Prices**"):
with st.expander("**Electricity prices**"):
value = data["elec_prices_IEA2020"]
source = data["source_elec_prices"]
if value == "n/a":
Expand Down
14 changes: 7 additions & 7 deletions app/tab_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def content_dashboard(
title_string = (
f"{cost_component} cost of exporting "
f"{st.session_state['chain']} to "
f"{st.session_state['country']}:"
f"{st.session_state['country']}"
)
st.subheader(title_string)
c_1, c_2 = st.columns([2, 1])

with c_1:
st.markdown("##### Costs by supply country:")
st.markdown("##### Costs by supply country")
fig_map = plot_costs_on_map(
api, costs_per_region, scope="world", cost_component=cost_component
)
Expand All @@ -50,7 +50,7 @@ def content_dashboard(
st.plotly_chart(fig_map, use_container_width=True)

with c_2:
st.markdown("##### Cost distribution and details:")
st.markdown("##### Cost distribution and details")
# create box plot and bar plot:
fig1 = create_box_plot(costs_per_region)
filtered_data = costs_per_region[
Expand Down Expand Up @@ -86,30 +86,30 @@ def content_dashboard(
api, costs_per_region_without_user_changes, st.session_state["country"]
),
"region",
"Costs by region:",
"Costs by region",
)

with st.container(border=True):
display_costs(
costs_per_scenario,
costs_per_scenario_without_user_changes,
"scenario",
"Costs by data scenario:",
"Costs by data scenario",
)

with st.container(border=True):
display_costs(
costs_per_res_gen,
costs_per_res_gen_without_user_changes,
"res_gen",
"Costs by renewable electricity source:",
"Costs by renewable electricity source",
)

with st.container(border=True):
display_costs(
costs_per_chain,
costs_per_chain_without_user_changes,
"chain",
"Costs by supply chain:",
"Costs by supply chain",
output_unit="USD/MWh",
)
4 changes: 2 additions & 2 deletions app/tab_deep_dive_countries.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def content_deep_dive_countries(
with c_0_0:
st.markdown("**Map**")
map_parameter = st.selectbox(
"Show Parameter on Map",
"Show parameter on map",
[
"Wind Onshore",
"Wind Offshore",
Expand All @@ -91,7 +91,7 @@ def content_deep_dive_countries(
)

with c_0_1:
st.markdown("**Regional Distribution**")
st.markdown("**Regional distribution**")
with c_1_1:
fig = px.box(df)
fig.update_layout(xaxis_title=None)
Expand Down
4 changes: 2 additions & 2 deletions app/tab_input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def content_input_data(api: PtxboaAPI) -> None:
st.markdown("**Map**")
if data_selection in ["full load hours", "CAPEX"]:
map_parameter = st.selectbox(
"Show Parameter on Map",
"Show parameter on map",
[
"Wind Onshore",
"Wind Offshore",
Expand Down Expand Up @@ -68,7 +68,7 @@ def content_input_data(api: PtxboaAPI) -> None:
key=f"input_data_{data_selection}",
)
with c_0_1:
st.markdown("**Regional Distribution**")
st.markdown("**Regional distribution**")
with c_1_1:
# create plot:
fig = px.box(df)
Expand Down
2 changes: 1 addition & 1 deletion app/tab_literature.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def content_literature(context_data: dict):
markdown_text = ""
for _ind, row in df.iterrows():
if _is_valid_url(row["url"]):
text = f"- {row['long_name']}: [Link]({row['url']})\n"
text = f"- {row['long_name'].strip('.')} ([Link]({row['url']}))\n"
else:
text = f"- {row['long_name']}\n"
markdown_text = markdown_text + text
Expand Down

0 comments on commit a86f00e

Please sign in to comment.