I have some data which I already have stored as a list of Clojure
maps. Is there a way to create an Incanter data set from this?
Currently, I'm transforming it into CSV files first, then doing a
"read-dataset". Is that the "normal" way of going about it? Or, is
there a short-cut?
Thanks,
Kyle
The to-dataset function does what you want.
David
Sorry for bothering you all weekend :) Thanks for that. Awesome. I
was looking for it in incanter.io.
Kyle
If you're working with datasets, also checkout the following recently
added functions:
$, $where, $join, $rollup, $order, and $group-by.
I've also made the chart functions dataset aware. You can pass column
names of a given dataset to the functions instead of the actual data
values. For instance,
(view (scatter-plot :Sepal.Length :Sepal.Width :group-by :Species
:data (get-dataset :iris)))
They also support the with-data macro:
(with-data (get-dataset :iris)
(view (scatter-plot :Sepal.Length :Sepal.Width :group-by :Species)))
David
That is fantastic. I was just looking at the with-data macro and
$where syntax. It's just too cool.
* currently ripping my to-csv parsing code out and replacing with
incanter...
Kyle