                   [_ num-granules] concept-id-map]
               num-granules)))
 
+(defn remove-zero-collections
+  "Removes collections from the nested map that have counts of 0"
+  [nested-map]
+  (reduce (fn [holdings provider-id]
+            (update-in holdings [provider-id] #(into {} (filter (complement (comp zero? second)) %))))
+          nested-map
+          (keys nested-map)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; SIT
+
+
 (def testbed-holdings
   (->> (decode (slurp "testbed_holdings.json") true)
-       (map #(update-in % [:granule_count] (fn [v] (Long. v))))
-       (map (fn [{:keys [dataset_id echo_collection_id granule_count provider_id]}]
-              {:granule-count granule_count
-               :provider-id provider_id
-               :entry-title dataset_id
-               :concept-id echo_collection_id}))
-       holdings->nested-map))
-
-(def ptest-holdings
-  (->> (decode (slurp "ptest_holdings.json") true)
        (map #(update-in % [:granule_count] (fn [v] (Long. v))))
        (map (fn [{:keys [dataset_id echo_collection_id granule_count provider_id]}]
               {:granule-count granule_count

  {:sit-extra sit-extra
   :tb-extra tb-extra})

(let [[uat-extra ptest-extra _] (clojure.data/diff uat-holdings ptest-holdings)]
  {:uat-extra uat-extra
   :ptest-extra ptest-extra})

(get-in sit-holdings ["EDF_OPS" "C1000000261-EDF_OPS"])
(get-in testbed-holdings ["EDF_OPS" "C1000000261-EDF_OPS"])

(get-in sit-holdings ["EDF_OPS" "C1000000104-EDF_OPS"])
(get-in testbed-holdings ["EDF_OPS" "C1000000104-EDF_OPS"])




(def sit-holdings
  (holdings->nested-map (decode (slurp "sit_holdings.json") true)))

(holdings-map->total sit-holdings)
(holdings-map->total testbed-holdings)

