elisaklunder commited on
Commit
6bd7feb
·
1 Parent(s): c8357d0

changed password and username

Browse files
Files changed (1) hide show
  1. pages/admin.py +19 -12
pages/admin.py CHANGED
@@ -3,11 +3,10 @@ import pandas as pd
3
  import plotly.graph_objects as go
4
  import streamlit as st
5
  from sklearn.metrics import mean_squared_error
6
-
7
  from src.data_api_calls import get_combined_data
8
 
9
- USERNAME = "dragonkiller"
10
- PASSWORD = "donkey"
11
 
12
  st.title("Admin Panel")
13
 
@@ -41,23 +40,31 @@ else:
41
 
42
  # Display message based on whether data is complete
43
  if missing_values.values.any():
44
- # Warning message if there are missing values
45
- st.markdown("<h4 style='color: #E68B0A;'>Warning: Some data is missing!</h4>", unsafe_allow_html=True)
 
 
 
46
 
47
- # Identify columns with missing values
48
  missing_columns = table_data.columns[missing_values.any()].tolist()
49
 
50
- # Identify rows (dates) with missing values
51
- missing_rows = table_data[missing_values.any(axis=1)]['Date'].tolist()
52
 
53
- # Display additional information about missing columns and rows
54
  if missing_columns:
55
  st.markdown(f"**Columns with missing data:** {', '.join(missing_columns)}")
56
  if missing_rows:
57
- st.markdown(f"**Rows with missing data (dates):** {', '.join(missing_rows)}")
 
 
58
  else:
59
- # Success message if no data is missing
60
- st.markdown("<h4 style='color: #77C124;'>All data is complete!</h4>", unsafe_allow_html=True)
 
 
 
61
  st.dataframe(table_data)
62
  # Actual data vs 1,2,3 days ahead predictions
63
  actual_data = pd.read_csv("pollution_data.csv")
 
3
  import plotly.graph_objects as go
4
  import streamlit as st
5
  from sklearn.metrics import mean_squared_error
 
6
  from src.data_api_calls import get_combined_data
7
 
8
+ USERNAME = "admin"
9
+ PASSWORD = "password"
10
 
11
  st.title("Admin Panel")
12
 
 
40
 
41
  # Display message based on whether data is complete
42
  if missing_values.values.any():
43
+ # Warning message if there are missing values
44
+ st.markdown(
45
+ "<h4 style='color: #E68B0A;'>Warning: Some data is missing!</h4>",
46
+ unsafe_allow_html=True,
47
+ )
48
 
49
+ # Identify columns with missing values
50
  missing_columns = table_data.columns[missing_values.any()].tolist()
51
 
52
+ # Identify rows (dates) with missing values
53
+ missing_rows = table_data[missing_values.any(axis=1)]["Date"].tolist()
54
 
55
+ # Display additional information about missing columns and rows
56
  if missing_columns:
57
  st.markdown(f"**Columns with missing data:** {', '.join(missing_columns)}")
58
  if missing_rows:
59
+ st.markdown(
60
+ f"**Rows with missing data (dates):** {', '.join(missing_rows)}"
61
+ )
62
  else:
63
+ # Success message if no data is missing
64
+ st.markdown(
65
+ "<h4 style='color: #77C124;'>All data is complete!</h4>",
66
+ unsafe_allow_html=True,
67
+ )
68
  st.dataframe(table_data)
69
  # Actual data vs 1,2,3 days ahead predictions
70
  actual_data = pd.read_csv("pollution_data.csv")