-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
58 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
from typing import Any | ||
|
||
import streamlit as st | ||
|
||
from rssched.app.utils.io import get_uploaded_data | ||
from rssched.visualization.active_events import plot_active_events_over_time | ||
from rssched.visualization.fleet_efficiency import plot_fleet_efficiency | ||
from rssched.visualization.vehicle_type_gantt import plot_gantt_per_vehicle_type | ||
from rssched.visualization.vehicle_utilization import plot_vehicle_utilization | ||
|
||
st.title("Fleet") | ||
|
||
request, response, instance_name = get_uploaded_data() | ||
|
||
|
||
tabs = st.tabs(["Active Events", "Vehicle Utilization", "Efficiency"]) | ||
tabs = st.tabs( | ||
["Vehicle Circuits", "Active Events", "Vehicle Utilization", "Efficiency"] | ||
) | ||
|
||
with tabs[0]: | ||
st.plotly_chart(plot_active_events_over_time(response, instance_name)) | ||
plots = plot_gantt_per_vehicle_type(response, instance_name) | ||
selected_vehicle_type: str = st.selectbox("Choose vehicle type", plots.keys()) | ||
st.plotly_chart(plots[selected_vehicle_type]) | ||
|
||
with tabs[1]: | ||
st.plotly_chart(plot_vehicle_utilization(response, instance_name)) | ||
st.plotly_chart(plot_active_events_over_time(response, instance_name)) | ||
|
||
with tabs[2]: | ||
st.plotly_chart(plot_vehicle_utilization(response, instance_name)) | ||
|
||
with tabs[3]: | ||
for fig in plot_fleet_efficiency(response, instance_name): | ||
st.plotly_chart(fig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters