       (.-id)))
 
 
-(def vertex-loc [[40 40]
-                 [300 40]
-                 [300 300]
-                 [40 300]])
+(def vertices [[0 [40 40]]
+               [1 [300 40]]
+               [2 [300 300]]
+               [1 [40 300]]])
 
-(def bare-edges [[0 1 "red"]
-                [1 2 "blue"]
-                [2 3 "red"]
-                [3 1 "red"]])
+
+(def bare-edges [[0 1 :red]
+                 [1 2 :blue]
+                 [2 3 :red]
+                 [3 1 :red]])
+
+(def color->value {:red 1
+                   :blue 2})
 
 (defn name-edges [bare-edges]
   (let [edge-ids (map (partial str "edge") (range))]

   {:class "clickable"
    :id id
    :d (make-line-dirs from to)
    :stroke color
    :stroke-width "10px"
    :fill "none"
    :marker-start "url(#Vertex)"



(defn make-edges [{:keys [vertices edges]}]
  (vertex-id->points edges (mapv second vertices)))


(defn make-svg [[width height] edges]
