Skip to content

Commit

Permalink
add function for importing markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
markushal committed Dec 11, 2023
1 parent b1acf81 commit 54d74d3
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 69 deletions.
6 changes: 6 additions & 0 deletions app/ptxboa_functions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""Utility functions for streamlit app."""
from pathlib import Path
from typing import Literal

import pandas as pd
Expand Down Expand Up @@ -622,3 +623,8 @@ def move_to_tab(tab_name):
old_tab_key_nb = int(st.session_state["tab_key"].replace("tab_key_", ""))
st.session_state["tab_key"] = f"tab_key_{old_tab_key_nb + 1}"
st.session_state[st.session_state["tab_key"]] = tab_name


def read_markdown_file(markdown_file: str) -> str:
"""Import markdown file as string."""
return Path(markdown_file).read_text(encoding="UTF-8")
73 changes: 4 additions & 69 deletions app/tab_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,13 @@
"""Info tab."""
import streamlit as st

from app.ptxboa_functions import read_markdown_file


def content_info():
with st.container(border=True):
st.markdown("### What functionalities does this tool provide to users? ")
st.markdown(
"""
- Get an impression of **total costs of delivered hydrogen and various derivative
molecules** of your country of interest to a potential demand country
- Analyze the **cost components** of flexibly selectable process chains
and production routes
- **Compare costs** between various production pathways, supply and demand countries
on a global scale
- Access comprehensive **additional context information** on relevant aspects
for PTX trade such as potential sustainability issues and certification
- If required, **adjust data points** according to your own level of knowledge
""",
unsafe_allow_html=True,
)
st.markdown(read_markdown_file("static/info_intro.md"))

st.markdown("### On the level of detail")
st.markdown(
"""
The tool calculates **simple levelized costs of hydrogen and derivatives**
at screening/pre-feasbility level.
The table below gives an overview on different levels
of cost/price approximations.
In this overview, the tool locates in first level which aims at providing
high-level analyses at pre-feasibility level to start the discussion.
It does not show realized project costs or hydrogen and derivative prices.
"""
)
st.image("static/costs_of_hydrogen.png", width=800)

with st.container(border=True):
Expand Down Expand Up @@ -66,47 +41,7 @@ def content_info():
)

with st.container(border=True):
st.markdown("#### Disclaimer")
st.markdown(
"""
The PTX BOA uses technical reports published by third parties.
The authors of the tool and Agora Energiewende trust but do not guarantee
the accuracy and completeness of the information provided by them.
All rights reserved to Öko-Institut and Agora Energiewende.
The use of the methods and results are only authorised
in case Öko-institut and Agora Energiewende is properly cited.
"""
)

st.markdown("#### Licensing and quotation")
st.markdown(
"""
This tool is licensed under the Creative Commons CC-BY-SA license
(https://creativecommons.org/licenses/by-sa/4.0/).
Please cite it as: Oeko-Institut, Agora Energiewende & Agora Industry (2023):
PTX Business Opportunity Analyser
https://ptx-boa.streamlit.app/
"""
)
st.markdown("#### Source code and contribution")
st.markdown(
"""
We strongly welcome anyone interested in contributing to this project.
If you would like to file a bug, make a feature request
or make a contribution, please check out our Github repository:
https://github.com/agoenergy/ptx-boa
"""
)

st.markdown("#### Additional resources")
st.markdown(
"""
Visit our website for data documentation, additional resources and updates:
https://www.agora-energiewende.de/en/publications/business-opportunity-analyser-boa
"""
)
st.markdown(read_markdown_file("static/info_disclaimer.md"))

with st.container(border=True):
c1, c2, c3 = st.columns(3)
Expand Down
30 changes: 30 additions & 0 deletions static/info_disclaimer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#### Disclaimer

The PTX BOA uses technical reports published by third parties.
The authors of the tool and Agora Energiewende trust but do not guarantee
the accuracy and completeness of the information provided by them.

All rights reserved to Öko-Institut and Agora Energiewende.
The use of the methods and results are only authorised
in case Öko-institut and Agora Energiewende is properly cited.

#### Licensing and quotation

This tool is licensed under the Creative Commons CC-BY-SA license
(<https://creativecommons.org/licenses/by-sa/4.0/>).

Please cite it as: Oeko-Institut, Agora Energiewende & Agora Industry (2023):
PTX Business Opportunity Analyser
<https://ptx-boa.streamlit.app/>

#### Source code and contribution

We strongly welcome anyone interested in contributing to this project.
If you would like to file a bug, make a feature request
or make a contribution, please check out our Github repository:
<https://github.com/agoenergy/ptx-boa>

#### Additional resources

Visit our website for data documentation, additional resources and updates:
<https://www.agora-energiewende.de/en/publications/business-opportunity-analyser-boa>
14 changes: 14 additions & 0 deletions static/info_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### What functionalities does this tool provide to users?

- Get an impression of **total costs of delivered hydrogen and various derivative molecules** of your country of interest to a potential demand country
- Analyze the **cost components** of flexibly selectable process chains and production routes
- **Compare costs** between various production pathways, supply and demand countries on a global scale
- Access comprehensive **additional context information** on relevant aspects for PTX trade such as potential sustainability issues and certification
- If required, **adjust data points** according to your own level of knowledge

### On the level of detail

The tool calculates **simple levelized costs of hydrogen and derivatives** at screening/pre-feasbility level.
The table below (Agora & Umlaut 2023) gives an overview on different levels of cost/price approximations.
In this overview, the tool locates in first level which aims at providing high-level analyses at pre-feasibility level to start the discussion.
It does not show realized project costs or hydrogen and derivative prices.

0 comments on commit 54d74d3

Please sign in to comment.