 (defn output-type-for [t]
   (str "converted_" t))
 
-(def truthy? #{"true"})
-
 (def conversions {"gasConsumption" {"m^3" 10.97222
                                     "ft^3" (* 2.83 10.9722)}
                   "oilConsumption" {"m^3" 10308.34
                                     "ft^3" (* 2.83 10308.34)}})
-
-(defn metadata-is-number? [{:keys [metadata]}]
-  (truthy? (:is-number (read-string metadata))))
 
 (defn conversion-fn [{:keys [type unit]}]
   (let [factor (get-in conversions [type unit])]

    (loop [start-date start]
      (when-not (.before end start-date)
        (recur (calculate-difference-series commander querier sensor start-date))))))


;;;;;;;;;;; Rollups of measurements ;;;;;;;;;

            [kixi.hecuba.storage.dbnew :as dbnew]
            [qbits.hayt :as hayt]
            [kixi.hecuba.queue :as q]))

(def truthy? #{"true"})

(defn metadata-is-number? [{:keys [metadata]}]
  (truthy? (:is-number (read-string metadata))))

(defn get-difference
  "Returns difference if both values are numbers, otherwise returns N/A."
