 
 
 
-;
-(defn column-name-to-column-id [json-map column-name]
-  (loop [in-data (:lists json-map)]
-    (if (empty? in-data) nil
-      (if (= column-name (:name (first in-data))) (:id (first in-data))
-        (recur (rest in-data))
-
-        )
-      )
-    )
-  )
 
 
+; bunch of filters to find appropriate cards
 
-; Is this card in a column-id
-(defn card-in-column? [card column-id]
-  (= (:idList card) column-id)
+(defn is-card-movement? [c]
+  (and (is-update-card? c) (has-data-5? c) (has-list-before-after c) (not= (list-before-id c) (list-after-id  c)))
   )
-
-; How many cards are in a named column
-(defn arity-of-column [json-map column-name]
-  (loop [cards (:cards json-map)
-         column-id (column-name-to-column-id json-map column-name)
-         accum 0]
-    (if (empty? cards) accum
-      (recur
-       (rest cards)
-        column-id
-       (if (card-in-column? (first cards) column-id)
-         (inc accum)
-         accum)
-
-       )
-      )
-    )
-  )
-
-
 
 (defn card-movement [json-map]
   (filter is-card-movement? (:actions json-map))



(def interruptions-on-week (map week-of-year-from-trello interruptions))
(view (histogram interruptions-on-week :nbins 20 :y-label "interruptions" :x-label "week number" :title "interrupions by week") )

(def rework-on-week (map week-of-year-from-trello reworks))
(view (histogram rework-on-week :nbins 20 :y-label "reworks" :x-label "week number" :title "reworks by week") )



