 (defn compute-impact-forest
   "Compute article impact forest of given news source"
   [source]
-  (let [source-origins (mc/find-maps @db "origins" {:source source :ts {$gt (t/date-time 2014 7 1)
-                                                                        $lt (t/date-time 2014 8 1)}})]
+  (let [source-origins (mc/find-maps
+                        @db
+                        "origins"
+                        {:source source
+                         :ts {$gt start-date
+                              $lt end-date}})]
     (vec (pmap compute-impact-tree source-origins))))
 
 

         (let [user (-> node :tweet :user)]
             (conj users (:screen_name user)))
         users)
       #_(if (zip/node loc)
         (conj
          tokens
          (clojure.set/difference



(defn random-tree []
  (let [origin (rand-nth (mc/find-maps @db "origins" {:source {$in news-accounts}
                                                      :ts {$gt start-date
                                                           $lt end-date}}))
        tree (compute-impact-tree origin)]
    {:title (:title (mc/find-map-by-id @db "articles" (:article origin)))
     :tree tree
