Skip to content

Commit

Permalink
[+] add header display for comptetion info
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirscher committed Apr 17, 2024
1 parent 31b70f7 commit e712e56
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 5 deletions.
76 changes: 73 additions & 3 deletions main.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion utils/scraping.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,4 @@ def get_results(url, nb_pages):
athletes, temps, ligue, perfs, categorie, annee = get_liste(rows, categories, perf)
liste = [athletes, temps, ligue, perfs, categorie, annee]
data = get_data(liste)
return data
return header, data
11 changes: 10 additions & 1 deletion utils/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import pandas as pd
import utils.stat as stat

from IPython.display import display, Markdown

def graphePerso(prenom, nom, data, titre):
densite=stat.dens(data['duration'], bins = stat.idealBins(len(data['duration'])))
fcubic=stat.lissage(densite, sep = True,beginend = (data['duration'].min(),data['duration'].max()))
Expand Down Expand Up @@ -37,4 +39,11 @@ def graphePerso(prenom, nom, data, titre):
height=450,
)

fig.show()
fig.show()

def display_header(header):
display(Markdown(f"**Compétition:** {header['nom']}"))
display(Markdown(f"**Lieu:** {header['lieu']}"))
display(Markdown(f"**Date:** {header['date']}"))
display(Markdown(f"**Dept:** {header['dept']}"))
display(Markdown(f"**Label:** {header['label']}"))

0 comments on commit e712e56

Please sign in to comment.