   (:refer-clojure :exclude [find sort])
   (:require [gorilla-plot.core :refer :all]
             [ceres.collector :refer :all]
-            [ceres.curator :refer [start-date end-date random-tree build-tree-from-source]]
+            [ceres.curator :refer [start-date end-date random-tree build-tree-from-source compute-summary]]
             [monger.collection :as mc]
             [clj-time.core :as t]
             [clj-time.periodic :as p]

  (bar-chart (keys users) (vals users) :plot-size 800))
;; @@
;; =>
;;; {"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"ordinal","range":"width","domain":{"data":"371497d0-02d0-42e8-9d24-56d3b8d7f44d","field":"data.x"}},{"name":"y","range":"height","nice":true,"domain":{"data":"371497d0-02d0-42e8-9d24-56d3b8d7f44d","field":"data.y"}}],"marks":[{"type":"rect","from":{"data":"371497d0-02d0-42e8-9d24-56d3b8d7f44d"},"properties":{"enter":{"y":{"scale":"y","field":"data.y"},"width":{"offset":-1,"scale":"x","band":true},"x":{"scale":"x","field":"data.x"},"y2":{"scale":"y","value":0}},"update":{"fill":{"value":"steelblue"},"opacity":{"value":1}},"hover":{"fill":{"value":"#FF29D2"}}}}],"data":[{"name":"371497d0-02d0-42e8-9d24-56d3b8d7f44d","values":[{"x":"tagesschau","y":10},{"x":"stmeyer2401","y":1},{"x":"CptLeto","y":1},{"x":"g_rantelhuber","y":1},{"x":"DerAnimenator","y":1},{"x":"mistakrass","y":1},{"x":"BukosWelt","y":1},{"x":"derMylius","y":1},{"x":"DL_schreibt","y":1},{"x":"ManorMFL","y":1}]}],"width":800,"height":494.4375915527344,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"ordinal\", :range \"width\", :domain {:data \"371497d0-02d0-42e8-9d24-56d3b8d7f44d\", :field \"data.x\"}} {:name \"y\", :range \"height\", :nice true, :domain {:data \"371497d0-02d0-42e8-9d24-56d3b8d7f44d\", :field \"data.y\"}}], :marks [{:type \"rect\", :from {:data \"371497d0-02d0-42e8-9d24-56d3b8d7f44d\"}, :properties {:enter {:y {:scale \"y\", :field \"data.y\"}, :width {:offset -1, :scale \"x\", :band true}, :x {:scale \"x\", :field \"data.x\"}, :y2 {:scale \"y\", :value 0}}, :update {:fill {:value \"steelblue\"}, :opacity {:value 1}}, :hover {:fill {:value \"#FF29D2\"}}}}], :data [{:name \"371497d0-02d0-42e8-9d24-56d3b8d7f44d\", :values ({:x \"tagesschau\", :y 10} {:x \"stmeyer2401\", :y 1} {:x \"CptLeto\", :y 1} {:x \"g_rantelhuber\", :y 1} {:x \"DerAnimenator\", :y 1} {:x \"mistakrass\", :y 1} {:x \"BukosWelt\", :y 1} {:x \"derMylius\", :y 1} {:x \"DL_schreibt\", :y 1} {:x \"ManorMFL\", :y 1})}], :width 800, :height 494.4376, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}
;; <=

;; **

  (histogram delays :plot-size 900))
;; @@
;; =>
;;; {"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"e1ae6cef-e4bc-432c-8907-3ced3cadc127","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"e1ae6cef-e4bc-432c-8907-3ced3cadc127","field":"data.y"}}],"marks":[{"type":"line","from":{"data":"e1ae6cef-e4bc-432c-8907-3ced3cadc127"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"data":[{"name":"e1ae6cef-e4bc-432c-8907-3ced3cadc127","values":[{"x":0.0,"y":0},{"x":1888.1066406250004,"y":461.0},{"x":3776.213281250001,"y":6.0},{"x":5664.3199218750015,"y":6.0},{"x":7552.426562500002,"y":3.0},{"x":9440.533203125002,"y":0.0},{"x":11328.639843750003,"y":0.0},{"x":13216.746484375004,"y":2.0},{"x":15104.853125000005,"y":0.0},{"x":16992.959765625004,"y":0.0},{"x":18881.066406250004,"y":1.0},{"x":20769.173046875003,"y":0}]}],"width":900,"height":556.2422485351562,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"e1ae6cef-e4bc-432c-8907-3ced3cadc127\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"e1ae6cef-e4bc-432c-8907-3ced3cadc127\", :field \"data.y\"}}], :marks [{:type \"line\", :from {:data \"e1ae6cef-e4bc-432c-8907-3ced3cadc127\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :data [{:name \"e1ae6cef-e4bc-432c-8907-3ced3cadc127\", :values ({:x 0.0, :y 0} {:x 1888.1066406250004, :y 461.0} {:x 3776.213281250001, :y 6.0} {:x 5664.3199218750015, :y 6.0} {:x 7552.426562500002, :y 3.0} {:x 9440.533203125002, :y 0.0} {:x 11328.639843750003, :y 0.0} {:x 13216.746484375004, :y 2.0} {:x 15104.853125000005, :y 0.0} {:x 16992.959765625004, :y 0.0} {:x 18881.066406250004, :y 1.0} {:x 20769.173046875003, :y 0})}], :width 900, :height 556.24225, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}
;; <=

;; **
;;; ### Example Summary
;; **

;; @@
(def dpa-summary (compute-summary "dpa"))
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-var'>#&#x27;unsightly-reserve/dpa-summary</span>","value":"#'unsightly-reserve/dpa-summary"}
;; <=

;; @@
(keys dpa-summary)
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-unkown'>(:source :article-count :analytics :pub-times :total-impact :avg-impact :no-reactions :avg-height)</span>","value":"(:source :article-count :analytics :pub-times :total-impact :avg-impact :no-reactions :avg-height)"}
;; <=

;; @@
(dissoc dpa-summary :analytics :pub-times)
;; @@
;; =>
;;; {"type":"list-like","open":"<span class='clj-map'>{</span>","close":"<span class='clj-map'>}</span>","separator":", ","items":[{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:source</span>","value":":source"},{"type":"html","content":"<span class='clj-string'>&quot;dpa&quot;</span>","value":"\"dpa\""}],"value":"[:source \"dpa\"]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:article-count</span>","value":":article-count"},{"type":"html","content":"<span class='clj-unkown'>965</span>","value":"965"}],"value":"[:article-count 965]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:total-impact</span>","value":":total-impact"},{"type":"html","content":"<span class='clj-long'>4811</span>","value":"4811"}],"value":"[:total-impact 4811]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:avg-impact</span>","value":":avg-impact"},{"type":"html","content":"<span class='clj-unkown'>4.985492</span>","value":"4.985492"}],"value":"[:avg-impact 4.985492]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:no-reactions</span>","value":":no-reactions"},{"type":"html","content":"<span class='clj-unkown'>0.19170985</span>","value":"0.19170985"}],"value":"[:no-reactions 0.19170985]"},{"type":"list-like","open":"","close":"","separator":" ","items":[{"type":"html","content":"<span class='clj-keyword'>:avg-height</span>","value":":avg-height"},{"type":"html","content":"<span class='clj-unkown'>0.98031086</span>","value":"0.98031086"}],"value":"[:avg-height 0.98031086]"}],"value":"{:source \"dpa\", :article-count 965, :total-impact 4811, :avg-impact 4.985492, :no-reactions 0.19170985, :avg-height 0.98031086}"}
;; <=

