Skip to content

Commit

Permalink
show data for transport and conversion technologies separately. to do…
Browse files Browse the repository at this point in the history
… this better fixing #102 would help
  • Loading branch information
markushal committed Nov 14, 2023
1 parent 2a7a081 commit 79dd5c5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions app/ptxboa_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,27 @@ def content_input_data(api: PtxboaAPI, settings: dict) -> None:
fig = px.box(df)
st.plotly_chart(fig, use_container_width=True)

st.divider()
st.subheader("Data that is identical for all regions:")

input_data_global = input_data.loc[input_data["source_region_code"] == ""]

# filter processes:
# TODO I would like to filter by process type, where do i get this inforation from?
list_processes_all = input_data_global["process_code"].unique().tolist()

list_processes_transport = [
element
for element in list_processes_all
if ("ship" in element or "pipeline" in element)
]

list_processes_not_transport = [
element
for element in list_processes_all
if element not in list_processes_transport
]
st.markdown("**Conversion processes:**")
df = display_and_edit_data_table(
input_data_global,
missing_index_name="source_region_code",
Expand All @@ -952,6 +969,23 @@ def content_input_data(api: PtxboaAPI, settings: dict) -> None:
"lifetime / amortization period",
"efficiency",
],
process_code=list_processes_not_transport,
index="process_code",
columns="parameter_code",
)
st.markdown("**Transportation processes:**")
st.markdown("TODO: fix data")
df = display_and_edit_data_table(
input_data_global,
missing_index_name="source_region_code",
missing_index_value=None,
parameter_code=[
"losses (own fuel, transport)",
"levelized costs",
"lifetime / amortization period",
# FIXME: add bunker fuel consumption
],
process_code=list_processes_transport,
index="process_code",
columns="parameter_code",
)
Expand Down

0 comments on commit 79dd5c5

Please sign in to comment.