mariagrandury commited on
Commit
5def33e
·
1 Parent(s): 6e6687a

update personal leaderboard

Browse files
Files changed (3) hide show
  1. app.py +6 -10
  2. leaderboard.csv +0 -39
  3. leaderboard_personal.csv +39 -0
app.py CHANGED
@@ -26,7 +26,7 @@ INCLUDE_CSV = os.path.join(DATA_DIR, "include.csv")
26
  STEREOTYPES_CSV = os.path.join(DATA_DIR, "stereotypes.csv")
27
  ARENA_JSON = os.path.join(DATA_DIR, "arena.json")
28
  PARTICIPANTS_CSV = os.path.join(DATA_DIR, "participants.csv")
29
- LEADERBOARD_CSV = os.path.join(".", "leaderboard.csv")
30
 
31
  countries = {
32
  "Argentina": {"iso": "ARG", "emoji": "🇦🇷"},
@@ -278,25 +278,21 @@ def consolidate_all_data():
278
 
279
  rows = []
280
  for _, data in user_contributions.items():
281
- total = (
282
- data["blend_es"] + data["include"] + data["estereotipos"] + data["arena"]
283
- )
284
  row = {
285
  "Username": data["username"],
286
- "Total": total,
287
- "Blend-es": data["blend_es"],
288
- "INCLUDE": data["include"],
289
- "Estereotipos": data["estereotipos"],
290
  "Arena": data["arena"],
 
 
 
291
  }
292
  rows.append(row)
293
 
294
  df = pd.DataFrame(rows)
295
 
296
  if not df.empty:
297
- df = df.sort_values("Total", ascending=False)
298
 
299
- with open(LEADERBOARD_CSV, "w", encoding="utf-8") as f:
300
  df.to_csv(f, index=False)
301
 
302
  return df
 
26
  STEREOTYPES_CSV = os.path.join(DATA_DIR, "stereotypes.csv")
27
  ARENA_JSON = os.path.join(DATA_DIR, "arena.json")
28
  PARTICIPANTS_CSV = os.path.join(DATA_DIR, "participants.csv")
29
+ LEADERBOARD_PERSONAL_CSV = os.path.join(".", "leaderboard_personal.csv")
30
 
31
  countries = {
32
  "Argentina": {"iso": "ARG", "emoji": "🇦🇷"},
 
278
 
279
  rows = []
280
  for _, data in user_contributions.items():
 
 
 
281
  row = {
282
  "Username": data["username"],
 
 
 
 
283
  "Arena": data["arena"],
284
+ "Blend-ES": data["blend_es"],
285
+ "Estereotipos": data["estereotipos"],
286
+ "INCLUDE": data["include"],
287
  }
288
  rows.append(row)
289
 
290
  df = pd.DataFrame(rows)
291
 
292
  if not df.empty:
293
+ df = df.sort_values("Arena", ascending=False)
294
 
295
+ with open(LEADERBOARD_PERSONAL_CSV, "w", encoding="utf-8") as f:
296
  df.to_csv(f, index=False)
297
 
298
  return df
leaderboard.csv DELETED
@@ -1,39 +0,0 @@
1
- Username,Total,Blend-es,INCLUDE,Estereotipos,Arena
2
- bea esparcia,206,0,0,126,80
3
- andres_seba,190,0,0,70,120
4
- jj,168,0,0,85,83
5
- roverico,141,0,0,1,140
6
- steminism,133,0,0,0,133
7
- neovalleltd,122,0,0,122,0
8
- mcdaqc,118,0,0,0,118
9
- alexis_castillo,68,0,0,68,0
10
- angustias22,63,0,0,0,63
11
- henry mantilla,58,0,0,0,58
12
- elena w.,57,0,0,57,0
13
- fabianpp,50,0,0,0,50
14
- alvaro8gb,44,0,0,2,42
15
- enpaiva93,43,0,0,3,40
16
- adriszmar,42,0,0,20,22
17
- ghuerta170,35,0,0,0,35
18
- edmenciab,30,0,0,0,30
19
- alebravo,30,0,0,30,0
20
- jedzill4,27,0,0,27,0
21
- gonznm,24,0,0,24,0
22
- luceldasilva,23,0,0,0,23
23
- agumeister,21,0,0,21,0
24
- helenpy,19,0,0,0,19
25
- danielcavilla,19,0,0,0,19
26
- jorge.vallego,14,0,0,14,0
27
- jorgeav,13,0,0,13,0
28
- maria isabel ll,12,0,0,12,0
29
- gonzalo_40146,8,0,0,0,8
30
- clauvallory,5,0,0,5,0
31
- dramos7,5,0,0,5,0
32
- lucase#5596,3,0,0,3,0
33
- daelsand,2,0,0,2,0
34
- da.qc,2,0,0,2,0
35
- gfuentes2000,1,0,0,0,1
36
- gonzalo.fuentes,1,0,0,0,1
37
- freddyalfonsoboulton,1,0,0,1,0
38
- yee51,1,0,0,1,0
39
- valaery,1,0,0,1,0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
leaderboard_personal.csv ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Username,Arena,Blend-ES,Estereotipos,INCLUDE
2
+ roverico,140,0,1,0
3
+ steminism,133,0,0,0
4
+ andres_seba,120,0,70,0
5
+ mcdaqc,118,0,0,0
6
+ jj,83,0,85,0
7
+ bea esparcia,80,0,126,0
8
+ angustias22,63,0,0,0
9
+ henry mantilla,58,0,0,0
10
+ fabianpp,50,0,0,0
11
+ alvaro8gb,42,0,2,0
12
+ enpaiva93,40,0,3,0
13
+ ghuerta170,35,0,0,0
14
+ edmenciab,30,0,0,0
15
+ luceldasilva,23,0,0,0
16
+ adriszmar,22,0,20,0
17
+ helenpy,19,0,0,0
18
+ danielcavilla,19,0,0,0
19
+ gonzalo_40146,8,0,0,0
20
+ gonzalo.fuentes,1,0,0,0
21
+ gfuentes2000,1,0,0,0
22
+ alexis_castillo,0,0,68,0
23
+ elena w.,0,0,57,0
24
+ alebravo,0,0,30,0
25
+ jedzill4,0,0,27,0
26
+ gonznm,0,0,24,0
27
+ agumeister,0,0,21,0
28
+ maria isabel ll,0,0,12,0
29
+ dramos7,0,0,5,0
30
+ freddyalfonsoboulton,0,0,1,0
31
+ yee51,0,0,1,0
32
+ valaery,0,0,1,0
33
+ jorge.vallego,0,0,14,0
34
+ neovalleltd,0,0,122,0
35
+ daelsand,0,0,2,0
36
+ jorgeav,0,0,13,0
37
+ lucase#5596,0,0,3,0
38
+ clauvallory,0,0,5,0
39
+ da.qc,0,0,2,0