-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
475 lines (451 loc) · 27.3 KB
/
app.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
import streamlit as st
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib.offsetbox import OffsetImage, AnnotationBbox
import numpy as np
from streamlit_option_menu import option_menu
#import plotly_express as px
from PIL import Image
import os
st.set_page_config(page_title="NHL Dashboard", page_icon=":ice_hockey_stick_and_puck:", layout="wide", initial_sidebar_state="auto")
st.write('<style>div.block-container{padding-top:5rem;}</style>', unsafe_allow_html=True)
st.title("NHL Team Statistics Dashboard")
# Get the directory of the current script
current_dir = os.path.dirname(__file__)
#Define the relative paths to the images
#All Strengths
ASAS_path = os.path.join(current_dir, "images", "nhl_2023_2024_ASAS.png")
ASD1_path = os.path.join(current_dir, "images", "nhl_2023_2024_ASD1.png")
ASW1_path = os.path.join(current_dir, "images", "nhl_2023_2024_ASW1.png")
ASU1_path = os.path.join(current_dir, "images", "nhl_2023_2024_ASU1.png")
ASTied_path= os.path.join(current_dir, "images", "nhl_2023_2024_ASTied.png")
ASLeading_path=os.path.join(current_dir, "images", "nhl_2023_2024_ASLeading.png")
ASTrailing_path=os.path.join(current_dir, "images", "nhl_2023_2024_ASTrailing.png")
#Even Strengths
EVAS_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVAS.png")
EVD1_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVD1.png")
EVW1_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVW1.png")
EVU1_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVU1.png")
EVTied_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVTied.png")
EVLeading_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVLeading.png")
EVTrailing_path=os.path.join(current_dir, "images", "nhl_2023_2024_EVTrailing.png")
#5v5
FiveVFiveAS_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5AS.png")
FiveVFiveD1_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5D1.png")
FiveVFiveW1_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5W1.png")
FiveVFiveU1_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5U1.png")
FiveVFiveTied_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5Tied.png")
FiveVFiveLeading_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5Leading.png")
FiveVFiveTrailing_path=os.path.join(current_dir, "images", "nhl_2023_2024_5v5Trailing.png")
#5v5 Score and Venue Adjusted
AdjFiveVFiveAS_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5AS.png")
AdjFiveVFiveD1_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5D1.png")
AdjFiveVFiveW1_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5W1.png")
AdjFiveVFiveU1_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5U1.png")
AdjFiveVFiveTied_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5Tied.png")
AdjFiveVFiveLeading_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5Leading.png")
AdjFiveVFiveTrailing_path=os.path.join(current_dir, "images", "nhl_2023_2024_ADJ5v5Trailing.png")
#Loading in all images
#All Strengths
NHL_Logo=Image.open("NHL_Logo.png")
ASAS=Image.open(ASAS_path)
ASD1=Image.open(ASD1_path)
ASW1=Image.open(ASW1_path)
ASU1=Image.open(ASU1_path)
ASTied=Image.open(ASTied_path)
ASLeading=Image.open(ASLeading_path)
ASTrailing=Image.open(ASTrailing_path)
#Even Strengths
EVAS=Image.open(EVAS_path)
EVD1=Image.open(EVD1_path)
EVW1=Image.open(EVW1_path)
EVU1=Image.open(EVU1_path)
EVTied=Image.open(EVTied_path)
EVLeading=Image.open(EVLeading_path)
EVTrailing=Image.open(EVTrailing_path)
#5v5
FiveVFiveAS=Image.open(FiveVFiveAS_path)
FiveVFiveD1=Image.open(FiveVFiveD1_path)
FiveVFiveW1=Image.open(FiveVFiveW1_path)
FiveVFiveU1=Image.open(FiveVFiveU1_path)
FiveVFiveTied=Image.open(FiveVFiveTied_path)
FiveVFiveLeading=Image.open(FiveVFiveLeading_path)
FiveVFiveTrailing=Image.open(FiveVFiveTrailing_path)
#5v5 Score and Venue Adjusted
AdjFiveVFiveAS=Image.open(AdjFiveVFiveAS_path)
AdjFiveVFiveD1=Image.open(AdjFiveVFiveD1_path)
AdjFiveVFiveW1=Image.open(AdjFiveVFiveW1_path)
AdjFiveVFiveU1=Image.open(AdjFiveVFiveU1_path)
AdjFiveVFiveTied=Image.open(AdjFiveVFiveTied_path)
AdjFiveVFiveLeading=Image.open(AdjFiveVFiveLeading_path)
AdjFiveVFiveTrailing=Image.open(AdjFiveVFiveTrailing_path)
# Define function to load and display data
def load_and_display_data(file_path, image_path):
try:
df = pd.read_csv(file_path)
st.dataframe(df, hide_index=True)
with st.container():
main, margin = st.columns((0.75, 0.25))
with main:
st.image(image_path)
# st.write(len(df))
except FileNotFoundError:
st.error("File not found. Please check the file path.")
except Exception as e:
st.error(f"An error occurred: {e}")
def social_icons(width=24, height=24, **kwargs):
icon_template = '''
<a href="{url}" target="_blank" style="margin-right: 20px;">
<img src="{icon_src}" alt="{alt_text}" width="{width}" height="{height}">
</a>
'''
icons_html = ""
for name, url in kwargs.items():
icon_src = {
"linkedin": "https://img.icons8.com/ios-filled/100/000000/linkedin.png",
"github": "https://img.icons8.com/ios-filled/100/000000/github--v2.png",
"email": "https://img.icons8.com/ios-filled/100/000000/filled-message.png"
}.get(name.lower())
if icon_src:
icons_html += icon_template.format(url=url, icon_src=icon_src, alt_text=name.capitalize(), width=width, height=height)
return icons_html
# def interactive_plot(dataframe):
# x_axis_val=st.selectbox("Select X-Axis Value", options=df.columns)
# y_axis_val=st.selectbox("Select Y-Axis Value", options=df.columns)
# plot=px.scatter(dataframe, x=x_axis_val, y=y_axis_val)
# st.plotly_chart(plot)
# Sidebar: If using streamlit_option_menu
with st.sidebar:
with st.container():
l, m, r = st.columns((1,3,1))
with l:
st.empty()
with m:
st.image(NHL_Logo,width=175)
with r:
st.empty()
choose = option_menu(
"National Hockey League",
["Teams", "Standings"],
icons=['person fill', 'book half', ],
menu_icon="bar-chart-line-fill",
default_index=0,
styles={
"container": {"padding": "0!important", "background-color": "#44475a"},
"icon": {"color": "#000000", "font-size": "20px"},
"nav-link": {"font-size": "17px", "text-align": "left", "margin":"0px", "--hover-color": "#bd93f9", "color": "#000000"},
"nav-link-selected": {"background-color": "#bd93f9", "color": "#000000"},
"menu-title": {"color": "#000000", "font-size": "19px"}
}
)
linkedin_url = "https://www.linkedin.com/in/nick-sofianakos/"
github_url = "https://github.com/Nick3429"
email_url = "mailto:[email protected]"
with st.container():
l, m, r = st.columns((0.11,2,0.1))
with l:
st.empty()
with m:
st.markdown(
social_icons(30, 30, LinkedIn=linkedin_url, GitHub=github_url, Email=email_url),
unsafe_allow_html=True)
with r:
st.empty()
if choose=="Teams":
st.header("Teams")
st.subheader("A Way to visualize the current status of your team in respect to the rest of the league")
situation_options = ["All Strengths", "Even Strength", "5v5", "5v5 Score & Venue Adjusted",
]
score_options = ["All Scores", "Tied", "Leading", "Trailing", "Within 1", "Up 1", "Down 1",
]
with st.container():
left, right = st.columns(2)
with left:
sit_selected = st.selectbox("Pick a situation", options = situation_options)
with right:
score_selected = st.selectbox("Pick a Score option", options = score_options)
if sit_selected=="All Strengths" and score_selected== "All Scores":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsAllScoresCounts.csv",ASAS)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsAllScoresCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASAS.png")
# #st.dataframe(df_teamlogos,hide_index=True)
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Tied":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsTiedCounts.csv", ASTied)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsTiedCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASTied.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Leading":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsLeadingCounts.csv",ASLeading)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsLeadingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASLeading.png")
# # interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Trailing":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsTrailingCounts.csv",ASTrailing)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsTrailingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASTrailing.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Within 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsWithinOneCounts.csv",ASW1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsWithinOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASW1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Up 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsUpOneCounts.csv",ASU1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsUpOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASU1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="All Strengths" and score_selected== "Down 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/AllStrengthsDownOneCounts.csv",ASD1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/AllStrengthsDownOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ASD1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "All Scores":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthAllScoresCounts.csv",EVAS)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthAllScoresCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVAS.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Tied":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthTiedCounts.csv",EVTied)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthTiedCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVTied.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Leading":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthLeadingCounts.csv",EVLeading)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthLeadingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVLeading.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Trailing":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthTrailingCounts.csv",EVTrailing)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthTrailingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVTrailing.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Within 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthWithinOneCounts.csv",EVW1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthWithinOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVW1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Up 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthUpOneCounts.csv",EVU1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthUpOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVU1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="Even Strength" and score_selected== "Down 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/EvenStrengthDownOneCounts.csv",EVD1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/EvenStrengthDownOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_EVD1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "All Scores":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5AllScoresCounts.csv",FiveVFiveAS)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5AllScoresCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5AS.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Tied":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5TiedCounts.csv",FiveVFiveTied)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5TiedCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5Tied.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Leading":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5LeadingCounts.csv",FiveVFiveLeading)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5LeadingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5Leading.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Trailing":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5TrailingCounts.csv",FiveVFiveTrailing)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5TrailingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5Trailing.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Within 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5WithinOneCounts.csv",FiveVFiveW1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5WithinOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5W1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Up 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5UpOneCounts.csv",FiveVFiveU1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5UpOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5U1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5" and score_selected== "Down 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/5v5DownOneCounts.csv",FiveVFiveD1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/5v5DownOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_5v5D1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "All Scores":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5AllScoresCounts.csv",AdjFiveVFiveAS)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5AllScoresCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5AS.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Tied":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5TiedCounts.csv",AdjFiveVFiveTied)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5TiedCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5Tied.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Leading":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5LeadingCounts.csv",AdjFiveVFiveLeading)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5LeadingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5Leading.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Trailing":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5TrailingCounts.csv",AdjFiveVFiveTrailing)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5TrailingCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5Trailing.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Within 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5WithinOneCounts.csv",AdjFiveVFiveW1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5WithinOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5W1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Up 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5UpOneCounts.csv",AdjFiveVFiveU1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5UpOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5U1.png")
# #interactive_plot(df)
# st.write(len(df))
if sit_selected=="5v5 Score & Venue Adjusted" and score_selected== "Down 1":
load_and_display_data("https://raw.githubusercontent.com/Nick3429/NHLDashboard/main/NHL%20Dashboard%20Graphs/Adj5v5DownOneCounts.csv",AdjFiveVFiveD1)
# df=pd.read_csv("C:/NHL Streamlit Dashboard/Regular Season 2023-24 Season CSV's/Adj5v5DownOneCounts.csv")
# st.dataframe(df,hide_index=True)
# with st.container():
# main,margin= st.columns((0.75,0.25))
# with main:
# st.image("C:/NHL Streamlit Dashboard/NHLDashboard/NHL Dashboard Graphs/nhl_2023_2024_ADJ5v5D1.png")
# #interactive_plot(df)
# st.write(len(df))
if choose=="Standings":
st.header("Standings")
df=pd.read_csv("Standings.csv")
st.dataframe(df, hide_index=True)