diff options
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4,9 +4,6 @@ from collections import Counter | |||
4 | import pygal | 4 | import pygal |
5 | import numpy as np | 5 | import numpy as np |
6 | 6 | ||
7 | __author__ = 'pacien' | ||
8 | |||
9 | |||
10 | BAN_MAP_FILE = "output/ban-map.svg" | 7 | BAN_MAP_FILE = "output/ban-map.svg" |
11 | BAN_DURATION_MAP_FILE = "output/ban-duration-map.svg" | 8 | BAN_DURATION_MAP_FILE = "output/ban-duration-map.svg" |
12 | HIST_FILE = "output/histogram.svg" | 9 | HIST_FILE = "output/histogram.svg" |
@@ -20,7 +17,11 @@ ban_dict_list = bandict.BanList(BAN_FILE) | |||
20 | # ======== HISTOGRAM ======= # | 17 | # ======== HISTOGRAM ======= # |
21 | 18 | ||
22 | ban_durations = ban_dict_list.get_durations() | 19 | ban_durations = ban_dict_list.get_durations() |
23 | (ban_durations_bars, bins) = np.histogram(ban_durations, bins=[round(365/12*x) for x in range(1, 50+2)]) | 20 | (ban_durations_bars, bins) = np.histogram(ban_durations, |
21 | bins=[round(365/12*x) | ||
22 | for x in range(1, 50+2) | ||
23 | ] | ||
24 | ) | ||
24 | 25 | ||
25 | print("[INFO]", "Generating histogram") | 26 | print("[INFO]", "Generating histogram") |
26 | bar_chart = pygal.Bar(legend_at_bottom=True) | 27 | bar_chart = pygal.Bar(legend_at_bottom=True) |