lschlessinger commited on
Commit
9bc9de8
·
1 Parent(s): 7814537

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -15,6 +15,8 @@ def usatt_rating_analyzer(file_obj):
15
  peak_rating = mp.get_max_rating(df)
16
  n_competitions_played = mp.get_num_competitions_played(df, is_tournament)
17
  n_matches_played = len(df)
 
 
18
  matches_per_competition_fig = mp.get_matches_per_competition_fig(df, is_tournament)
19
  opponent_name_word_cloud_fig = mp.get_opponent_name_word_cloud_fig(df)
20
  competition_name_word_cloud_fig = mp.get_competition_name_word_cloud_fig(df, is_tournament)
@@ -34,6 +36,8 @@ def usatt_rating_analyzer(file_obj):
34
  peak_rating,
35
  n_competitions_played,
36
  n_matches_played,
 
 
37
  rating_over_time_fig,
38
  opponent_rating_distr_fig,
39
  opponent_rating_dist_over_time_fig,
@@ -91,6 +95,10 @@ with gr.Blocks() as demo:
91
  num_comps_box = gr.Textbox(lines=1, label="Number of competitions (tournaments/leagues) played")
92
  with gr.Column():
93
  num_matches_box = gr.Textbox(lines=1, label="Number of matches played")
 
 
 
 
94
 
95
  with gr.Row():
96
  with gr.Column():
@@ -151,6 +159,8 @@ with gr.Blocks() as demo:
151
  peak_rating_box,
152
  num_comps_box,
153
  num_matches_box,
 
 
154
  rating_over_time_plot,
155
  opponent_rating_dist_plot,
156
  opponent_rating_dist_over_time_plot,
 
15
  peak_rating = mp.get_max_rating(df)
16
  n_competitions_played = mp.get_num_competitions_played(df, is_tournament)
17
  n_matches_played = len(df)
18
+ first_comp_year = mp.get_first_competition_year(df, is_tournament)
19
+ n_active_years = mp.get_num_active_years(df, is_tournament)
20
  matches_per_competition_fig = mp.get_matches_per_competition_fig(df, is_tournament)
21
  opponent_name_word_cloud_fig = mp.get_opponent_name_word_cloud_fig(df)
22
  competition_name_word_cloud_fig = mp.get_competition_name_word_cloud_fig(df, is_tournament)
 
36
  peak_rating,
37
  n_competitions_played,
38
  n_matches_played,
39
+ first_comp_year,
40
+ n_active_years,
41
  rating_over_time_fig,
42
  opponent_rating_distr_fig,
43
  opponent_rating_dist_over_time_fig,
 
95
  num_comps_box = gr.Textbox(lines=1, label="Number of competitions (tournaments/leagues) played")
96
  with gr.Column():
97
  num_matches_box = gr.Textbox(lines=1, label="Number of matches played")
98
+ with gr.Column():
99
+ first_competition_box = gr.Textbox(lines=1, label="First competition")
100
+ with gr.Column():
101
+ num_active_years_box = gr.Textbox(lines=1, label="Number of active years (participated in at least 1 competition)")
102
 
103
  with gr.Row():
104
  with gr.Column():
 
159
  peak_rating_box,
160
  num_comps_box,
161
  num_matches_box,
162
+ first_competition_box,
163
+ num_active_years_box,
164
  rating_over_time_plot,
165
  opponent_rating_dist_plot,
166
  opponent_rating_dist_over_time_plot,