Skip to content

Instantly share code, notes, and snippets.

View haywoood's full-sized avatar
🏠
Working from home

Ryan Haywood haywoood

🏠
Working from home
View GitHub Profile
(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.”
(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")