summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinijackson2014-10-24 10:25:06 +0200
committerMinijackson2014-10-24 10:25:06 +0200
commit77a34dbd7cc54caa09b04e167227d92091cda148 (patch)
tree4d9017c915414c8d5c51869ee7fe5a3602b2eaaa
parenta95864928cd74df172f172d7c18b4d89e82548e1 (diff)
downloadwikistats-77a34dbd7cc54caa09b04e167227d92091cda148.tar.gz
Visual tweaking
-rw-r--r--banapedia/__init__.py2
-rw-r--r--banapedia/api/__init__.py1
-rw-r--r--banapedia/wapi/__init__.py1
-rw-r--r--main.py9
4 files changed, 5 insertions, 8 deletions
diff --git a/banapedia/__init__.py b/banapedia/__init__.py
index 93efc48..8b13789 100644
--- a/banapedia/__init__.py
+++ b/banapedia/__init__.py
@@ -1,3 +1 @@
1__author__ = 'pacien'
2
3
diff --git a/banapedia/api/__init__.py b/banapedia/api/__init__.py
index a0f842f..e69de29 100644
--- a/banapedia/api/__init__.py
+++ b/banapedia/api/__init__.py
@@ -1 +0,0 @@
1__author__ = 'pacien'
diff --git a/banapedia/wapi/__init__.py b/banapedia/wapi/__init__.py
index a0f842f..e69de29 100644
--- a/banapedia/wapi/__init__.py
+++ b/banapedia/wapi/__init__.py
@@ -1 +0,0 @@
1__author__ = 'pacien'
diff --git a/main.py b/main.py
index 548cb30..6fd59ce 100644
--- a/main.py
+++ b/main.py
@@ -4,9 +4,6 @@ from collections import Counter
4import pygal 4import pygal
5import numpy as np 5import numpy as np
6 6
7__author__ = 'pacien'
8
9
10BAN_MAP_FILE = "output/ban-map.svg" 7BAN_MAP_FILE = "output/ban-map.svg"
11BAN_DURATION_MAP_FILE = "output/ban-duration-map.svg" 8BAN_DURATION_MAP_FILE = "output/ban-duration-map.svg"
12HIST_FILE = "output/histogram.svg" 9HIST_FILE = "output/histogram.svg"
@@ -20,7 +17,11 @@ ban_dict_list = bandict.BanList(BAN_FILE)
20# ======== HISTOGRAM ======= # 17# ======== HISTOGRAM ======= #
21 18
22ban_durations = ban_dict_list.get_durations() 19ban_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
25print("[INFO]", "Generating histogram") 26print("[INFO]", "Generating histogram")
26bar_chart = pygal.Bar(legend_at_bottom=True) 27bar_chart = pygal.Bar(legend_at_bottom=True)