Spaces:
Running
Running
File size: 1,089 Bytes
dd8b1bf 2e28476 dd8b1bf 1030c11 357994a 1237c34 938a35d 1237c34 938a35d 2e28476 938a35d 2e28476 357994a 938a35d 357994a f6be049 357994a f6be049 357994a 82057dc 357994a 938a35d 2e28476 4595ac8 |
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
import streamlit as st
import pandas as pd
import numpy as np
import datetime
import hopsworks
from functions import figure, retrieve
import os
import pickle
import plotly.express as px
import json
from datetime import datetime
import os
# Real data
today = datetime.today().strftime('%Y-%m-%d')
df = retrieve.get_merged_dataframe()
n = len(df[df['pm25'].isna()]) - 1
# Dummmy data
# size = 400
# data = {
# 'date': pd.date_range(start='2023-01-01', periods=size, freq='D'),
# 'pm25': np.random.randint(50, 150, size=size),
# 'predicted_pm25': np.random.randint(50, 150, size=size)
# }
# df = pd.DataFrame(data)
# Page configuration
st.set_page_config(
page_title="Air Quality Prediction",
page_icon="🧊",
layout="wide",
initial_sidebar_state="expanded",
menu_items={
'About': "# Air Quality Prediction"
}
)
st.title('Lahore Air Quality')
st.subheader('Forecast and hindcast')
st.subheader('Unit: PM25 - particle matter of diameter < 2.5 micrometers')
# Plotting
fig = figure.plot(df, n=n)
st.plotly_chart(fig, use_container_width=True) |