 
 (def county-unemployment-geo
   (sql/query db [(str "SELECT feature as geopath, unemploy_rate as fill from unemployment
-INNER JOIN us_10m ON us_10m.id=unemployment.fips_county")]
+                       INNER JOIN us_10m ON us_10m.id=unemployment.fips_county")]
              :row-fn #(update % :geopath json/read-str)))
 
-(plot (vt/choropleth county-unemployment-geo))
+(plot (choropleth county-unemployment-geo))

(ns usage
  (:require [gyptis.core :refer :all]
            [gyptis.view :refer [plot!]]
            [gyptis.vega-templates :as vt]
            [gyptis.validate :refer [valid?]]
            [clojure.pprint :refer [pprint]]
            [clojure.data.json :as json]))

(def bar-data [{:x "a", :y 5 :facet_y "a" :fill 1}
               {:x "a", :y 5 :facet_y "a" :fill 2}
               {:x "b", :y 9 :facet_y "a" :fill 1}
               {:x "c", :y 2 :facet_y "a" :fill 2}
               {:x "d", :y 3 :facet_y "c" :fill 2}])

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Let's make a bar chart

(plot (vt/dodged-bar bar-data))

;; plot every hashmap in `data' as a rectangle. Stacks bars with the same `x' value
(plot (vt/stacked-bar bar-data))

;; add labels
(plot (-> bar-data vt/stacked-bar
          (assoc-in [:axes 0 :title] "letter")
          (assoc-in [:axes 1 :title] "rate")))

;; add mouse-over interactions
(plot (-> bar-data vt/stacked-bar
          (assoc-in [:marks 0 :properties :hover]
                    {:fill {:value "red"}})))


   {:x (java.util.Date. "Jan 3, 2015"), :y 4 :stroke "b"}
   {:x (java.util.Date. "Jan 4, 2015"), :y 5 :stroke "b"}])

(plot (-> time-series-data line))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Plays well with jdbc
