 ;;; Dump raw
 ;;;
 
-(defn- extract-answers [value]
+(defn- extract-answers [survey-questions value]
   (if value
-    (reduce (fn [acc [k v]] (merge acc {(name k) (:answer v)})) {} value)
+    (reduce (fn [acc [k v]]
+              (let [{:keys [question answers]} (get survey-questions k)]
+                (merge acc {question
+                            (get-in answers [(str (:answerId v)) :answer])})))
+            {}
+            value)
     ""))
 
 (def sample-base-headers [:plotid

                                                                     (prefix-keys "pl_" extra-plot-info))
                                                              text-headers
                                                              "")
                                                    (map->csv (get-value-distribution samples)
                                                              number-headers
                                                              0)))))
                              plots)]

            text-headers     (concat sample-base-headers
                                     (get-ext-headers samples :extra_plot_info "pl_")
                                     (get-ext-headers samples :extra_sample_info "smpl_")
                                     (map (fn [[_ val]]
                                            (:question val "not-found"))
                                          survey-questions))
            headers-out      (->> text-headers
                                  (map #(-> % name csv-quotes))
                                  (str/join ",")
