Skip to content

Commit d300386

Browse files
committed
Use _ instead of space in metric names
1 parent d22ecbc commit d300386

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# The metrics for which an analysis should be performed.
22
metrics:
33
- hhi
4-
- shannon entropy
4+
- shannon_entropy
55
- gini
6-
- total entities
6+
- total_entities
77
- tau=0.33
88
- tau=0.5
99
- tau=0.66
@@ -48,9 +48,9 @@ plot_parameters:
4848
- tezos
4949
metrics:
5050
- hhi
51-
- shannon entropy
51+
- shannon_entropy
5252
- gini
53-
- total entities
53+
- total_entities
5454
- tau=0.33
5555
- tau=0.5
5656
- tau=0.66

tokenomics_decentralization/analyze.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def analyze_snapshot(conn, ledger, snapshot):
3131

3232
compute_functions = {
3333
'hhi': compute_hhi,
34-
'shannon entropy': compute_shannon_entropy,
34+
'shannon_entropy': compute_shannon_entropy,
3535
'gini': compute_gini,
36-
'total entities': compute_total_entities,
36+
'total_entities': compute_total_entities,
3737
'mpr': compute_max_power_ratio,
3838
'theil': compute_theil_index
3939
}
@@ -69,7 +69,7 @@ def analyze_snapshot(conn, ledger, snapshot):
6969

7070
if top_limit_value > 0:
7171
if top_limit_type == 'percentage':
72-
total_entities = compute_functions['total entities'](entries, circulation)
72+
total_entities = compute_functions['total_entities'](entries, circulation)
7373
top_limit_percentage_value = int(total_entities * top_limit_value)
7474
entries = entries[:top_limit_percentage_value]
7575
elif top_limit_type == 'absolute':

0 commit comments

Comments
 (0)