first near final draft of talk -- just have to decide if I should include or exclude...
[CommonLispStat.git] / examples / basic-eda.lisp
blobe3b4fafc406df16674f1eb9347552d8fda29553b
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-04-20 08:21:38 tony>
4 ;;; Creation: <2009-04-19 09:41:09 tony>
5 ;;; File: basic-eda.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c)2009--, AJ Rossini. BSD, MIT, LLGPL, or
8 ;;; GPLv2+, or GPLv3+ depending on how it arrives.
9 ;;; Purpose: Example of basic exploratory data analysis in CLS.
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
16 (in-package :ls-user)
18 (defparameter *my-df*
19 (make-dataframe
20 (listoflist->array
21 (transpose-listoflist
22 (rsm.string:file->string-table
23 "/media/disk/Desktop/sandbox/CLS.git/Data/example-mixed.csv")))
24 :doc "This is an interesting dataframe-array")
25 "Initial dataset read-in.")
27 ;; Summarize is the basic EDA tool -- it accepts symbols or lists of
28 ;; symbols, to describe what, when, and how to do it. The resulting
29 ;; data structure has a means for re-invoking the result as well as
30 ;; partial storage of key results (when appropriate) as well as
31 ;; metadata about the results (time / context if provided).
33 (defparameter *my-df-smry-num*
34 (summarize *my-df* :type 'numerical :io 'listing)
35 "First numerical summary of *my-df-smry*")
37 (defparameter *my-df-smry-num*
38 (summarize *my-df*
39 :type 'numerical
40 :io 'report-pdf
41 :device '(file "output.pdf"))
42 "First numerical summary of *my-df-smry*")
44 (defparameter *my-df-smry-vis*
45 (summarize *my-df*
46 :type 'visual
47 :io 'interactive
48 :device 'xwin)
49 "visual summary")
51 (defparameter *my-df-smry-vis*
52 (summarize *my-df* :type 'visual :io 'interactive-dynamic)
53 "visual summary")
55 (defparameter *my-df-smry-vis*
56 (summarize *my-df* :type 'visual :io 'static)
57 "visual summary")