;; @@
(-> dpa-summary :analytics first keys)
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-unkown'>(:size :height :users :pub-times :hashtags :delays)</span>","value":"(:size :height :users :pub-times :hashtags :delays)"}
;; <=

;; @@
(let [sizes (->> dpa-summary :analytics (map :size))]
  (histogram sizes :plot-size 900 :bins 100))
;; @@
;; =>
;;; {"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d","field":"data.y"}}],"marks":[{"type":"line","from":{"data":"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"data":[{"name":"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d","values":[{"x":1.0,"y":0},{"x":1.56,"y":185.0},{"x":2.12,"y":112.0},{"x":2.68,"y":0.0},{"x":3.24,"y":149.0},{"x":3.8000000000000003,"y":0.0},{"x":4.36,"y":112.0},{"x":4.92,"y":0.0},{"x":5.48,"y":101.0},{"x":6.040000000000001,"y":76.0},{"x":6.600000000000001,"y":0.0},{"x":7.160000000000002,"y":48.0},{"x":7.720000000000002,"y":0.0},{"x":8.280000000000003,"y":42.0},{"x":8.840000000000003,"y":0.0},{"x":9.400000000000004,"y":40.0},{"x":9.960000000000004,"y":0.0},{"x":10.520000000000005,"y":24.0},{"x":11.080000000000005,"y":20.0},{"x":11.640000000000006,"y":0.0},{"x":12.200000000000006,"y":7.0},{"x":12.760000000000007,"y":0.0},{"x":13.320000000000007,"y":3.0},{"x":13.880000000000008,"y":0.0},{"x":14.440000000000008,"y":9.0},{"x":15.000000000000009,"y":5.0},{"x":15.56000000000001,"y":0.0},{"x":16.120000000000008,"y":4.0},{"x":16.680000000000007,"y":0.0},{"x":17.240000000000006,"y":3.0},{"x":17.800000000000004,"y":0.0},{"x":18.360000000000003,"y":6.0},{"x":18.92,"y":0.0},{"x":19.48,"y":3.0},{"x":20.04,"y":1.0},{"x":20.599999999999998,"y":0.0},{"x":21.159999999999997,"y":2.0},{"x":21.719999999999995,"y":0.0},{"x":22.279999999999994,"y":2.0},{"x":22.839999999999993,"y":0.0},{"x":23.39999999999999,"y":6.0},{"x":23.95999999999999,"y":0.0},{"x":24.51999999999999,"y":0.0},{"x":25.079999999999988,"y":0.0},{"x":25.639999999999986,"y":0.0},{"x":26.199999999999985,"y":1.0},{"x":26.759999999999984,"y":0.0},{"x":27.319999999999983,"y":1.0},{"x":27.87999999999998,"y":0.0},{"x":28.43999999999998,"y":0.0},{"x":28.99999999999998,"y":0.0},{"x":29.559999999999977,"y":0.0},{"x":30.119999999999976,"y":0.0},{"x":30.679999999999975,"y":0.0},{"x":31.239999999999974,"y":0.0},{"x":31.799999999999972,"y":0.0},{"x":32.35999999999997,"y":0.0},{"x":32.91999999999997,"y":0.0},{"x":33.479999999999976,"y":0.0},{"x":34.03999999999998,"y":0.0},{"x":34.59999999999998,"y":0.0},{"x":35.15999999999998,"y":0.0},{"x":35.719999999999985,"y":0.0},{"x":36.27999999999999,"y":0.0},{"x":36.83999999999999,"y":0.0},{"x":37.39999999999999,"y":0.0},{"x":37.959999999999994,"y":0.0},{"x":38.519999999999996,"y":0.0},{"x":39.08,"y":0.0},{"x":39.64,"y":0.0},{"x":40.2,"y":1.0},{"x":40.760000000000005,"y":0.0},{"x":41.32000000000001,"y":0.0},{"x":41.88000000000001,"y":0.0},{"x":42.44000000000001,"y":0.0},{"x":43.000000000000014,"y":0.0},{"x":43.56000000000002,"y":0.0},{"x":44.12000000000002,"y":0.0},{"x":44.68000000000002,"y":0.0},{"x":45.24000000000002,"y":0.0},{"x":45.800000000000026,"y":0.0},{"x":46.36000000000003,"y":0.0},{"x":46.92000000000003,"y":0.0},{"x":47.48000000000003,"y":0.0},{"x":48.040000000000035,"y":0.0},{"x":48.60000000000004,"y":0.0},{"x":49.16000000000004,"y":0.0},{"x":49.72000000000004,"y":0.0},{"x":50.280000000000044,"y":0.0},{"x":50.840000000000046,"y":0.0},{"x":51.40000000000005,"y":0.0},{"x":51.96000000000005,"y":0.0},{"x":52.52000000000005,"y":0.0},{"x":53.080000000000055,"y":0.0},{"x":53.64000000000006,"y":0.0},{"x":54.20000000000006,"y":0.0},{"x":54.76000000000006,"y":0.0},{"x":55.320000000000064,"y":0.0},{"x":55.88000000000007,"y":0.0},{"x":56.44000000000007,"y":1.0},{"x":57.00000000000007,"y":1.0},{"x":57.56000000000007,"y":0}]}],"width":900,"height":556.2422485351562,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d\", :field \"data.y\"}}], :marks [{:type \"line\", :from {:data \"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :data [{:name \"19440ce8-a377-4c0e-9c4b-6e0ffe9e784d\", :values ({:x 1.0, :y 0} {:x 1.56, :y 185.0} {:x 2.12, :y 112.0} {:x 2.68, :y 0.0} {:x 3.24, :y 149.0} {:x 3.8000000000000003, :y 0.0} {:x 4.36, :y 112.0} {:x 4.92, :y 0.0} {:x 5.48, :y 101.0} {:x 6.040000000000001, :y 76.0} {:x 6.600000000000001, :y 0.0} {:x 7.160000000000002, :y 48.0} {:x 7.720000000000002, :y 0.0} {:x 8.280000000000003, :y 42.0} {:x 8.840000000000003, :y 0.0} {:x 9.400000000000004, :y 40.0} {:x 9.960000000000004, :y 0.0} {:x 10.520000000000005, :y 24.0} {:x 11.080000000000005, :y 20.0} {:x 11.640000000000006, :y 0.0} {:x 12.200000000000006, :y 7.0} {:x 12.760000000000007, :y 0.0} {:x 13.320000000000007, :y 3.0} {:x 13.880000000000008, :y 0.0} {:x 14.440000000000008, :y 9.0} {:x 15.000000000000009, :y 5.0} {:x 15.56000000000001, :y 0.0} {:x 16.120000000000008, :y 4.0} {:x 16.680000000000007, :y 0.0} {:x 17.240000000000006, :y 3.0} {:x 17.800000000000004, :y 0.0} {:x 18.360000000000003, :y 6.0} {:x 18.92, :y 0.0} {:x 19.48, :y 3.0} {:x 20.04, :y 1.0} {:x 20.599999999999998, :y 0.0} {:x 21.159999999999997, :y 2.0} {:x 21.719999999999995, :y 0.0} {:x 22.279999999999994, :y 2.0} {:x 22.839999999999993, :y 0.0} {:x 23.39999999999999, :y 6.0} {:x 23.95999999999999, :y 0.0} {:x 24.51999999999999, :y 0.0} {:x 25.079999999999988, :y 0.0} {:x 25.639999999999986, :y 0.0} {:x 26.199999999999985, :y 1.0} {:x 26.759999999999984, :y 0.0} {:x 27.319999999999983, :y 1.0} {:x 27.87999999999998, :y 0.0} {:x 28.43999999999998, :y 0.0} {:x 28.99999999999998, :y 0.0} {:x 29.559999999999977, :y 0.0} {:x 30.119999999999976, :y 0.0} {:x 30.679999999999975, :y 0.0} {:x 31.239999999999974, :y 0.0} {:x 31.799999999999972, :y 0.0} {:x 32.35999999999997, :y 0.0} {:x 32.91999999999997, :y 0.0} {:x 33.479999999999976, :y 0.0} {:x 34.03999999999998, :y 0.0} {:x 34.59999999999998, :y 0.0} {:x 35.15999999999998, :y 0.0} {:x 35.719999999999985, :y 0.0} {:x 36.27999999999999, :y 0.0} {:x 36.83999999999999, :y 0.0} {:x 37.39999999999999, :y 0.0} {:x 37.959999999999994, :y 0.0} {:x 38.519999999999996, :y 0.0} {:x 39.08, :y 0.0} {:x 39.64, :y 0.0} {:x 40.2, :y 1.0} {:x 40.760000000000005, :y 0.0} {:x 41.32000000000001, :y 0.0} {:x 41.88000000000001, :y 0.0} {:x 42.44000000000001, :y 0.0} {:x 43.000000000000014, :y 0.0} {:x 43.56000000000002, :y 0.0} {:x 44.12000000000002, :y 0.0} {:x 44.68000000000002, :y 0.0} {:x 45.24000000000002, :y 0.0} {:x 45.800000000000026, :y 0.0} {:x 46.36000000000003, :y 0.0} {:x 46.92000000000003, :y 0.0} {:x 47.48000000000003, :y 0.0} {:x 48.040000000000035, :y 0.0} {:x 48.60000000000004, :y 0.0} {:x 49.16000000000004, :y 0.0} {:x 49.72000000000004, :y 0.0} {:x 50.280000000000044, :y 0.0} {:x 50.840000000000046, :y 0.0} {:x 51.40000000000005, :y 0.0} {:x 51.96000000000005, :y 0.0} {:x 52.52000000000005, :y 0.0} {:x 53.080000000000055, :y 0.0} {:x 53.64000000000006, :y 0.0} {:x 54.20000000000006, :y 0.0} {:x 54.76000000000006, :y 0.0} {:x 55.320000000000064, :y 0.0} {:x 55.88000000000007, :y 0.0} {:x 56.44000000000007, :y 1.0} {:x 57.00000000000007, :y 1.0} {:x 57.56000000000007, :y 0})}], :width 900, :height 556.24225, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}
;; <=

;; @@
(let [delays (->> dpa-summary 
                  :analytics 
                  (map :delays) 
                  (map (fn [ds] (/ (reduce + ds) (count ds) 60)))
                  (remove #(> % 1440)))]
  (histogram delays :plot-size 900 :bins 100))
;; @@
;; =>
;;; {"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"12db4ced-ee32-4b85-8ae0-7ebe1c800da5","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"12db4ced-ee32-4b85-8ae0-7ebe1c800da5","field":"data.y"}}],"marks":[{"type":"line","from":{"data":"12db4ced-ee32-4b85-8ae0-7ebe1c800da5"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"data":[{"name":"12db4ced-ee32-4b85-8ae0-7ebe1c800da5","values":[{"x":0.0,"y":0},{"x":13.507833333333332,"y":477.0},{"x":27.015666666666664,"y":119.0},{"x":40.5235,"y":80.0},{"x":54.03133333333333,"y":53.0},{"x":67.53916666666666,"y":35.0},{"x":81.047,"y":31.0},{"x":94.55483333333333,"y":25.0},{"x":108.06266666666667,"y":20.0},{"x":121.57050000000001,"y":15.0},{"x":135.07833333333335,"y":15.0},{"x":148.58616666666668,"y":7.0},{"x":162.09400000000002,"y":6.0},{"x":175.60183333333336,"y":7.0},{"x":189.1096666666667,"y":3.0},{"x":202.61750000000004,"y":8.0},{"x":216.12533333333337,"y":3.0},{"x":229.6331666666667,"y":4.0},{"x":243.14100000000005,"y":2.0},{"x":256.64883333333336,"y":3.0},{"x":270.1566666666667,"y":1.0},{"x":283.66450000000003,"y":2.0},{"x":297.17233333333337,"y":2.0},{"x":310.6801666666667,"y":2.0},{"x":324.18800000000005,"y":0.0},{"x":337.6958333333334,"y":1.0},{"x":351.2036666666667,"y":1.0},{"x":364.71150000000006,"y":0.0},{"x":378.2193333333334,"y":3.0},{"x":391.72716666666673,"y":0.0},{"x":405.23500000000007,"y":0.0},{"x":418.7428333333334,"y":4.0},{"x":432.25066666666675,"y":0.0},{"x":445.7585000000001,"y":0.0},{"x":459.2663333333334,"y":0.0},{"x":472.77416666666676,"y":1.0},{"x":486.2820000000001,"y":1.0},{"x":499.78983333333343,"y":1.0},{"x":513.2976666666667,"y":0.0},{"x":526.8055,"y":0.0},{"x":540.3133333333334,"y":2.0},{"x":553.8211666666667,"y":0.0},{"x":567.3290000000001,"y":1.0},{"x":580.8368333333334,"y":0.0},{"x":594.3446666666667,"y":0.0},{"x":607.8525000000001,"y":3.0},{"x":621.3603333333334,"y":0.0},{"x":634.8681666666668,"y":1.0},{"x":648.3760000000001,"y":0.0},{"x":661.8838333333334,"y":0.0},{"x":675.3916666666668,"y":1.0},{"x":688.8995000000001,"y":0.0},{"x":702.4073333333334,"y":1.0},{"x":715.9151666666668,"y":0.0},{"x":729.4230000000001,"y":0.0},{"x":742.9308333333335,"y":1.0},{"x":756.4386666666668,"y":0.0},{"x":769.9465000000001,"y":2.0},{"x":783.4543333333335,"y":0.0},{"x":796.9621666666668,"y":0.0},{"x":810.4700000000001,"y":0.0},{"x":823.9778333333335,"y":1.0},{"x":837.4856666666668,"y":0.0},{"x":850.9935000000002,"y":1.0},{"x":864.5013333333335,"y":0.0},{"x":878.0091666666668,"y":0.0},{"x":891.5170000000002,"y":0.0},{"x":905.0248333333335,"y":0.0},{"x":918.5326666666668,"y":0.0},{"x":932.0405000000002,"y":1.0},{"x":945.5483333333335,"y":0.0},{"x":959.0561666666669,"y":1.0},{"x":972.5640000000002,"y":0.0},{"x":986.0718333333335,"y":1.0},{"x":999.5796666666669,"y":1.0},{"x":1013.0875000000002,"y":0.0},{"x":1026.5953333333334,"y":2.0},{"x":1040.1031666666668,"y":0.0},{"x":1053.611,"y":0.0},{"x":1067.1188333333334,"y":0.0},{"x":1080.6266666666668,"y":0.0},{"x":1094.1345000000001,"y":0.0},{"x":1107.6423333333335,"y":0.0},{"x":1121.1501666666668,"y":0.0},{"x":1134.6580000000001,"y":0.0},{"x":1148.1658333333335,"y":0.0},{"x":1161.6736666666668,"y":1.0},{"x":1175.1815000000001,"y":0.0},{"x":1188.6893333333335,"y":1.0},{"x":1202.1971666666668,"y":0.0},{"x":1215.7050000000002,"y":1.0},{"x":1229.2128333333335,"y":0.0},{"x":1242.7206666666668,"y":0.0},{"x":1256.2285000000002,"y":0.0},{"x":1269.7363333333335,"y":0.0},{"x":1283.2441666666668,"y":0.0},{"x":1296.7520000000002,"y":0.0},{"x":1310.2598333333335,"y":0.0},{"x":1323.7676666666669,"y":0.0},{"x":1337.2755000000002,"y":0.0},{"x":1350.7833333333335,"y":1.0},{"x":1364.2911666666669,"y":0}]}],"width":900,"height":556.2422485351562,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"12db4ced-ee32-4b85-8ae0-7ebe1c800da5\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"12db4ced-ee32-4b85-8ae0-7ebe1c800da5\", :field \"data.y\"}}], :marks [{:type \"line\", :from {:data \"12db4ced-ee32-4b85-8ae0-7ebe1c800da5\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :data [{:name \"12db4ced-ee32-4b85-8ae0-7ebe1c800da5\", :values ({:x 0.0, :y 0} {:x 13.507833333333332, :y 477.0} {:x 27.015666666666664, :y 119.0} {:x 40.5235, :y 80.0} {:x 54.03133333333333, :y 53.0} {:x 67.53916666666666, :y 35.0} {:x 81.047, :y 31.0} {:x 94.55483333333333, :y 25.0} {:x 108.06266666666667, :y 20.0} {:x 121.57050000000001, :y 15.0} {:x 135.07833333333335, :y 15.0} {:x 148.58616666666668, :y 7.0} {:x 162.09400000000002, :y 6.0} {:x 175.60183333333336, :y 7.0} {:x 189.1096666666667, :y 3.0} {:x 202.61750000000004, :y 8.0} {:x 216.12533333333337, :y 3.0} {:x 229.6331666666667, :y 4.0} {:x 243.14100000000005, :y 2.0} {:x 256.64883333333336, :y 3.0} {:x 270.1566666666667, :y 1.0} {:x 283.66450000000003, :y 2.0} {:x 297.17233333333337, :y 2.0} {:x 310.6801666666667, :y 2.0} {:x 324.18800000000005, :y 0.0} {:x 337.6958333333334, :y 1.0} {:x 351.2036666666667, :y 1.0} {:x 364.71150000000006, :y 0.0} {:x 378.2193333333334, :y 3.0} {:x 391.72716666666673, :y 0.0} {:x 405.23500000000007, :y 0.0} {:x 418.7428333333334, :y 4.0} {:x 432.25066666666675, :y 0.0} {:x 445.7585000000001, :y 0.0} {:x 459.2663333333334, :y 0.0} {:x 472.77416666666676, :y 1.0} {:x 486.2820000000001, :y 1.0} {:x 499.78983333333343, :y 1.0} {:x 513.2976666666667, :y 0.0} {:x 526.8055, :y 0.0} {:x 540.3133333333334, :y 2.0} {:x 553.8211666666667, :y 0.0} {:x 567.3290000000001, :y 1.0} {:x 580.8368333333334, :y 0.0} {:x 594.3446666666667, :y 0.0} {:x 607.8525000000001, :y 3.0} {:x 621.3603333333334, :y 0.0} {:x 634.8681666666668, :y 1.0} {:x 648.3760000000001, :y 0.0} {:x 661.8838333333334, :y 0.0} {:x 675.3916666666668, :y 1.0} {:x 688.8995000000001, :y 0.0} {:x 702.4073333333334, :y 1.0} {:x 715.9151666666668, :y 0.0} {:x 729.4230000000001, :y 0.0} {:x 742.9308333333335, :y 1.0} {:x 756.4386666666668, :y 0.0} {:x 769.9465000000001, :y 2.0} {:x 783.4543333333335, :y 0.0} {:x 796.9621666666668, :y 0.0} {:x 810.4700000000001, :y 0.0} {:x 823.9778333333335, :y 1.0} {:x 837.4856666666668, :y 0.0} {:x 850.9935000000002, :y 1.0} {:x 864.5013333333335, :y 0.0} {:x 878.0091666666668, :y 0.0} {:x 891.5170000000002, :y 0.0} {:x 905.0248333333335, :y 0.0} {:x 918.5326666666668, :y 0.0} {:x 932.0405000000002, :y 1.0} {:x 945.5483333333335, :y 0.0} {:x 959.0561666666669, :y 1.0} {:x 972.5640000000002, :y 0.0} {:x 986.0718333333335, :y 1.0} {:x 999.5796666666669, :y 1.0} {:x 1013.0875000000002, :y 0.0} {:x 1026.5953333333334, :y 2.0} {:x 1040.1031666666668, :y 0.0} {:x 1053.611, :y 0.0} {:x 1067.1188333333334, :y 0.0} {:x 1080.6266666666668, :y 0.0} {:x 1094.1345000000001, :y 0.0} {:x 1107.6423333333335, :y 0.0} {:x 1121.1501666666668, :y 0.0} {:x 1134.6580000000001, :y 0.0} {:x 1148.1658333333335, :y 0.0} {:x 1161.6736666666668, :y 1.0} {:x 1175.1815000000001, :y 0.0} {:x 1188.6893333333335, :y 1.0} {:x 1202.1971666666668, :y 0.0} {:x 1215.7050000000002, :y 1.0} {:x 1229.2128333333335, :y 0.0} {:x 1242.7206666666668, :y 0.0} {:x 1256.2285000000002, :y 0.0} {:x 1269.7363333333335, :y 0.0} {:x 1283.2441666666668, :y 0.0} {:x 1296.7520000000002, :y 0.0} {:x 1310.2598333333335, :y 0.0} {:x 1323.7676666666669, :y 0.0} {:x 1337.2755000000002, :y 0.0} {:x 1350.7833333333335, :y 1.0} {:x 1364.2911666666669, :y 0})}], :width 900, :height 556.24225, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}
;; <=

;; @@
(let [heights (->> dpa-summary :analytics (map :height))]
  (histogram heights :plot-size 900 :bins 10))
;; @@
;; =>
;;; {"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"linear","range":"width","zero":false,"domain":{"data":"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e","field":"data.x"}},{"name":"y","type":"linear","range":"height","nice":true,"zero":false,"domain":{"data":"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e","field":"data.y"}}],"marks":[{"type":"line","from":{"data":"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e"},"properties":{"enter":{"x":{"scale":"x","field":"data.x"},"y":{"scale":"y","field":"data.y"},"interpolate":{"value":"step-before"},"fill":{"value":"steelblue"},"fillOpacity":{"value":0.4},"stroke":{"value":"steelblue"},"strokeWidth":{"value":2},"strokeOpacity":{"value":1}}}}],"data":[{"name":"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e","values":[{"x":0.0,"y":0},{"x":0.7000000000000001,"y":185.0},{"x":1.4000000000000001,"y":661.0},{"x":2.1,"y":92.0},{"x":2.8000000000000003,"y":0.0},{"x":3.5000000000000004,"y":15.0},{"x":4.2,"y":8.0},{"x":4.9,"y":0.0},{"x":5.6000000000000005,"y":1.0},{"x":6.300000000000001,"y":2.0},{"x":7.000000000000001,"y":1.0},{"x":7.700000000000001,"y":0}]}],"width":900,"height":556.2422485351562,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"linear\", :range \"width\", :zero false, :domain {:data \"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e\", :field \"data.x\"}} {:name \"y\", :type \"linear\", :range \"height\", :nice true, :zero false, :domain {:data \"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e\", :field \"data.y\"}}], :marks [{:type \"line\", :from {:data \"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e\"}, :properties {:enter {:x {:scale \"x\", :field \"data.x\"}, :y {:scale \"y\", :field \"data.y\"}, :interpolate {:value \"step-before\"}, :fill {:value \"steelblue\"}, :fillOpacity {:value 0.4}, :stroke {:value \"steelblue\"}, :strokeWidth {:value 2}, :strokeOpacity {:value 1}}}}], :data [{:name \"26d75bbd-1c8a-4322-8af8-d0cdeb515d2e\", :values ({:x 0.0, :y 0} {:x 0.7000000000000001, :y 185.0} {:x 1.4000000000000001, :y 661.0} {:x 2.1, :y 92.0} {:x 2.8000000000000003, :y 0.0} {:x 3.5000000000000004, :y 15.0} {:x 4.2, :y 8.0} {:x 4.9, :y 0.0} {:x 5.6000000000000005, :y 1.0} {:x 6.300000000000001, :y 2.0} {:x 7.000000000000001, :y 1.0} {:x 7.700000000000001, :y 0})}], :width 900, :height 556.24225, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}
;; <=

;; @@
(let [hashtags (->> dpa-summary 
                  :analytics 
                  (map :hashtags) 
                  (apply concat)
                  (remove #{"dpa" "dpavolo"})
                  frequencies 
                  (sort-by second >) 
                  (take 20))]
  [(keys hashtags)
  (bar-chart (keys hashtags) (vals hashtags) :plot-size 1000)])
;; @@
;; =>
;;; {"type":"list-like","open":"<span class='clj-vector'>[</span>","close":"<span class='clj-vector'>]</span>","separator":" ","items":[{"type":"html","content":"<span class='clj-unkown'>(&quot;ebola&quot; &quot;is&quot; &quot;sltw14&quot; &quot;wowereit&quot; &quot;ferguson&quot; &quot;snowden&quot; &quot;hongkong&quot; &quot;nsu&quot; &quot;uber&quot; &quot;afd&quot; &quot;indyref&quot; &quot;mh17&quot; &quot;china&quot; &quot;icebucketchallenge&quot; &quot;apple&quot; &quot;nsa&quot; &quot;news&quot; &quot;n24&quot; &quot;piraten&quot; &quot;tohti&quot;)</span>","value":"(\"ebola\" \"is\" \"sltw14\" \"wowereit\" \"ferguson\" \"snowden\" \"hongkong\" \"nsu\" \"uber\" \"afd\" \"indyref\" \"mh17\" \"china\" \"icebucketchallenge\" \"apple\" \"nsa\" \"news\" \"n24\" \"piraten\" \"tohti\")"},{"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"ordinal","range":"width","domain":{"data":"90c80f82-240c-4c0c-ab4c-a783e2a3b731","field":"data.x"}},{"name":"y","range":"height","nice":true,"domain":{"data":"90c80f82-240c-4c0c-ab4c-a783e2a3b731","field":"data.y"}}],"marks":[{"type":"rect","from":{"data":"90c80f82-240c-4c0c-ab4c-a783e2a3b731"},"properties":{"enter":{"y":{"scale":"y","field":"data.y"},"width":{"offset":-1,"scale":"x","band":true},"x":{"scale":"x","field":"data.x"},"y2":{"scale":"y","value":0}},"update":{"fill":{"value":"steelblue"},"opacity":{"value":1}},"hover":{"fill":{"value":"#FF29D2"}}}}],"data":[{"name":"90c80f82-240c-4c0c-ab4c-a783e2a3b731","values":[{"x":"ebola","y":47},{"x":"is","y":45},{"x":"sltw14","y":34},{"x":"wowereit","y":33},{"x":"ferguson","y":30},{"x":"snowden","y":27},{"x":"hongkong","y":25},{"x":"nsu","y":22},{"x":"uber","y":20},{"x":"afd","y":19},{"x":"indyref","y":18},{"x":"mh17","y":17},{"x":"china","y":17},{"x":"icebucketchallenge","y":16},{"x":"apple","y":15},{"x":"nsa","y":15},{"x":"news","y":14},{"x":"n24","y":14},{"x":"piraten","y":14},{"x":"tohti","y":13}]}],"width":1000,"height":618.0469970703125,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"ordinal\", :range \"width\", :domain {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :field \"data.x\"}} {:name \"y\", :range \"height\", :nice true, :domain {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :field \"data.y\"}}], :marks [{:type \"rect\", :from {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\"}, :properties {:enter {:y {:scale \"y\", :field \"data.y\"}, :width {:offset -1, :scale \"x\", :band true}, :x {:scale \"x\", :field \"data.x\"}, :y2 {:scale \"y\", :value 0}}, :update {:fill {:value \"steelblue\"}, :opacity {:value 1}}, :hover {:fill {:value \"#FF29D2\"}}}}], :data [{:name \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :values ({:x \"ebola\", :y 47} {:x \"is\", :y 45} {:x \"sltw14\", :y 34} {:x \"wowereit\", :y 33} {:x \"ferguson\", :y 30} {:x \"snowden\", :y 27} {:x \"hongkong\", :y 25} {:x \"nsu\", :y 22} {:x \"uber\", :y 20} {:x \"afd\", :y 19} {:x \"indyref\", :y 18} {:x \"mh17\", :y 17} {:x \"china\", :y 17} {:x \"icebucketchallenge\", :y 16} {:x \"apple\", :y 15} {:x \"nsa\", :y 15} {:x \"news\", :y 14} {:x \"n24\", :y 14} {:x \"piraten\", :y 14} {:x \"tohti\", :y 13})}], :width 1000, :height 618.047, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}],"value":"[(\"ebola\" \"is\" \"sltw14\" \"wowereit\" \"ferguson\" \"snowden\" \"hongkong\" \"nsu\" \"uber\" \"afd\" \"indyref\" \"mh17\" \"china\" \"icebucketchallenge\" \"apple\" \"nsa\" \"news\" \"n24\" \"piraten\" \"tohti\") #gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"ordinal\", :range \"width\", :domain {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :field \"data.x\"}} {:name \"y\", :range \"height\", :nice true, :domain {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :field \"data.y\"}}], :marks [{:type \"rect\", :from {:data \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\"}, :properties {:enter {:y {:scale \"y\", :field \"data.y\"}, :width {:offset -1, :scale \"x\", :band true}, :x {:scale \"x\", :field \"data.x\"}, :y2 {:scale \"y\", :value 0}}, :update {:fill {:value \"steelblue\"}, :opacity {:value 1}}, :hover {:fill {:value \"#FF29D2\"}}}}], :data [{:name \"90c80f82-240c-4c0c-ab4c-a783e2a3b731\", :values ({:x \"ebola\", :y 47} {:x \"is\", :y 45} {:x \"sltw14\", :y 34} {:x \"wowereit\", :y 33} {:x \"ferguson\", :y 30} {:x \"snowden\", :y 27} {:x \"hongkong\", :y 25} {:x \"nsu\", :y 22} {:x \"uber\", :y 20} {:x \"afd\", :y 19} {:x \"indyref\", :y 18} {:x \"mh17\", :y 17} {:x \"china\", :y 17} {:x \"icebucketchallenge\", :y 16} {:x \"apple\", :y 15} {:x \"nsa\", :y 15} {:x \"news\", :y 14} {:x \"n24\", :y 14} {:x \"piraten\", :y 14} {:x \"tohti\", :y 13})}], :width 1000, :height 618.047, :padding {:bottom 20, :top 10, :right 10, :left 50}}}]"}
;; <=

;; @@
(def dpa-users (->> dpa-summary 
                  :analytics 
                  (map :users)))
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-var'>#&#x27;unsightly-reserve/dpa-users</span>","value":"#'unsightly-reserve/dpa-users"}
;; <=

;; @@
(let [users (->> dpa-users
                 (apply concat)
                 (remove #{"dpa"})
                 frequencies 
                 (sort-by second >) 
                 (take 15))]
  [(keys users)
  (bar-chart (keys users) (vals users) :plot-size 1000)])
;; @@
;; =>
;;; {"type":"list-like","open":"<span class='clj-vector'>[</span>","close":"<span class='clj-vector'>]</span>","separator":" ","items":[{"type":"html","content":"<span class='clj-unkown'>(&quot;Dietmar_Bauer&quot; &quot;alanyanews_eu&quot; &quot;thesirenofangel&quot; &quot;grimneko&quot; &quot;2014FL&quot; &quot;BBattmer&quot; &quot;S_Tagblatt&quot; &quot;Klostifan1981&quot; &quot;ChrisBrey1&quot; &quot;DietrichOpal&quot; &quot;martinromanczyk&quot; &quot;Dennis_Snehotta&quot; &quot;Liane13&quot; &quot;andreaslandwehr&quot; &quot;WOLKEFN&quot;)</span>","value":"(\"Dietmar_Bauer\" \"alanyanews_eu\" \"thesirenofangel\" \"grimneko\" \"2014FL\" \"BBattmer\" \"S_Tagblatt\" \"Klostifan1981\" \"ChrisBrey1\" \"DietrichOpal\" \"martinromanczyk\" \"Dennis_Snehotta\" \"Liane13\" \"andreaslandwehr\" \"WOLKEFN\")"},{"type":"vega","content":{"axes":[{"scale":"x","type":"x"},{"scale":"y","type":"y"}],"scales":[{"name":"x","type":"ordinal","range":"width","domain":{"data":"1a0f4889-685a-4e77-8947-83dcaa838d4b","field":"data.x"}},{"name":"y","range":"height","nice":true,"domain":{"data":"1a0f4889-685a-4e77-8947-83dcaa838d4b","field":"data.y"}}],"marks":[{"type":"rect","from":{"data":"1a0f4889-685a-4e77-8947-83dcaa838d4b"},"properties":{"enter":{"y":{"scale":"y","field":"data.y"},"width":{"offset":-1,"scale":"x","band":true},"x":{"scale":"x","field":"data.x"},"y2":{"scale":"y","value":0}},"update":{"fill":{"value":"steelblue"},"opacity":{"value":1}},"hover":{"fill":{"value":"#FF29D2"}}}}],"data":[{"name":"1a0f4889-685a-4e77-8947-83dcaa838d4b","values":[{"x":"Dietmar_Bauer","y":120},{"x":"alanyanews_eu","y":55},{"x":"thesirenofangel","y":47},{"x":"grimneko","y":32},{"x":"2014FL","y":30},{"x":"BBattmer","y":30},{"x":"S_Tagblatt","y":29},{"x":"Klostifan1981","y":26},{"x":"ChrisBrey1","y":24},{"x":"DietrichOpal","y":23},{"x":"martinromanczyk","y":22},{"x":"Dennis_Snehotta","y":21},{"x":"Liane13","y":20},{"x":"andreaslandwehr","y":19},{"x":"WOLKEFN","y":19}]}],"width":1000,"height":618.0469970703125,"padding":{"bottom":20,"top":10,"right":10,"left":50}},"value":"#gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"ordinal\", :range \"width\", :domain {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :field \"data.x\"}} {:name \"y\", :range \"height\", :nice true, :domain {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :field \"data.y\"}}], :marks [{:type \"rect\", :from {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\"}, :properties {:enter {:y {:scale \"y\", :field \"data.y\"}, :width {:offset -1, :scale \"x\", :band true}, :x {:scale \"x\", :field \"data.x\"}, :y2 {:scale \"y\", :value 0}}, :update {:fill {:value \"steelblue\"}, :opacity {:value 1}}, :hover {:fill {:value \"#FF29D2\"}}}}], :data [{:name \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :values ({:x \"Dietmar_Bauer\", :y 120} {:x \"alanyanews_eu\", :y 55} {:x \"thesirenofangel\", :y 47} {:x \"grimneko\", :y 32} {:x \"2014FL\", :y 30} {:x \"BBattmer\", :y 30} {:x \"S_Tagblatt\", :y 29} {:x \"Klostifan1981\", :y 26} {:x \"ChrisBrey1\", :y 24} {:x \"DietrichOpal\", :y 23} {:x \"martinromanczyk\", :y 22} {:x \"Dennis_Snehotta\", :y 21} {:x \"Liane13\", :y 20} {:x \"andreaslandwehr\", :y 19} {:x \"WOLKEFN\", :y 19})}], :width 1000, :height 618.047, :padding {:bottom 20, :top 10, :right 10, :left 50}}}"}],"value":"[(\"Dietmar_Bauer\" \"alanyanews_eu\" \"thesirenofangel\" \"grimneko\" \"2014FL\" \"BBattmer\" \"S_Tagblatt\" \"Klostifan1981\" \"ChrisBrey1\" \"DietrichOpal\" \"martinromanczyk\" \"Dennis_Snehotta\" \"Liane13\" \"andreaslandwehr\" \"WOLKEFN\") #gorilla_repl.vega.VegaView{:content {:axes [{:scale \"x\", :type \"x\"} {:scale \"y\", :type \"y\"}], :scales [{:name \"x\", :type \"ordinal\", :range \"width\", :domain {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :field \"data.x\"}} {:name \"y\", :range \"height\", :nice true, :domain {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :field \"data.y\"}}], :marks [{:type \"rect\", :from {:data \"1a0f4889-685a-4e77-8947-83dcaa838d4b\"}, :properties {:enter {:y {:scale \"y\", :field \"data.y\"}, :width {:offset -1, :scale \"x\", :band true}, :x {:scale \"x\", :field \"data.x\"}, :y2 {:scale \"y\", :value 0}}, :update {:fill {:value \"steelblue\"}, :opacity {:value 1}}, :hover {:fill {:value \"#FF29D2\"}}}}], :data [{:name \"1a0f4889-685a-4e77-8947-83dcaa838d4b\", :values ({:x \"Dietmar_Bauer\", :y 120} {:x \"alanyanews_eu\", :y 55} {:x \"thesirenofangel\", :y 47} {:x \"grimneko\", :y 32} {:x \"2014FL\", :y 30} {:x \"BBattmer\", :y 30} {:x \"S_Tagblatt\", :y 29} {:x \"Klostifan1981\", :y 26} {:x \"ChrisBrey1\", :y 24} {:x \"DietrichOpal\", :y 23} {:x \"martinromanczyk\", :y 22} {:x \"Dennis_Snehotta\", :y 21} {:x \"Liane13\", :y 20} {:x \"andreaslandwehr\", :y 19} {:x \"WOLKEFN\", :y 19})}], :width 1000, :height 618.047, :padding {:bottom 20, :top 10, :right 10, :left 50}}}]"}
;; <=

;; **
;;; ### Unique users
;; **

;; @@
(float (/ (->> dpa-users (apply concat) frequencies vals (remove #(> % 1)) count) 
          (->> dpa-users (apply concat) (into #{}) count)))
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj-unkown'>0.6464471</span>","value":"0.6464471"}
;; <=

;; @@

;; @@
