    :travel-h     [:float    :travel-h]
    :speed-kmph   [:float    :speed-kmph]})
 
+; Mapping CSV columns to lowercase to simplify schema definition
+(def col-mapping (into {} (for [[k v] col-mapping-raw] [(if (string? k) (string/lower-case k) k) v])))
+
 (def fields
   (->> (concat
          (for [weather-field (-> weather vals first keys)] [weather-field :float])

  {:server      (or (System/getenv "ES_SERVER")      "192.168.0.100:9200")})

; curl -s 'http://localhost:9200/_template/*?pretty'
; curl -XDELETE 'http://localhost:9200/_template/taxicab'
; curl -XDELETE 'http://localhost:9200/taxicab-green-*'
(defn create-template [client template-name body]
  (let [url (str "_template/" template-name)]
    (if (= 404 (:status (s/request client {:url url :method :head})))

         (into {}))))
;(->> weather seq (take 10))

(def col-mapping-raw
  {; Started from Green Taxi dataset
   "VendorID"                [:int             :vendor-id]
   "lpep_pickup_datetime"    [:basic-datetime  :pickup-dt]
   "Lpep_dropoff_datetime"   [:basic-datetime  :dropoff-dt]
   "Store_and_fwd_flag"      [:keyword         :store-flag]
   "RateCodeID"              [:keyword         :rate-code]
   "Pickup_longitude"        [:latlon          :pickup-lon]
   "Pickup_latitude"         [:latlon          :pickup-lat]
   "Dropoff_longitude"       [:latlon          :dropoff-lon]
