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
(ns cloud-billing.api | |
(:require [cheshire.core :as json] | |
[clojure.java.io :refer [reader resource]] | |
[cloud-billing.config :as config] | |
[io.pedestal.http :as server] | |
[io.pedestal.http.route :as route])) | |
(defn parse-stream | |
“A helper that turns a body-stream into a map by consuming it and parsing it as | |
json.” |
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
(defn mount-viz [] | |
(let [svg (-> (d3/select "#chart") | |
(.append "svg") | |
(.attr "width" 800) | |
(.attr "height" 600) | |
(.append "g")) | |
x (-> (d3/scaleLinear) | |
(.domain #js [(d3/min data) (d3/max data)]) | |
(.range #js [0 800])) | |
_ (-> (.append svg "g") |
OlderNewer