Examples of specific uses (working or not) should be included here
[CommonLispStat.git] / examples / basic-eda.lisp
blobc87cfc4e895ec8864e0ae6067668643d20416c30
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-04-19 09:50:21 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 (rsm.string::filestream->string-table
21 "/path/to/file.dsv"))
22 "Initial read-in of data.")
24 ;; Summarize is the basic EDA tool -- it accepts symbols or lists of
25 ;; symbols, to describe what to do, and how to do it. The resulting
26 ;; data structure has a means for re-invoking the result as well as
27 ;; partial storage of key results (when appropriate) as well as
28 ;; metadata about the results (time / context if provided).
30 (defparameter *my-df-smry-num*
31 (summarize *my-df* :type 'numerical :io 'listing)
32 "First numerical summary of *my-df-smry*")
34 (defparameter *my-df-smry-num*
35 (summarize *my-df*
36 :type 'numerical
37 :io 'report-pdf
38 :device '(file "output.pdf"))
39 "First numerical summary of *my-df-smry*")
41 (defparameter *my-df-smry-vis*
42 (summarize *my-df*
43 :type 'visual
44 :io 'interactive
45 :device 'xwin)
46 "visual summary")
48 (defparameter *my-df-smry-vis*
49 (summarize *my-df* :type 'visual :io 'interactive-dynamic)
50 "visual summary")
52 (defparameter *my-df-smry-vis*
53 (summarize *my-df* :type 'visual :io 'static)
54 "visual summary")