summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinijackson2014-10-23 20:43:03 +0200
committerMinijackson2014-10-23 20:43:03 +0200
commit9539c83b76244e21a562143fc1c22c3000968e5d (patch)
tree2518598983a38ad02733bc7f0ecbaa750987caa3
parent25682dfbad10996b2e23ccbb3fef87636d919c03 (diff)
downloadwikistats-histogram.tar.gz
Adding gathering of data (watchers, revisions) + beginnig of histogramhistogram
-rw-r--r--res/Pages50
-rw-r--r--res/data-out202
-rw-r--r--src/downloader/__init__.py1
-rw-r--r--src/histogram/__init__.py19
-rw-r--r--src/main.py68
5 files changed, 339 insertions, 1 deletions
diff --git a/res/Pages b/res/Pages
new file mode 100644
index 0000000..d00c484
--- /dev/null
+++ b/res/Pages
@@ -0,0 +1,50 @@
1Paris
213 Vendémiaire
3Place de l'Hôtel-de-Ville
4Battle of Paris (1814)
5Siege of Paris (1590)
6Siege of Paris (845)
7Siege of Paris (1870–71)
8Timeline of Paris
9Hôtel de Ville (Paris Métro)
10Autonomous Port of Paris
11Hôtel de Ville, Paris
12Saint-Jacques Tower
13Bazar de l'Hôtel de Ville
14Rue de Rivoli, Paris
15Saint-Merri
16Hôtel-Dieu de Paris
17Fontaine du Palmier
18Place du Châtelet
19St-Gervais-et-St-Protais
20Pont au Change
21Rue des Lombards
22Châtelet (Paris Métro)
23Stravinsky Fountain
24Île de la Cité
25Théâtre du Châtelet
26IRCAM
27Cité (Paris Métro)
28La Force Prison
294th arrondissement of Paris
30Le Duc des Lombards
31Musée de Notre Dame de Paris
32Conciergerie
33Prefecture of Police of Paris
34Le Baiser Salé
35Roman Catholic Archdiocese of Paris
36Parvis Notre-Dame – place Jean-Paul-II
37Sunset/Sunside
38Siege of Paris (885–86)
39Notre Dame de Paris
40Palais de Justice, Paris
41Rue de la Ferronnerie
42Sainte-Chapelle
43Centre Georges Pompidou
44Petit Pont
45Place Joachim-du-Bellay
46Holy Innocents' Cemetery
47Fontaine des Innocents
48Fontaine Maubuée
49Court of Cassation (France)
50Direction Régionale de Police Judiciaire de Paris \ No newline at end of file
diff --git a/res/data-out b/res/data-out
new file mode 100644
index 0000000..f22a646
--- /dev/null
+++ b/res/data-out
@@ -0,0 +1,202 @@
1{
2 "Place du Châtelet": {
3 "watchers": 0,
4 "revisions": 47
5 },
6 "4th arrondissement of Paris": {
7 "watchers": 0,
8 "revisions": 170
9 },
10 "Siege of Paris (845)": {
11 "watchers": 0,
12 "revisions": 91
13 },
14 "Hôtel de Ville (Paris Métro)": {
15 "watchers": 0,
16 "revisions": 65
17 },
18 "Rue de Rivoli, Paris": {
19 "watchers": 0,
20 "revisions": 114
21 },
22 "St-Gervais-et-St-Protais": {
23 "watchers": 0,
24 "revisions": 110
25 },
26 "Paris": {
27 "watchers": 859,
28 "revisions": 13750
29 },
30 "Notre Dame de Paris": {
31 "watchers": 161,
32 "revisions": 3559
33 },
34 "Sunset/Sunside": {
35 "watchers": 0,
36 "revisions": 13
37 },
38 "Battle of Paris (1814)": {
39 "watchers": 0,
40 "revisions": 163
41 },
42 "Place Joachim-du-Bellay": {
43 "watchers": 0,
44 "revisions": 23
45 },
46 "IRCAM": {
47 "watchers": 0,
48 "revisions": 235
49 },
50 "Petit Pont": {
51 "watchers": 0,
52 "revisions": 80
53 },
54 "Hôtel de Ville, Paris": {
55 "watchers": 0,
56 "revisions": 231
57 },
58 "Autonomous Port of Paris": {
59 "watchers": 0,
60 "revisions": 12
61 },
62 "Place de l'Hôtel-de-Ville": {
63 "watchers": 0,
64 "revisions": 78
65 },
66 "Conciergerie": {
67 "watchers": 32,
68 "revisions": 291
69 },
70 "La Force Prison": {
71 "watchers": 0,
72 "revisions": 76
73 },
74 "Théâtre du Châtelet": {
75 "watchers": 0,
76 "revisions": 77
77 },
78 "Châtelet (Paris Métro)": {
79 "watchers": 0,
80 "revisions": 124
81 },
82 "Siege of Paris (1590)": {
83 "watchers": 0,
84 "revisions": 52
85 },
86 "Palais de Justice, Paris": {
87 "watchers": 0,
88 "revisions": 96
89 },
90 "Île de la Cité": {
91 "watchers": 36,
92 "revisions": 242
93 },
94 "Timeline of Paris": {
95 "watchers": 0,
96 "revisions": 1034
97 },
98 "Roman Catholic Archdiocese of Paris": {
99 "watchers": 0,
100 "revisions": 166
101 },
102 "Siege of Paris (885–86)": {
103 "watchers": 38,
104 "revisions": 232
105 },
106 "Centre Georges Pompidou": {
107 "watchers": 64,
108 "revisions": 1021
109 },
110 "Holy Innocents' Cemetery": {
111 "watchers": 0,
112 "revisions": 99
113 },
114 "Saint-Merri": {
115 "watchers": 0,
116 "revisions": 66
117 },
118 "Le Baiser Salé": {
119 "watchers": 0,
120 "revisions": 16
121 },
122 "Saint-Jacques Tower": {
123 "watchers": 0,
124 "revisions": 104
125 },
126 "Sainte-Chapelle": {
127 "watchers": 44,
128 "revisions": 483
129 },
130 "Fontaine du Palmier": {
131 "watchers": 0,
132 "revisions": 39
133 },
134 "Fontaine des Innocents": {
135 "watchers": 0,
136 "revisions": 95
137 },
138 "Fontaine Maubuée": {
139 "watchers": 0,
140 "revisions": 18
141 },
142 "Hôtel-Dieu de Paris": {
143 "watchers": 0,
144 "revisions": 108
145 },
146 "Rue de la Ferronnerie": {
147 "watchers": 0,
148 "revisions": 23
149 },
150 "Le Duc des Lombards": {
151 "watchers": 0,
152 "revisions": 16
153 },
154 "Cité (Paris Métro)": {
155 "watchers": 0,
156 "revisions": 67
157 },
158 "Bazar de l'Hôtel de Ville": {
159 "watchers": 0,
160 "revisions": 39
161 },
162 "13 Vendémiaire": {
163 "watchers": 0,
164 "revisions": 149
165 },
166 "Rue des Lombards": {
167 "watchers": 0,
168 "revisions": 13
169 },
170 "Direction Régionale de Police Judiciaire de Paris": {
171 "watchers": 0,
172 "revisions": 59
173 },
174 "Musée de Notre Dame de Paris": {
175 "watchers": 0,
176 "revisions": 15
177 },
178 "Court of Cassation (France)": {
179 "watchers": 0,
180 "revisions": 504
181 },
182 "Pont au Change": {
183 "watchers": 0,
184 "revisions": 55
185 },
186 "Stravinsky Fountain": {
187 "watchers": 0,
188 "revisions": 104
189 },
190 "Siege of Paris (1870–71)": {
191 "watchers": 31,
192 "revisions": 272
193 },
194 "Prefecture of Police of Paris": {
195 "watchers": 0,
196 "revisions": 162
197 },
198 "Parvis Notre-Dame – place Jean-Paul-II": {
199 "watchers": 0,
200 "revisions": 11
201 }
202} \ No newline at end of file
diff --git a/src/downloader/__init__.py b/src/downloader/__init__.py
index baabb36..831ea06 100644
--- a/src/downloader/__init__.py
+++ b/src/downloader/__init__.py
@@ -57,7 +57,6 @@ class Downloader():
57 limit = 0 57 limit = 0
58 58
59 temp_result = self.download(endpoint, data_type, params, temp_limit) 59 temp_result = self.download(endpoint, data_type, params, temp_limit)
60 print(list(temp_result[0].keys()))
61 if "query-continue" in temp_result[0].keys(): 60