Closed kwccoin closed 2 years ago
Have not tried it but it is very likely
cd ~ mkdir -p common-lisp cd ~/common-lisp && git clone https://github.com/Lisp-Stat/data-frame.git && git clone https://github.com/Lisp-Stat/dfio.git && git clone https://github.com/Lisp-Stat/special-functions.git && git clone https://github.com/Lisp-Stat/numerical-utilities.git && git clone https://github.com/Lisp-Stat/documentation.git && git clone https://github.com/Lisp-Stat/plot.git && git clone https://github.com/Lisp-Stat/select.git && git clone https://github.com/Symbolics/alexandria-plus && git clone https://github.com/Lisp-Stat/lisp-stat.git
(ql:update-dist "quicklisp") (ql:quickload :lisp-stat)
; would solve the dependence issues and the software versioning issues
` ; follow Lisp in Vim - Susam Pal to get sbcl, quickload etc. install
; I did reinstall sbcl ; brew install sbcl ; brew cleanup sbcl
cd ~ mkdir -p common-lisp cd ~/common-lisp && \ git clone https://github.com/Lisp-Stat/data-frame.git && \ git clone https://github.com/Lisp-Stat/dfio.git && \ git clone https://github.com/Lisp-Stat/special-functions.git && \ git clone https://github.com/Lisp-Stat/numerical-utilities.git && \ git clone https://github.com/Lisp-Stat/documentation.git && \ git clone https://github.com/Lisp-Stat/plot.git && \ git clone https://github.com/Lisp-Stat/select.git && \ git clone https://github.com/Symbolics/alexandria-plus && \ git clone https://github.com/Lisp-Stat/lisp-stat.git
(ql:update-dist "quicklisp") ; static-vector need this
(asdf:asdf-version)
(asdf:clear-source-registry)
; may be it is the sequence but after re-reading the document, I think you can avoid all these issues with ; (ql:quickload :lisp-stat) ; but still (ql:update-dist "quicklisp") might be needed due to version issues
(ql:quickload :array-operations) (ql:quickload :static-vectors) (ql:quickload :dexador) (ql:quickload :dfio)
(asdf:load-system :lisp-stat) ; need above to compile
(in-package :ls-user)
(ql:quickload :plot) ; need more package (ql:quickload :yason) ; need more package
; seems all run fine now
(asdf:load-system :plot/vglt) (asdf:load-system :dfio/json)
(defdf cars (dfio:vl-to-df (dex:get "https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json" :want-stream t))) (pprint cars)
(tail cars)
(mean cars:acceleration) ; => 15.5197
; need to copy the whole thing, need to learn
LS-USER> (summary cars) ORIGIN: 254 (63%) x USA, 79 (19%) x Japan, 73 (18%) x Europe, YEAR: 61 (15%) x 1982-01-01, 40 (10%) x 1973-01-01, 36 (9%) x 1978-01-01, 35 (9%) x 1970-01-01, 34 (8%) x 1976-01-01, 30 (7%) x 1975-01-01, 29 (7%) x 1971-01-01, 29 (7%) x 1979-01-01, 29 (7%) x 1980-01-01, 28 (7%) x 1972-01-01, 28 (7%) x 1977-01-01, 27 (7%) x 1974-01-01, ACCELERATION: 406 reals, min=8, q25=13.674999999999999d0, q50=15.45d0, q75=17.16666632692019d0, max=24.8d0 WEIGHT-IN-LBS: 406 reals, min=1613, q25=2226, q50=2822.5, q75=3620, max=5140 HORSEPOWER: 400 reals, min=46, q25=75.77778, q50=94.33333, q75=129.57143, max=2306 (1%) x NIL, DISPLACEMENT: 406 reals, min=68, q25=104.25, q50=147.92307, q75=277.76923, max=455 CYLINDERS: 207 (51%) x 4, 108 (27%) x 8, 84 (21%) x 6, 4 (1%) x 3, 3 (1%) x 5, MILES-PER-GALLON: 398 reals, min=9, q25=17.33333317438761d0, q50=22.727271751923993d0, q75=29.14999923706055d0, max=46.6d08 (2%) x NIL,
(defparameter cars-plot (vglt:scatter-plot cars "HORSEPOWER" "MILES-PER-GALLON"))
(plot:plot-from-file (vglt:save-plot 'cars-plot))
`