-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboards.py
30 lines (24 loc) · 858 Bytes
/
dashboards.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import streamlit as st
# Streamlit app
def dashboard(dashboard_type: str):
# Default settings
st.set_page_config(
page_title="Real-time Weather Data App",
page_icon="⛅",
layout="wide",
initial_sidebar_state="expanded"
)
# Run the Streamlit app
st.title(str.upper(dashboard_type) + " : Weather Data")
# Add Logo
st.sidebar.image("images/logo.png", width=250)
# Sidebar with user instructions
st.sidebar.markdown(
"""
This app fetches real-time weather data from Accuweather APIs.
This produce messages to the Kafka topic and consume messages from the Kafka topic,
then displays real-time weather data from Kafka messages.
"""
)
# Display weather data in the main section
st.header("Real-Time Weather Data with Kafka + Streamlit")