Created
February 25, 2010 23:44
-
-
Save citizen428/315191 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(use '(incanter core charts io)) | |
(def usage (read-dataset "report.csv" :header true)) | |
(def instance-types | |
(set (filter #(re-find #"BoxUsage" %) ($ :UsageType usage)))) | |
(with-data (->> ($rollup :sum :UsageValue :UsageType usage) | |
($where {:UsageType {:$in instance-types}})) | |
(view (bar-chart :UsageType :UsageValue | |
:title "EC Instance Usage" | |
:x-label "Instance Types" | |
:y-label "Usage Value"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment