Created
July 30, 2014 03:07
-
-
Save ruseel/ffc023bdb642aa02ad6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; incanter | |
(use '(incanter core stats charts)) | |
;; require clj-time to use f/parse | |
(alembic.still/distill '[clj-time]) | |
(require '[clj-time.format :as f]) | |
;; read dataset x.csv | |
(def r (read-dataset "x.csv" :header true)) | |
;; timestamp to long | |
(def rr (with-data r (conj-cols $data ($map (fn [ts] (let [dt (f/parse ts)] (if dt (.getMillis dt) nil))) :lasttimestamp)))) | |
;; view and save scatter-plot | |
(view (scatter-plot :col-0 :_c1 :data rr)) | |
(save (scatter-plot :col-0 :_c1 :data rr) "x.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment