-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
58 lines (51 loc) · 1.68 KB
/
app.py
File metadata and controls
58 lines (51 loc) · 1.68 KB
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
import folium # For maps
import pandas as pd # For data manipulation
import streamlit as st
# Sample training data (replace with your actual data)
training_data = pd.DataFrame(
{
"Date": ["2023-10-15", "2023-10-16", "2023-10-17"],
"Location": ["Training Ground A", "Training Ground B", "Stadium"],
"Duration": [60, 90, 120], # Minutes
"Drills": ["Passing drills", "Shooting drills", "1v1 drills"],
"Notes": [
"Good performance on passing drills",
"Need to work on shooting accuracy",
"Intense match simulation",
],
}
)
# Streamlit app layout
st.title("Soccer Training App")
# Sidebar for navigation
with st.sidebar:
st.header("Navigation")
selected_page = st.selectbox(
"Select Page",
[
"Training Log",
"Statistics",
"Map",
],
)
# Display content based on selected page
if selected_page == "Training Log":
st.header("Training Log")
st.dataframe(training_data)
elif selected_page == "Statistics":
st.header("Statistics")
# Add code to calculate and display statistics (e.g.,
# average training duration, most frequent drills)
elif selected_page == "Map":
st.header("Map")
# Create a map using Folium (replace with your actual data)
map = folium.Map(
location=[55.6763, 12.5683], zoom_start=12
) # Adjust coordinates and zoom
for index, row in training_data.iterrows():
folium.Marker(
location=[row["Latitude"], row["Longitude"]], popup=row["Location"]
).add_to(map)
st.folium_map(map)
# Add more sections and features as needed
# (e.g., player profiles, goal tracking)