From c5048e486ef5f272bd3dea8e6cc7852311ac4101 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 27 Mar 2023 14:10:35 +0100 Subject: [PATCH] update artwork.org. --- artwork.org | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/artwork.org b/artwork.org index 739aa76..2cb3b23 100644 --- a/artwork.org +++ b/artwork.org @@ -1,5 +1,5 @@ #+title: Data Exploration of Artwork Section -#+date: \today +#+date: 2023-03-26 Sun #+author: Craig Oates #+email: craig@craigoates.net #+options: ':nil *:t -:t ::t <:t H:3 \n:nil ^:t arch:headline author:t @@ -22,7 +22,7 @@ machine. The code in this file explores the [[https://www.craigoates.net/art][Artworks]] section of the site. -* <2023-03-26 Sun> Clean data +* <2023-03-26 Sun> Clean Data This is the SQL used to remove data I don't want in a public facing repository. The database is not included. I'm keeping the SQLite code for future @@ -134,6 +134,8 @@ Run =m-x slime= before executing the following code. #+RESULTS: : # +** <2023-03-27 Mon> Data Heuristics + #+begin_src lisp :session :results output (lisp-stat:heuristicate-types *artworks-df*) (lisp-stat:describe *artworks-df*) @@ -162,6 +164,8 @@ CREATED-AT | STRING | NIL | NIL UPDATED-AT | SYMBOL | NIL | NIL #+end_example +** <2023-03-27 Mon> Create Sample Data-Frame + #+begin_src lisp :session (defparameter *artworks-sm-list* (select:select *artworks-df* (select:range 0 10) t) @@ -171,6 +175,8 @@ UPDATED-AT | SYMBOL | NIL | NIL #+RESULTS: : # +** <2023-03-27 Mon> Summary: Width + #+begin_src lisp :session :results drawer (lisp-stat:summarize-column '*artworks-df*:width) #+end_src @@ -190,6 +196,8 @@ WIDTH () max=148.00 :end: +** <2023-03-27 Mon> Summary: Height + #+begin_src lisp :session :results drawer (lisp-stat:summarize-column '*artworks-df*:height) #+end_src @@ -209,6 +217,8 @@ HEIGHT () max=210.00 :end: +** <2023-03-27 Mon> Summary: Depth + #+begin_src lisp :session :results drawer (lisp-stat:summarize-column '*artworks-df*:depth) #+end_src @@ -217,6 +227,8 @@ HEIGHT () :results: 375 (100%) x :NA, :end: +** <2023-03-27 Mon> Summary: Pixel Width + #+begin_src lisp :session :results drawer (lisp-stat:summarize-column '*artworks-df*:pixel-width) @@ -237,6 +249,8 @@ PIXEL-WIDTH () max=3508.00 :end: +** <2023-03-27 Mon> Summary: Pixel Height + #+begin_src lisp :session :results drawer (lisp-stat:summarize-column '*artworks-df*:pixel-height) #+end_src @@ -509,6 +523,40 @@ NIL #+end_src #+begin_src lisp :session :results drawer - (lisp-stat:columns *artworks-df* '(width height)) + (length (lisp-stat:select *artworks-df* t '(width height))) #+end_src +#+RESULTS: +:results: +# +:end: + +** <2023-03-27 Mon> Plot: Width vs Height Scatter (non-digital) + +#+begin_src lisp :session :results file + (vega:defplot width-height + `(:title "Art: Width vs Height (Non-Digital)" + :description "Comparison between the physical dimensions of artworks." + :width 400 + :height 400 + :mark :circle + :data ,*artworks-df* + :selection (:grid (:type :interval :bind :scales)) + :encoding (:x (:field :width :title "Width (cm)" :type :quantitative) + :y (:field :height :title "Height (cm)" :type :quantitative) + :tooltip (:field :title :type :nominative) + :color (:field :title :legend :null)))) + + (vega:write-html width-height "output/art-width-height-2023-03-21.html") +#+end_src + +#+RESULTS: +[[file:output/art-width-height-2023-03-21.html]] + +*** <2023-03-27 Mon> A Line of Lines has wrong dimensions + +They should be =21 x 14.8 cm= and not =210 x 148 cm=. *I have updated the dimensions +on the live site.* I did not notice it until I saw the chart. Basically, the +decimal point is was shifted one place to the right. + +[[file:output/artwork-width-height-2023-03-21.png]]