File size: 1,848 Bytes
e8a3017
 
 
9f864b4
b05b246
e8a3017
f877b1c
 
 
 
4c0faa0
f877b1c
 
 
 
 
 
 
e8a3017
 
 
 
 
fd0eea9
3035e18
fd0eea9
b05b246
30900e4
b83658e
 
 
 
2e9deee
787220f
9f864b4
 
 
 
 
 
 
 
 
 
 
 
 
24d379f
 
9f864b4
24d379f
4fcc8cc
 
 
 
787220f
 
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
from git import Repo
import os
import streamlit as st    
#import streamlit_analytics
from PIL import Image

st.set_page_config(
    page_title="TRACING INSIGHTS",
    page_icon=None,
    layout="wide",
    initial_sidebar_state="expanded",
    # menu_items={
    #     'Get Help': 'https://www.extremelycoolapp.com/help',
    #     'Report a bug': "https://www.extremelycoolapp.com/bug",
    #     'About': "# This is a header. This is an *extremely* cool app!"
    # }
)

GITHUB_PAT = os.environ['GITHUB']

if not os.path.exists('repo_directory'):  
    Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/F1_analysis.git', 'repo_directory'  )




from repo_directory.st_functions import st_button, load_css

import fastf1

fastf1.Cache.enable_cache('cache')


#streamlit_analytics.start_tracking()
#with streamlit_analytics.track():
load_css()

col1, col2, col3 = st.columns(3)
col2.image(Image.open('Logo.png'))


st.header('Tracing Insights')

st.info("Home for F1 data-driven analytics, pre-race predictions, post-race analysis, dank memes you won't find anywhere else")

icon_size = 20

st_button('', 'https://github.com/sponsors/TracingInsights', 'Best way to support', icon_size)
st_button('twitter', 'https://twitter.com/tracinginsights', 'Follow on Twitter', icon_size)
st_button('newsletter', 'https://tracinginsights.substack.com/', 'Sign up for my Newsletter', icon_size)
st_button('', 'https://instagram.com/tracinginsights', 'Follow on Instagram', icon_size)
st_button('', 'https://www.reddit.com/r/TracingInsights/', 'Join r/TracingInsights sub-reddit', icon_size)
st_button('', 'https://tracinginsights.creator-spring.com/', 'Shop Merch', icon_size)
st_button('youtube', 'https://www.youtube.com/@TracingInsights', 'Tracing Insights YouTube channel', icon_size)


#streamlit_analytics.stop_tracking()