-
Notifications
You must be signed in to change notification settings - Fork 1
/
data_structure.txt
80 lines (64 loc) · 1.99 KB
/
data_structure.txt
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Data structures
## Scoresheet
years = {
"2019": events = [
Event object
event_data = { # Will be used to construct a string like "U14 epee individual event"
start_date: "20220517"
school_years: "10-12", # One of the two:
age_bracket: "U14", # Either school_years for SACS, or age_bracket for interschool
weapon: "epee",
type: "individual" # "individual" or "group"
}
fencers = [
Fencer object
fencer_id ("ID" + integer, e.g. "ID025" "ID001")
name
]
rounds = [
Round object
metadata = {dates: Datetime object}
rankings = fencer_id[] (sorted in desc. order, best to worst)
processed_data = {
fencer_id: {"v", "m", "v/m", hg", "hr", "ind"}
}
poules = [
Poule object
fencer_ids = fencer_id[] (keys corresponding to raw_data)
raw_data (basically user input into scorecard)
]
]
]
"2020": events
"2021": events
}
###### OLD ######
years = {
"2019": events
"2020": events
"2021": events
}
events = [
{
school_years: "10-12",
rounds: [
Round object
metadata = {dates: Datetime object}
fencers = [
Fencer object
fencer_id ("ID" + integer, e.g. "ID25" "ID1")
name
data = {wins, losses, HR, HG, ind} # could be an object (unecessary)
]
poules = [
Poule object
key (list of fencer ids)
raw_data (basically user input into scorecard)
]
]
}
]
NOTE: the index of the fencer ids in keys corresponds to the index of rows & columsn of raw_data - so basically a parallel list
todo: incorporate the two, or split it up into sub sections.
note: age_brackets changed to categories and then to events
"ages" changed to "school_years" (as SACS groups events by school year). Might change back to "ages" if used in interschool - they group by U14, U16, U19.