5  Hanami walkthrough 👣

Tableplot offers a Clojure API for creating Vega-Lite plots through layered pipelines.

The API not only uses Hanami templates but also partially composes with the original Hanami templates and parameters.

Here, we provide a walkthrough of the API.

In this walkthrough, we will demonstrate the main functionality of Tableplot.

Soon, we will provide more in-depth explanations in additional chapters.

5.1 Setup

For this tutorial, we require:

(ns tableplot-book.hanami-walkthrough
  (:require [scicloj.tableplot.v1.hanami :as hanami]
            [aerial.hanami.templates :as ht]
            [tablecloth.api :as tc]
            [tech.v3.datatype.datetime :as datetime]
            [tech.v3.dataset.print :as print]
            [scicloj.kindly.v4.kind :as kind]
            [clojure.string :as str]
            [scicloj.kindly.v4.api :as kindly]
            [tableplot-book.datasets :as datasets]))

5.2 Basic usage

Let us create a scatter plot from the Iris dataset. We pass a Tablecloth dataset to a Tableplot function with a Tableplot template.

(-> datasets/iris
    (hanami/plot hanami/point-chart
                 {:=x :sepal-width
                  :=y :sepal-length
                  :=color :species
                  :=mark-size 200}))

Soon, the Tableplot docs will offer an introduction to the use of Hanami templates and substitution keys. For now, please see the Hanami documentation.

While Tableplot allows using the original Hanami templates and substitution keys, it also offers its own sets of templates, that we just used here.

Unlike the original Hanami keys of using capital letter substitution keys (e.g. :COLOR) Tableplot uses the convention of substitution keys beginning with = (e.g. :=color)

The templates of Tableplot also support a layered grammar which is demonstrated later in this document.

(Here is how we can express the same plot with the layered grammar:)

(-> datasets/iris
    (hanami/layer-point
     {:=x :sepal-width
      :=y :sepal-length
      :=color :species
      :=mark-size 200}))

The value returned by a hanami/plot function is a Vega-Lite spec:

(-> datasets/iris
    (hanami/plot hanami/point-chart
                 {:=x :sepal-width
                  :=y :sepal-length
                  :=color :species
                  :=mark-size 200})
    kind/pprint)
{:encoding
 {:color {:field :species, :type :nominal},
  :x {:field :sepal-width, :type :quantitative},
  :y {:field :sepal-length, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "circle", :size 200, :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,sepal-length,sepal-width,petal-length,petal-width,species\n1,5.1,3.5,1.4,0.2,setosa\n2,4.9,3.0,1.4,0.2,setosa\n3,4.7,3.2,1.3,0.2,setosa\n4,4.6,3.1,1.5,0.2,setosa\n5,5.0,3.6,1.4,0.2,setosa\n6,5.4,3.9,1.7,0.4,setosa\n7,4.6,3.4,1.4,0.3,setosa\n8,5.0,3.4,1.5,0.2,setosa\n9,4.4,2.9,1.4,0.2,setosa\n10,4.9,3.1,1.5,0.1,setosa\n11,5.4,3.7,1.5,0.2,setosa\n12,4.8,3.4,1.6,0.2,setosa\n13,4.8,3.0,1.4,0.1,setosa\n14,4.3,3.0,1.1,0.1,setosa\n15,5.8,4.0,1.2,0.2,setosa\n16,5.7,4.4,1.5,0.4,setosa\n17,5.4,3.9,1.3,0.4,setosa\n18,5.1,3.5,1.4,0.3,setosa\n19,5.7,3.8,1.7,0.3,setosa\n20,5.1,3.8,1.5,0.3,setosa\n21,5.4,3.4,1.7,0.2,setosa\n22,5.1,3.7,1.5,0.4,setosa\n23,4.6,3.6,1.0,0.2,setosa\n24,5.1,3.3,1.7,0.5,setosa\n25,4.8,3.4,1.9,0.2,setosa\n26,5.0,3.0,1.6,0.2,setosa\n27,5.0,3.4,1.6,0.4,setosa\n28,5.2,3.5,1.5,0.2,setosa\n29,5.2,3.4,1.4,0.2,setosa\n30,4.7,3.2,1.6,0.2,setosa\n31,4.8,3.1,1.6,0.2,setosa\n32,5.4,3.4,1.5,0.4,setosa\n33,5.2,4.1,1.5,0.1,setosa\n34,5.5,4.2,1.4,0.2,setosa\n35,4.9,3.1,1.5,0.2,setosa\n36,5.0,3.2,1.2,0.2,setosa\n37,5.5,3.5,1.3,0.2,setosa\n38,4.9,3.6,1.4,0.1,setosa\n39,4.4,3.0,1.3,0.2,setosa\n40,5.1,3.4,1.5,0.2,setosa\n41,5.0,3.5,1.3,0.3,setosa\n42,4.5,2.3,1.3,0.3,setosa\n43,4.4,3.2,1.3,0.2,setosa\n44,5.0,3.5,1.6,0.6,setosa\n45,5.1,3.8,1.9,0.4,setosa\n46,4.8,3.0,1.4,0.3,setosa\n47,5.1,3.8,1.6,0.2,setosa\n48,4.6,3.2,1.4,0.2,setosa\n49,5.3,3.7,1.5,0.2,setosa\n50,5.0,3.3,1.4,0.2,setosa\n51,7.0,3.2,4.7,1.4,versicolor\n52,6.4,3.2,4.5,1.5,versicolor\n53,6.9,3.1,4.9,1.5,versicolor\n54,5.5,2.3,4.0,1.3,versicolor\n55,6.5,2.8,4.6,1.5,versicolor\n56,5.7,2.8,4.5,1.3,versicolor\n57,6.3,3.3,4.7,1.6,versicolor\n58,4.9,2.4,3.3,1.0,versicolor\n59,6.6,2.9,4.6,1.3,versicolor\n60,5.2,2.7,3.9,1.4,versicolor\n61,5.0,2.0,3.5,1.0,versicolor\n62,5.9,3.0,4.2,1.5,versicolor\n63,6.0,2.2,4.0,1.0,versicolor\n64,6.1,2.9,4.7,1.4,versicolor\n65,5.6,2.9,3.6,1.3,versicolor\n66,6.7,3.1,4.4,1.4,versicolor\n67,5.6,3.0,4.5,1.5,versicolor\n68,5.8,2.7,4.1,1.0,versicolor\n69,6.2,2.2,4.5,1.5,versicolor\n70,5.6,2.5,3.9,1.1,versicolor\n71,5.9,3.2,4.8,1.8,versicolor\n72,6.1,2.8,4.0,1.3,versicolor\n73,6.3,2.5,4.9,1.5,versicolor\n74,6.1,2.8,4.7,1.2,versicolor\n75,6.4,2.9,4.3,1.3,versicolor\n76,6.6,3.0,4.4,1.4,versicolor\n77,6.8,2.8,4.8,1.4,versicolor\n78,6.7,3.0,5.0,1.7,versicolor\n79,6.0,2.9,4.5,1.5,versicolor\n80,5.7,2.6,3.5,1.0,versicolor\n81,5.5,2.4,3.8,1.1,versicolor\n82,5.5,2.4,3.7,1.0,versicolor\n83,5.8,2.7,3.9,1.2,versicolor\n84,6.0,2.7,5.1,1.6,versicolor\n85,5.4,3.0,4.5,1.5,versicolor\n86,6.0,3.4,4.5,1.6,versicolor\n87,6.7,3.1,4.7,1.5,versicolor\n88,6.3,2.3,4.4,1.3,versicolor\n89,5.6,3.0,4.1,1.3,versicolor\n90,5.5,2.5,4.0,1.3,versicolor\n91,5.5,2.6,4.4,1.2,versicolor\n92,6.1,3.0,4.6,1.4,versicolor\n93,5.8,2.6,4.0,1.2,versicolor\n94,5.0,2.3,3.3,1.0,versicolor\n95,5.6,2.7,4.2,1.3,versicolor\n96,5.7,3.0,4.2,1.2,versicolor\n97,5.7,2.9,4.2,1.3,versicolor\n98,6.2,2.9,4.3,1.3,versicolor\n99,5.1,2.5,3.0,1.1,versicolor\n100,5.7,2.8,4.1,1.3,versicolor\n101,6.3,3.3,6.0,2.5,virginica\n102,5.8,2.7,5.1,1.9,virginica\n103,7.1,3.0,5.9,2.1,virginica\n104,6.3,2.9,5.6,1.8,virginica\n105,6.5,3.0,5.8,2.2,virginica\n106,7.6,3.0,6.6,2.1,virginica\n107,4.9,2.5,4.5,1.7,virginica\n108,7.3,2.9,6.3,1.8,virginica\n109,6.7,2.5,5.8,1.8,virginica\n110,7.2,3.6,6.1,2.5,virginica\n111,6.5,3.2,5.1,2.0,virginica\n112,6.4,2.7,5.3,1.9,virginica\n113,6.8,3.0,5.5,2.1,virginica\n114,5.7,2.5,5.0,2.0,virginica\n115,5.8,2.8,5.1,2.4,virginica\n116,6.4,3.2,5.3,2.3,virginica\n117,6.5,3.0,5.5,1.8,virginica\n118,7.7,3.8,6.7,2.2,virginica\n119,7.7,2.6,6.9,2.3,virginica\n120,6.0,2.2,5.0,1.5,virginica\n121,6.9,3.2,5.7,2.3,virginica\n122,5.6,2.8,4.9,2.0,virginica\n123,7.7,2.8,6.7,2.0,virginica\n124,6.3,2.7,4.9,1.8,virginica\n125,6.7,3.3,5.7,2.1,virginica\n126,7.2,3.2,6.0,1.8,virginica\n127,6.2,2.8,4.8,1.8,virginica\n128,6.1,3.0,4.9,1.8,virginica\n129,6.4,2.8,5.6,2.1,virginica\n130,7.2,3.0,5.8,1.6,virginica\n131,7.4,2.8,6.1,1.9,virginica\n132,7.9,3.8,6.4,2.0,virginica\n133,6.4,2.8,5.6,2.2,virginica\n134,6.3,2.8,5.1,1.5,virginica\n135,6.1,2.6,5.6,1.4,virginica\n136,7.7,3.0,6.1,2.3,virginica\n137,6.3,3.4,5.6,2.4,virginica\n138,6.4,3.1,5.5,1.8,virginica\n139,6.0,3.0,4.8,1.8,virginica\n140,6.9,3.1,5.4,2.1,virginica\n141,6.7,3.1,5.6,2.4,virginica\n142,6.9,3.1,5.1,2.3,virginica\n143,5.8,2.7,5.1,1.9,virginica\n144,6.8,3.2,5.9,2.3,virginica\n145,6.7,3.3,5.7,2.5,virginica\n146,6.7,3.0,5.2,2.3,virginica\n147,6.3,2.5,5.0,1.9,virginica\n148,6.5,3.0,5.2,2.0,virginica\n149,6.2,3.4,5.4,2.3,virginica\n150,5.9,3.0,5.1,1.8,virginica\n",
  :format {:type "csv"}}}

By looking at the :values key above, you can see that the dataset was implicitly represented as CSV, and that it was defined to be rendered as :svg by default.

The resulting plot is displayed correctly, as it is annotated by Kindly as a Vega-lite plot:

(-> datasets/iris
    (hanami/plot hanami/point-chart
                 {:=x :sepal-width
                  :=y :sepal-length
                  :=color :species
                  :=mark-size 200})
    meta)
#:kindly{:kind :kind/vega-lite, :options nil}

5.3 Using original Hanami templates and defaults

We can also use Hanami’s original templates (ht/chart) and substitution keys (:X, :Y, :MSIZE).

(-> datasets/iris
    (hanami/plot ht/point-chart
                 {:X :sepal-width
                  :Y :sepal-length
                  :MSIZE 200
                  :COLOR "species"}))
(-> datasets/iris
    (hanami/plot ht/point-chart
                 {:X :sepal-width
                  :Y :sepal-length
                  :MSIZE 200
                  :COLOR "species"})
    kind/pprint)
{:encoding
 {:y {:field :sepal-length, :type "quantitative"},
  :color {:field "species", :type "nominal"},
  :x {:field :sepal-width, :type "quantitative"}},
 :mark {:type "circle", :size 200, :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,sepal-length,sepal-width,petal-length,petal-width,species\n1,5.1,3.5,1.4,0.2,setosa\n2,4.9,3.0,1.4,0.2,setosa\n3,4.7,3.2,1.3,0.2,setosa\n4,4.6,3.1,1.5,0.2,setosa\n5,5.0,3.6,1.4,0.2,setosa\n6,5.4,3.9,1.7,0.4,setosa\n7,4.6,3.4,1.4,0.3,setosa\n8,5.0,3.4,1.5,0.2,setosa\n9,4.4,2.9,1.4,0.2,setosa\n10,4.9,3.1,1.5,0.1,setosa\n11,5.4,3.7,1.5,0.2,setosa\n12,4.8,3.4,1.6,0.2,setosa\n13,4.8,3.0,1.4,0.1,setosa\n14,4.3,3.0,1.1,0.1,setosa\n15,5.8,4.0,1.2,0.2,setosa\n16,5.7,4.4,1.5,0.4,setosa\n17,5.4,3.9,1.3,0.4,setosa\n18,5.1,3.5,1.4,0.3,setosa\n19,5.7,3.8,1.7,0.3,setosa\n20,5.1,3.8,1.5,0.3,setosa\n21,5.4,3.4,1.7,0.2,setosa\n22,5.1,3.7,1.5,0.4,setosa\n23,4.6,3.6,1.0,0.2,setosa\n24,5.1,3.3,1.7,0.5,setosa\n25,4.8,3.4,1.9,0.2,setosa\n26,5.0,3.0,1.6,0.2,setosa\n27,5.0,3.4,1.6,0.4,setosa\n28,5.2,3.5,1.5,0.2,setosa\n29,5.2,3.4,1.4,0.2,setosa\n30,4.7,3.2,1.6,0.2,setosa\n31,4.8,3.1,1.6,0.2,setosa\n32,5.4,3.4,1.5,0.4,setosa\n33,5.2,4.1,1.5,0.1,setosa\n34,5.5,4.2,1.4,0.2,setosa\n35,4.9,3.1,1.5,0.2,setosa\n36,5.0,3.2,1.2,0.2,setosa\n37,5.5,3.5,1.3,0.2,setosa\n38,4.9,3.6,1.4,0.1,setosa\n39,4.4,3.0,1.3,0.2,setosa\n40,5.1,3.4,1.5,0.2,setosa\n41,5.0,3.5,1.3,0.3,setosa\n42,4.5,2.3,1.3,0.3,setosa\n43,4.4,3.2,1.3,0.2,setosa\n44,5.0,3.5,1.6,0.6,setosa\n45,5.1,3.8,1.9,0.4,setosa\n46,4.8,3.0,1.4,0.3,setosa\n47,5.1,3.8,1.6,0.2,setosa\n48,4.6,3.2,1.4,0.2,setosa\n49,5.3,3.7,1.5,0.2,setosa\n50,5.0,3.3,1.4,0.2,setosa\n51,7.0,3.2,4.7,1.4,versicolor\n52,6.4,3.2,4.5,1.5,versicolor\n53,6.9,3.1,4.9,1.5,versicolor\n54,5.5,2.3,4.0,1.3,versicolor\n55,6.5,2.8,4.6,1.5,versicolor\n56,5.7,2.8,4.5,1.3,versicolor\n57,6.3,3.3,4.7,1.6,versicolor\n58,4.9,2.4,3.3,1.0,versicolor\n59,6.6,2.9,4.6,1.3,versicolor\n60,5.2,2.7,3.9,1.4,versicolor\n61,5.0,2.0,3.5,1.0,versicolor\n62,5.9,3.0,4.2,1.5,versicolor\n63,6.0,2.2,4.0,1.0,versicolor\n64,6.1,2.9,4.7,1.4,versicolor\n65,5.6,2.9,3.6,1.3,versicolor\n66,6.7,3.1,4.4,1.4,versicolor\n67,5.6,3.0,4.5,1.5,versicolor\n68,5.8,2.7,4.1,1.0,versicolor\n69,6.2,2.2,4.5,1.5,versicolor\n70,5.6,2.5,3.9,1.1,versicolor\n71,5.9,3.2,4.8,1.8,versicolor\n72,6.1,2.8,4.0,1.3,versicolor\n73,6.3,2.5,4.9,1.5,versicolor\n74,6.1,2.8,4.7,1.2,versicolor\n75,6.4,2.9,4.3,1.3,versicolor\n76,6.6,3.0,4.4,1.4,versicolor\n77,6.8,2.8,4.8,1.4,versicolor\n78,6.7,3.0,5.0,1.7,versicolor\n79,6.0,2.9,4.5,1.5,versicolor\n80,5.7,2.6,3.5,1.0,versicolor\n81,5.5,2.4,3.8,1.1,versicolor\n82,5.5,2.4,3.7,1.0,versicolor\n83,5.8,2.7,3.9,1.2,versicolor\n84,6.0,2.7,5.1,1.6,versicolor\n85,5.4,3.0,4.5,1.5,versicolor\n86,6.0,3.4,4.5,1.6,versicolor\n87,6.7,3.1,4.7,1.5,versicolor\n88,6.3,2.3,4.4,1.3,versicolor\n89,5.6,3.0,4.1,1.3,versicolor\n90,5.5,2.5,4.0,1.3,versicolor\n91,5.5,2.6,4.4,1.2,versicolor\n92,6.1,3.0,4.6,1.4,versicolor\n93,5.8,2.6,4.0,1.2,versicolor\n94,5.0,2.3,3.3,1.0,versicolor\n95,5.6,2.7,4.2,1.3,versicolor\n96,5.7,3.0,4.2,1.2,versicolor\n97,5.7,2.9,4.2,1.3,versicolor\n98,6.2,2.9,4.3,1.3,versicolor\n99,5.1,2.5,3.0,1.1,versicolor\n100,5.7,2.8,4.1,1.3,versicolor\n101,6.3,3.3,6.0,2.5,virginica\n102,5.8,2.7,5.1,1.9,virginica\n103,7.1,3.0,5.9,2.1,virginica\n104,6.3,2.9,5.6,1.8,virginica\n105,6.5,3.0,5.8,2.2,virginica\n106,7.6,3.0,6.6,2.1,virginica\n107,4.9,2.5,4.5,1.7,virginica\n108,7.3,2.9,6.3,1.8,virginica\n109,6.7,2.5,5.8,1.8,virginica\n110,7.2,3.6,6.1,2.5,virginica\n111,6.5,3.2,5.1,2.0,virginica\n112,6.4,2.7,5.3,1.9,virginica\n113,6.8,3.0,5.5,2.1,virginica\n114,5.7,2.5,5.0,2.0,virginica\n115,5.8,2.8,5.1,2.4,virginica\n116,6.4,3.2,5.3,2.3,virginica\n117,6.5,3.0,5.5,1.8,virginica\n118,7.7,3.8,6.7,2.2,virginica\n119,7.7,2.6,6.9,2.3,virginica\n120,6.0,2.2,5.0,1.5,virginica\n121,6.9,3.2,5.7,2.3,virginica\n122,5.6,2.8,4.9,2.0,virginica\n123,7.7,2.8,6.7,2.0,virginica\n124,6.3,2.7,4.9,1.8,virginica\n125,6.7,3.3,5.7,2.1,virginica\n126,7.2,3.2,6.0,1.8,virginica\n127,6.2,2.8,4.8,1.8,virginica\n128,6.1,3.0,4.9,1.8,virginica\n129,6.4,2.8,5.6,2.1,virginica\n130,7.2,3.0,5.8,1.6,virginica\n131,7.4,2.8,6.1,1.9,virginica\n132,7.9,3.8,6.4,2.0,virginica\n133,6.4,2.8,5.6,2.2,virginica\n134,6.3,2.8,5.1,1.5,virginica\n135,6.1,2.6,5.6,1.4,virginica\n136,7.7,3.0,6.1,2.3,virginica\n137,6.3,3.4,5.6,2.4,virginica\n138,6.4,3.1,5.5,1.8,virginica\n139,6.0,3.0,4.8,1.8,virginica\n140,6.9,3.1,5.4,2.1,virginica\n141,6.7,3.1,5.6,2.4,virginica\n142,6.9,3.1,5.1,2.3,virginica\n143,5.8,2.7,5.1,1.9,virginica\n144,6.8,3.2,5.9,2.3,virginica\n145,6.7,3.3,5.7,2.5,virginica\n146,6.7,3.0,5.2,2.3,virginica\n147,6.3,2.5,5.0,1.9,virginica\n148,6.5,3.0,5.2,2.0,virginica\n149,6.2,3.4,5.4,2.3,virginica\n150,5.9,3.0,5.1,1.8,virginica\n",
  :format {:type "csv"}}}

5.4 Inferring and overriding field types

Field types are inferred from the dataset’s column type. Here, for example, x and y are :quantitative, and color is :nominal (and is thus coloured with distinct colours rather than a gradient).

(-> datasets/iris
    (hanami/plot hanami/point-chart
                 {:=x :sepal-width
                  :=y :sepal-length
                  :=color :species
                  :=mark-size 200}))
(-> datasets/iris
    (hanami/plot hanami/point-chart
                {:=x :sepal-width
                 :=y :sepal-length
                 :=color :species
                 :=mark-size 200})
    kind/pprint)
{:encoding
 {:color {:field :species, :type :nominal},
  :x {:field :sepal-width, :type :quantitative},
  :y {:field :sepal-length, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "circle", :size 200, :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,sepal-length,sepal-width,petal-length,petal-width,species\n1,5.1,3.5,1.4,0.2,setosa\n2,4.9,3.0,1.4,0.2,setosa\n3,4.7,3.2,1.3,0.2,setosa\n4,4.6,3.1,1.5,0.2,setosa\n5,5.0,3.6,1.4,0.2,setosa\n6,5.4,3.9,1.7,0.4,setosa\n7,4.6,3.4,1.4,0.3,setosa\n8,5.0,3.4,1.5,0.2,setosa\n9,4.4,2.9,1.4,0.2,setosa\n10,4.9,3.1,1.5,0.1,setosa\n11,5.4,3.7,1.5,0.2,setosa\n12,4.8,3.4,1.6,0.2,setosa\n13,4.8,3.0,1.4,0.1,setosa\n14,4.3,3.0,1.1,0.1,setosa\n15,5.8,4.0,1.2,0.2,setosa\n16,5.7,4.4,1.5,0.4,setosa\n17,5.4,3.9,1.3,0.4,setosa\n18,5.1,3.5,1.4,0.3,setosa\n19,5.7,3.8,1.7,0.3,setosa\n20,5.1,3.8,1.5,0.3,setosa\n21,5.4,3.4,1.7,0.2,setosa\n22,5.1,3.7,1.5,0.4,setosa\n23,4.6,3.6,1.0,0.2,setosa\n24,5.1,3.3,1.7,0.5,setosa\n25,4.8,3.4,1.9,0.2,setosa\n26,5.0,3.0,1.6,0.2,setosa\n27,5.0,3.4,1.6,0.4,setosa\n28,5.2,3.5,1.5,0.2,setosa\n29,5.2,3.4,1.4,0.2,setosa\n30,4.7,3.2,1.6,0.2,setosa\n31,4.8,3.1,1.6,0.2,setosa\n32,5.4,3.4,1.5,0.4,setosa\n33,5.2,4.1,1.5,0.1,setosa\n34,5.5,4.2,1.4,0.2,setosa\n35,4.9,3.1,1.5,0.2,setosa\n36,5.0,3.2,1.2,0.2,setosa\n37,5.5,3.5,1.3,0.2,setosa\n38,4.9,3.6,1.4,0.1,setosa\n39,4.4,3.0,1.3,0.2,setosa\n40,5.1,3.4,1.5,0.2,setosa\n41,5.0,3.5,1.3,0.3,setosa\n42,4.5,2.3,1.3,0.3,setosa\n43,4.4,3.2,1.3,0.2,setosa\n44,5.0,3.5,1.6,0.6,setosa\n45,5.1,3.8,1.9,0.4,setosa\n46,4.8,3.0,1.4,0.3,setosa\n47,5.1,3.8,1.6,0.2,setosa\n48,4.6,3.2,1.4,0.2,setosa\n49,5.3,3.7,1.5,0.2,setosa\n50,5.0,3.3,1.4,0.2,setosa\n51,7.0,3.2,4.7,1.4,versicolor\n52,6.4,3.2,4.5,1.5,versicolor\n53,6.9,3.1,4.9,1.5,versicolor\n54,5.5,2.3,4.0,1.3,versicolor\n55,6.5,2.8,4.6,1.5,versicolor\n56,5.7,2.8,4.5,1.3,versicolor\n57,6.3,3.3,4.7,1.6,versicolor\n58,4.9,2.4,3.3,1.0,versicolor\n59,6.6,2.9,4.6,1.3,versicolor\n60,5.2,2.7,3.9,1.4,versicolor\n61,5.0,2.0,3.5,1.0,versicolor\n62,5.9,3.0,4.2,1.5,versicolor\n63,6.0,2.2,4.0,1.0,versicolor\n64,6.1,2.9,4.7,1.4,versicolor\n65,5.6,2.9,3.6,1.3,versicolor\n66,6.7,3.1,4.4,1.4,versicolor\n67,5.6,3.0,4.5,1.5,versicolor\n68,5.8,2.7,4.1,1.0,versicolor\n69,6.2,2.2,4.5,1.5,versicolor\n70,5.6,2.5,3.9,1.1,versicolor\n71,5.9,3.2,4.8,1.8,versicolor\n72,6.1,2.8,4.0,1.3,versicolor\n73,6.3,2.5,4.9,1.5,versicolor\n74,6.1,2.8,4.7,1.2,versicolor\n75,6.4,2.9,4.3,1.3,versicolor\n76,6.6,3.0,4.4,1.4,versicolor\n77,6.8,2.8,4.8,1.4,versicolor\n78,6.7,3.0,5.0,1.7,versicolor\n79,6.0,2.9,4.5,1.5,versicolor\n80,5.7,2.6,3.5,1.0,versicolor\n81,5.5,2.4,3.8,1.1,versicolor\n82,5.5,2.4,3.7,1.0,versicolor\n83,5.8,2.7,3.9,1.2,versicolor\n84,6.0,2.7,5.1,1.6,versicolor\n85,5.4,3.0,4.5,1.5,versicolor\n86,6.0,3.4,4.5,1.6,versicolor\n87,6.7,3.1,4.7,1.5,versicolor\n88,6.3,2.3,4.4,1.3,versicolor\n89,5.6,3.0,4.1,1.3,versicolor\n90,5.5,2.5,4.0,1.3,versicolor\n91,5.5,2.6,4.4,1.2,versicolor\n92,6.1,3.0,4.6,1.4,versicolor\n93,5.8,2.6,4.0,1.2,versicolor\n94,5.0,2.3,3.3,1.0,versicolor\n95,5.6,2.7,4.2,1.3,versicolor\n96,5.7,3.0,4.2,1.2,versicolor\n97,5.7,2.9,4.2,1.3,versicolor\n98,6.2,2.9,4.3,1.3,versicolor\n99,5.1,2.5,3.0,1.1,versicolor\n100,5.7,2.8,4.1,1.3,versicolor\n101,6.3,3.3,6.0,2.5,virginica\n102,5.8,2.7,5.1,1.9,virginica\n103,7.1,3.0,5.9,2.1,virginica\n104,6.3,2.9,5.6,1.8,virginica\n105,6.5,3.0,5.8,2.2,virginica\n106,7.6,3.0,6.6,2.1,virginica\n107,4.9,2.5,4.5,1.7,virginica\n108,7.3,2.9,6.3,1.8,virginica\n109,6.7,2.5,5.8,1.8,virginica\n110,7.2,3.6,6.1,2.5,virginica\n111,6.5,3.2,5.1,2.0,virginica\n112,6.4,2.7,5.3,1.9,virginica\n113,6.8,3.0,5.5,2.1,virginica\n114,5.7,2.5,5.0,2.0,virginica\n115,5.8,2.8,5.1,2.4,virginica\n116,6.4,3.2,5.3,2.3,virginica\n117,6.5,3.0,5.5,1.8,virginica\n118,7.7,3.8,6.7,2.2,virginica\n119,7.7,2.6,6.9,2.3,virginica\n120,6.0,2.2,5.0,1.5,virginica\n121,6.9,3.2,5.7,2.3,virginica\n122,5.6,2.8,4.9,2.0,virginica\n123,7.7,2.8,6.7,2.0,virginica\n124,6.3,2.7,4.9,1.8,virginica\n125,6.7,3.3,5.7,2.1,virginica\n126,7.2,3.2,6.0,1.8,virginica\n127,6.2,2.8,4.8,1.8,virginica\n128,6.1,3.0,4.9,1.8,virginica\n129,6.4,2.8,5.6,2.1,virginica\n130,7.2,3.0,5.8,1.6,virginica\n131,7.4,2.8,6.1,1.9,virginica\n132,7.9,3.8,6.4,2.0,virginica\n133,6.4,2.8,5.6,2.2,virginica\n134,6.3,2.8,5.1,1.5,virginica\n135,6.1,2.6,5.6,1.4,virginica\n136,7.7,3.0,6.1,2.3,virginica\n137,6.3,3.4,5.6,2.4,virginica\n138,6.4,3.1,5.5,1.8,virginica\n139,6.0,3.0,4.8,1.8,virginica\n140,6.9,3.1,5.4,2.1,virginica\n141,6.7,3.1,5.6,2.4,virginica\n142,6.9,3.1,5.1,2.3,virginica\n143,5.8,2.7,5.1,1.9,virginica\n144,6.8,3.2,5.9,2.3,virginica\n145,6.7,3.3,5.7,2.5,virginica\n146,6.7,3.0,5.2,2.3,virginica\n147,6.3,2.5,5.0,1.9,virginica\n148,6.5,3.0,5.2,2.0,virginica\n149,6.2,3.4,5.4,2.3,virginica\n150,5.9,3.0,5.1,1.8,virginica\n",
  :format {:type "csv"}}}

On the other hand, in the following example, color is :quantitative:

(-> datasets/mtcars
    (hanami/plot hanami/point-chart
                {:=x :mpg
                 :=y :disp
                 :=color :cyl
                 :=mark-size 200}))
(-> datasets/mtcars
    (hanami/plot hanami/point-chart
                {:=x :mpg
                 :=y :disp
                 :=color :cyl
                 :=mark-size 200})
    kind/pprint)
{:encoding
 {:color {:field :cyl, :type :quantitative},
  :x {:field :mpg, :type :quantitative},
  :y {:field :disp, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "circle", :size 200, :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,mpg,cyl,disp,hp,drat,wt,qsec,vs,am,gear,carb\nMazda RX4,21.0,6,160.0,110,3.9,2.62,16.46,0,1,4,4\nMazda RX4 Wag,21.0,6,160.0,110,3.9,2.875,17.02,0,1,4,4\nDatsun 710,22.8,4,108.0,93,3.85,2.32,18.61,1,1,4,1\nHornet 4 Drive,21.4,6,258.0,110,3.08,3.215,19.44,1,0,3,1\nHornet Sportabout,18.7,8,360.0,175,3.15,3.44,17.02,0,0,3,2\nValiant,18.1,6,225.0,105,2.76,3.46,20.22,1,0,3,1\nDuster 360,14.3,8,360.0,245,3.21,3.57,15.84,0,0,3,4\nMerc 240D,24.4,4,146.7,62,3.69,3.19,20.0,1,0,4,2\nMerc 230,22.8,4,140.8,95,3.92,3.15,22.9,1,0,4,2\nMerc 280,19.2,6,167.6,123,3.92,3.44,18.3,1,0,4,4\nMerc 280C,17.8,6,167.6,123,3.92,3.44,18.9,1,0,4,4\nMerc 450SE,16.4,8,275.8,180,3.07,4.07,17.4,0,0,3,3\nMerc 450SL,17.3,8,275.8,180,3.07,3.73,17.6,0,0,3,3\nMerc 450SLC,15.2,8,275.8,180,3.07,3.78,18.0,0,0,3,3\nCadillac Fleetwood,10.4,8,472.0,205,2.93,5.25,17.98,0,0,3,4\nLincoln Continental,10.4,8,460.0,215,3.0,5.424,17.82,0,0,3,4\nChrysler Imperial,14.7,8,440.0,230,3.23,5.345,17.42,0,0,3,4\nFiat 128,32.4,4,78.7,66,4.08,2.2,19.47,1,1,4,1\nHonda Civic,30.4,4,75.7,52,4.93,1.615,18.52,1,1,4,2\nToyota Corolla,33.9,4,71.1,65,4.22,1.835,19.9,1,1,4,1\nToyota Corona,21.5,4,120.1,97,3.7,2.465,20.01,1,0,3,1\nDodge Challenger,15.5,8,318.0,150,2.76,3.52,16.87,0,0,3,2\nAMC Javelin,15.2,8,304.0,150,3.15,3.435,17.3,0,0,3,2\nCamaro Z28,13.3,8,350.0,245,3.73,3.84,15.41,0,0,3,4\nPontiac Firebird,19.2,8,400.0,175,3.08,3.845,17.05,0,0,3,2\nFiat X1-9,27.3,4,79.0,66,4.08,1.935,18.9,1,1,4,1\nPorsche 914-2,26.0,4,120.3,91,4.43,2.14,16.7,0,1,5,2\nLotus Europa,30.4,4,95.1,113,3.77,1.513,16.9,1,1,5,2\nFord Pantera L,15.8,8,351.0,264,4.22,3.17,14.5,0,1,5,4\nFerrari Dino,19.7,6,145.0,175,3.62,2.77,15.5,0,1,5,6\nMaserati Bora,15.0,8,301.0,335,3.54,3.57,14.6,0,1,5,8\nVolvo 142E,21.4,4,121.0,109,4.11,2.78,18.6,1,1,4,2\n",
  :format {:type "csv"}}}

This can be overridden to define color as :noninal:

(-> datasets/mtcars
    (hanami/plot hanami/point-chart
                {:=x :mpg
                 :=y :disp
                 :=color :cyl
                 :=color-type :nominal
                 :=mark-size 200}))
(-> datasets/mtcars
    (hanami/plot hanami/point-chart
                 {:=x :mpg
                  :=y :disp
                  :=color :cyl
                  :=color-type :nominal
                  :=mark-size 200})
    kind/pprint)
{:encoding
 {:color {:field :cyl, :type :nominal},
  :x {:field :mpg, :type :quantitative},
  :y {:field :disp, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "circle", :size 200, :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,mpg,cyl,disp,hp,drat,wt,qsec,vs,am,gear,carb\nMazda RX4,21.0,6,160.0,110,3.9,2.62,16.46,0,1,4,4\nMazda RX4 Wag,21.0,6,160.0,110,3.9,2.875,17.02,0,1,4,4\nDatsun 710,22.8,4,108.0,93,3.85,2.32,18.61,1,1,4,1\nHornet 4 Drive,21.4,6,258.0,110,3.08,3.215,19.44,1,0,3,1\nHornet Sportabout,18.7,8,360.0,175,3.15,3.44,17.02,0,0,3,2\nValiant,18.1,6,225.0,105,2.76,3.46,20.22,1,0,3,1\nDuster 360,14.3,8,360.0,245,3.21,3.57,15.84,0,0,3,4\nMerc 240D,24.4,4,146.7,62,3.69,3.19,20.0,1,0,4,2\nMerc 230,22.8,4,140.8,95,3.92,3.15,22.9,1,0,4,2\nMerc 280,19.2,6,167.6,123,3.92,3.44,18.3,1,0,4,4\nMerc 280C,17.8,6,167.6,123,3.92,3.44,18.9,1,0,4,4\nMerc 450SE,16.4,8,275.8,180,3.07,4.07,17.4,0,0,3,3\nMerc 450SL,17.3,8,275.8,180,3.07,3.73,17.6,0,0,3,3\nMerc 450SLC,15.2,8,275.8,180,3.07,3.78,18.0,0,0,3,3\nCadillac Fleetwood,10.4,8,472.0,205,2.93,5.25,17.98,0,0,3,4\nLincoln Continental,10.4,8,460.0,215,3.0,5.424,17.82,0,0,3,4\nChrysler Imperial,14.7,8,440.0,230,3.23,5.345,17.42,0,0,3,4\nFiat 128,32.4,4,78.7,66,4.08,2.2,19.47,1,1,4,1\nHonda Civic,30.4,4,75.7,52,4.93,1.615,18.52,1,1,4,2\nToyota Corolla,33.9,4,71.1,65,4.22,1.835,19.9,1,1,4,1\nToyota Corona,21.5,4,120.1,97,3.7,2.465,20.01,1,0,3,1\nDodge Challenger,15.5,8,318.0,150,2.76,3.52,16.87,0,0,3,2\nAMC Javelin,15.2,8,304.0,150,3.15,3.435,17.3,0,0,3,2\nCamaro Z28,13.3,8,350.0,245,3.73,3.84,15.41,0,0,3,4\nPontiac Firebird,19.2,8,400.0,175,3.08,3.845,17.05,0,0,3,2\nFiat X1-9,27.3,4,79.0,66,4.08,1.935,18.9,1,1,4,1\nPorsche 914-2,26.0,4,120.3,91,4.43,2.14,16.7,0,1,5,2\nLotus Europa,30.4,4,95.1,113,3.77,1.513,16.9,1,1,5,2\nFord Pantera L,15.8,8,351.0,264,4.22,3.17,14.5,0,1,5,4\nFerrari Dino,19.7,6,145.0,175,3.62,2.77,15.5,0,1,5,6\nMaserati Bora,15.0,8,301.0,335,3.54,3.57,14.6,0,1,5,8\nVolvo 142E,21.4,4,121.0,109,4.11,2.78,18.6,1,1,4,2\n",
  :format {:type "csv"}}}

5.5 More examples

A Tableplot boxplot:

(-> datasets/mtcars
    (hanami/plot hanami/boxplot-chart
                 {:=x :cyl
                  :=x-type :nominal
                  :=y :disp}))

An original Hanami boxplot:

(-> datasets/mtcars
    (hanami/plot ht/boxplot-chart
                 {:X :cyl
                  :XTYPE :nominal
                  :Y :disp}))

Plotting segments with Tableplot:

(-> datasets/iris
    (hanami/plot hanami/rule-chart
                 {:=x :sepal-width
                  :=y :sepal-length
                  :=x2 :petal-width
                  :=y2 :petal-length
                  :=mark-opacity 0.5
                  :=mark-size 3
                  :=color :species}))

Plotting segments with original Hanami:

(-> datasets/iris
    (hanami/plot ht/rule-chart
                {:X :sepal-width
                 :Y :sepal-length
                 :X2 :petal-width
                 :Y2 :petal-length
                 :OPACITY 0.5
                 :SIZE 3
                 :COLOR "species"}))

5.6 Time series

Let us plot a time series:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/plot hanami/line-chart
                {:=x :date
                 :=y :value
                 :=mark-color "purple"}))

You see, the :date field was correctly inferred to be of the :temporal kind.

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/plot hanami/line-chart
                {:=x :date
                 :=y :value
                 :=mark-color "purple"})
    kind/pprint)
{:encoding
 {:x {:field :date, :type :temporal},
  :y {:field :value, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "line", :color "purple", :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,date,variable,value,value01\n2297,1967-07-01,unemploy,2944.0,0.020446830346569828\n2298,1967-08-01,unemploy,2945.0,0.020525775637483226\n2299,1967-09-01,unemploy,2958.0,0.021552064419357385\n2300,1967-10-01,unemploy,3143.0,0.036156943238335834\n2301,1967-11-01,unemploy,3066.0,0.030078155838004262\n2302,1967-12-01,unemploy,3018.0,0.026288781874161206\n2303,1968-01-01,unemploy,2878.0,0.015236441146285624\n2304,1968-02-01,unemploy,3001.0,0.024946711928633458\n2305,1968-03-01,unemploy,2877.0,0.015157495855372228\n2306,1968-04-01,unemploy,2709.0,0.0018946869819215285\n2307,1968-05-01,unemploy,2740.0,0.004341991000236836\n2308,1968-06-01,unemploy,2938.0,0.019973158601089443\n2309,1968-07-01,unemploy,2883.0,0.01563116760085261\n2310,1968-08-01,unemploy,2768.0,0.006552459145811952\n2311,1968-09-01,unemploy,2686.0,7.894529091339702E-5\n2312,1968-10-01,unemploy,2689.0,3.157811636535881E-4\n2313,1968-11-01,unemploy,2715.0,0.0023683587274019105\n2314,1968-12-01,unemploy,2685.0,0.0\n2315,1969-01-01,unemploy,2718.0,0.0026051946001421017\n2316,1969-02-01,unemploy,2692.0,5.526170363937791E-4\n2317,1969-03-01,unemploy,2712.0,0.0021315228546617193\n2318,1969-04-01,unemploy,2758.0,0.005763006236677982\n2319,1969-05-01,unemploy,2713.0,0.0022104681455751164\n2320,1969-06-01,unemploy,2816.0,0.010341833109655009\n2321,1969-07-01,unemploy,2868.0,0.014446988237151653\n2322,1969-08-01,unemploy,2856.0,0.01349964474619089\n2323,1969-09-01,unemploy,3040.0,0.02802557827425594\n2324,1969-10-01,unemploy,3049.0,0.028736085892476514\n2325,1969-11-01,unemploy,2856.0,0.01349964474619089\n2326,1969-12-01,unemploy,2884.0,0.015710112891766007\n2327,1970-01-01,unemploy,3201.0,0.04073577011131286\n2328,1970-02-01,unemploy,3453.0,0.06062998342148891\n2329,1970-03-01,unemploy,3635.0,0.07499802636772716\n2330,1970-04-01,unemploy,3797.0,0.08778716349569748\n2331,1970-05-01,unemploy,3919.0,0.09741848898713192\n2332,1970-06-01,unemploy,4071.0,0.10941817320596826\n2333,1970-07-01,unemploy,4175.0,0.11762848346096155\n2334,1970-08-01,unemploy,4256.0,0.1240230520249467\n2335,1970-09-01,unemploy,4456.0,0.13981211020762613\n2336,1970-10-01,unemploy,4591.0,0.1504697244809347\n2337,1970-11-01,unemploy,4898.0,0.1747059287913476\n2338,1970-12-01,unemploy,5076.0,0.18875819057393226\n2339,1971-01-01,unemploy,4986.0,0.18165311439172654\n2340,1971-02-01,unemploy,4903.0,0.1751006552459146\n2341,1971-03-01,unemploy,4987.0,0.18173205968263992\n2342,1971-04-01,unemploy,4959.0,0.17952159153706482\n2343,1971-05-01,unemploy,4996.0,0.1824425673008605\n2344,1971-06-01,unemploy,4949.0,0.17873213862793083\n2345,1971-07-01,unemploy,5035.0,0.185521433646483\n2346,1971-08-01,unemploy,5134.0,0.1933370174469093\n2347,1971-09-01,unemploy,5042.0,0.18607405068287677\n2348,1971-10-01,unemploy,4954.0,0.17912686508249784\n2349,1971-11-01,unemploy,5161.0,0.19546854030157101\n2350,1971-12-01,unemploy,5154.0,0.19491592326517723\n2351,1972-01-01,unemploy,5019.0,0.18425830899186862\n2352,1972-02-01,unemploy,4928.0,0.1770742875187495\n2353,1972-03-01,unemploy,5038.0,0.18575826951922317\n2354,1972-04-01,unemploy,4959.0,0.17952159153706482\n2355,1972-05-01,unemploy,4922.0,0.17660061577326913\n2356,1972-06-01,unemploy,4923.0,0.17667956106418253\n2357,1972-07-01,unemploy,4913.0,0.17589010815504855\n2358,1972-08-01,unemploy,4939.0,0.17794268571879687\n2359,1972-09-01,unemploy,4849.0,0.17083760953659113\n2360,1972-10-01,unemploy,4875.0,0.17289018710033946\n2361,1972-11-01,unemploy,4602.0,0.15133812268098207\n2362,1972-12-01,unemploy,4543.0,0.14668035051709166\n2363,1973-01-01,unemploy,4326.0,0.1295492223888845\n2364,1973-02-01,unemploy,4452.0,0.13949632904397252\n2365,1973-03-01,unemploy,4394.0,0.1349175021709955\n2366,1973-04-01,unemploy,4459.0,0.1400489460803663\n2367,1973-05-01,unemploy,4329.0,0.1297860582616247\n2368,1973-06-01,unemploy,4363.0,0.13247019815268019\n2369,1973-07-01,unemploy,4305.0,0.12789137127970315\n2370,1973-08-01,unemploy,4305.0,0.12789137127970315\n2371,1973-09-01,unemploy,4350.0,0.13144390937080602\n2372,1973-10-01,unemploy,4144.0,0.11518117944264625\n2373,1973-11-01,unemploy,4396.0,0.1350753927528223\n2374,1973-12-01,unemploy,4489.0,0.1424173048077682\n2375,1974-01-01,unemploy,4644.0,0.15465382489934476\n2376,1974-02-01,unemploy,4731.0,0.1615220652088103\n2377,1974-03-01,unemploy,4634.0,0.15386437199021077\n2378,1974-04-01,unemploy,4618.0,0.15260124733559643\n2379,1974-05-01,unemploy,4705.0,0.15946948764506197\n2380,1974-06-01,unemploy,4927.0,0.1769953422278361\n2381,1974-07-01,unemploy,5063.0,0.1877319017920581\n2382,1974-08-01,unemploy,5022.0,0.18449514486460883\n2383,1974-09-01,unemploy,5437.0,0.21725744059366858\n2384,1974-10-01,unemploy,5523.0,0.22404673561222074\n2385,1974-11-01,unemploy,6140.0,0.27275598010578667\n2386,1974-12-01,unemploy,6636.0,0.3119128443988316\n2387,1975-01-01,unemploy,7501.0,0.38020052103892005\n2388,1975-02-01,unemploy,7520.0,0.38170048156627456\n2389,1975-03-01,unemploy,7978.0,0.4178574248046104\n2390,1975-04-01,unemploy,8210.0,0.43617273229651854\n2391,1975-05-01,unemploy,8433.0,0.45377753217020605\n2392,1975-06-01,unemploy,8220.0,0.4369621852056525\n2393,1975-07-01,unemploy,8127.0,0.42962027315070656\n2394,1975-08-01,unemploy,7928.0,0.41391016025894056\n2395,1975-09-01,unemploy,7923.0,0.41351543380437356\n2396,1975-10-01,unemploy,7897.0,0.41146285624062523\n2397,1975-11-01,unemploy,7794.0,0.40333149127654533\n2398,1975-12-01,unemploy,7744.0,0.3993842267308755\n2399,1976-01-01,unemploy,7534.0,0.3828057156390621\n2400,1976-02-01,unemploy,7326.0,0.3663850951290756\n2401,1976-03-01,unemploy,7230.0,0.35880634720138943\n2402,1976-04-01,unemploy,7330.0,0.3667008762927291\n2403,1976-05-01,unemploy,7053.0,0.34483303070971816\n2404,1976-06-01,unemploy,7322.0,0.36606931396542197\n2405,1976-07-01,unemploy,7490.0,0.3793321228388727\n2406,1976-08-01,unemploy,7518.0,0.38154259098444776\n2407,1976-09-01,unemploy,7380.0,0.370648140838399\n2408,1976-10-01,unemploy,7430.0,0.3745954053840688\n2409,1976-11-01,unemploy,7620.0,0.38959501065761426\n2410,1976-12-01,unemploy,7545.0,0.3836741138391095\n2411,1977-01-01,unemploy,7280.0,0.3627536117470593\n2412,1977-02-01,unemploy,7443.0,0.375621694165943\n2413,1977-03-01,unemploy,7307.0,0.364885134601721\n2414,1977-04-01,unemploy,7059.0,0.34530670245519857\n2415,1977-05-01,unemploy,6911.0,0.33362279940001577\n2416,1977-06-01,unemploy,7134.0,0.35122759927370334\n2417,1977-07-01,unemploy,6829.0,0.32714928554511724\n2418,1977-08-01,unemploy,6925.0,0.33472803347280333\n2419,1977-09-01,unemploy,6751.0,0.32099155285387226\n2420,1977-10-01,unemploy,6763.0,0.321938896344833\n2421,1977-11-01,unemploy,6815.0,0.3260440514723297\n2422,1977-12-01,unemploy,6386.0,0.29217652167048236\n2423,1978-01-01,unemploy,6489.0,0.30030788663456226\n2424,1978-02-01,unemploy,6318.0,0.28680824188837134\n2425,1978-03-01,unemploy,6337.0,0.2883082024157259\n2426,1978-04-01,unemploy,6180.0,0.27591379174232256\n2427,1978-05-01,unemploy,6127.0,0.2717296913239125\n2428,1978-06-01,unemploy,6028.0,0.2639141075234862\n2429,1978-07-01,unemploy,6309.0,0.2860977342701508\n2430,1978-08-01,unemploy,6080.0,0.26801926265098286\n2431,1978-09-01,unemploy,6125.0,0.27157180074208576\n2432,1978-10-01,unemploy,5947.0,0.2575195389595011\n2433,1978-11-01,unemploy,6077.0,0.26778242677824265\n2434,1978-12-01,unemploy,6228.0,0.2797031657061656\n2435,1979-01-01,unemploy,6109.0,0.2703086760874714\n2436,1979-02-01,unemploy,6173.0,0.2753611747059288\n2437,1979-03-01,unemploy,6109.0,0.2703086760874714\n2438,1979-04-01,unemploy,6069.0,0.2671508644509355\n2439,1979-05-01,unemploy,5840.0,0.24907239283176758\n2440,1979-06-01,unemploy,5959.0,0.25846688245046184\n2441,1979-07-01,unemploy,5996.0,0.26138785821425753\n2442,1979-08-01,unemploy,6320.0,0.28696613247019814\n2443,1979-09-01,unemploy,6190.0,0.2767032446514565\n2444,1979-10-01,unemploy,6296.0,0.2850714454882766\n2445,1979-11-01,unemploy,6238.0,0.2804926186152996\n2446,1979-12-01,unemploy,6325.0,0.28736085892476515\n2447,1980-01-01,unemploy,6683.0,0.31562327307176125\n2448,1980-02-01,unemploy,6702.0,0.3171232335991158\n2449,1980-03-01,unemploy,6729.0,0.31925475645377754\n2450,1980-04-01,unemploy,7358.0,0.36891134443830426\n2451,1980-05-01,unemploy,7984.0,0.41833109655009076\n2452,1980-06-01,unemploy,8098.0,0.427330859714218\n2453,1980-07-01,unemploy,8363.0,0.44825136180626823\n2454,1980-08-01,unemploy,8281.0,0.4417778479513697\n2455,1980-09-01,unemploy,8021.0,0.42125207231388645\n2456,1980-10-01,unemploy,8088.0,0.42654140680508407\n2457,1980-11-01,unemploy,8023.0,0.42140996289571325\n2458,1980-12-01,unemploy,7718.0,0.39733164916712715\n2459,1981-01-01,unemploy,8071.0,0.42519933685955635\n2460,1981-02-01,unemploy,8051.0,0.4236204310412884\n2461,1981-03-01,unemploy,7982.0,0.418173205968264\n2462,1981-04-01,unemploy,7869.0,0.40925238809505016\n2463,1981-05-01,unemploy,8174.0,0.4333307018236362\n2464,1981-06-01,unemploy,8098.0,0.427330859714218\n2465,1981-07-01,unemploy,7863.0,0.40877871634956975\n2466,1981-08-01,unemploy,8036.0,0.4224362516775874\n2467,1981-09-01,unemploy,8230.0,0.43775163811478646\n2468,1981-10-01,unemploy,8646.0,0.4705928791347596\n2469,1981-11-01,unemploy,9029.0,0.5008289255545907\n2470,1981-12-01,unemploy,9267.0,0.5196179047919791\n2471,1982-01-01,unemploy,9397.0,0.5298807926107207\n2472,1982-02-01,unemploy,9705.0,0.554195942212047\n2473,1982-03-01,unemploy,9895.0,0.5691955474855925\n2474,1982-04-01,unemploy,10244.0,0.596747454014368\n2475,1982-05-01,unemploy,10335.0,0.6039314754874872\n2476,1982-06-01,unemploy,10538.0,0.6199573695429068\n2477,1982-07-01,unemploy,10849.0,0.6445093550169733\n2478,1982-08-01,unemploy,10881.0,0.647035604326202\n2479,1982-09-01,unemploy,11217.0,0.6735612220731033\n2480,1982-10-01,unemploy,11529.0,0.6981921528380832\n2481,1982-11-01,unemploy,11938.0,0.7304807768216626\n2482,1982-12-01,unemploy,12051.0,0.7394015946948764\n2483,1983-01-01,unemploy,11534.0,0.6985868792926502\n2484,1983-02-01,unemploy,11545.0,0.6994552774926975\n2485,1983-03-01,unemploy,11408.0,0.6886397726375622\n2486,1983-04-01,unemploy,11268.0,0.6775874319096866\n2487,1983-05-01,unemploy,11154.0,0.6685876687455593\n2488,1983-06-01,unemploy,11246.0,0.6758506355095919\n2489,1983-07-01,unemploy,10548.0,0.6207468224520407\n2490,1983-08-01,unemploy,10623.0,0.6266677192705455\n2491,1983-09-01,unemploy,10282.0,0.5997473750690772\n2492,1983-10-01,unemploy,9887.0,0.5685639851582853\n2493,1983-11-01,unemploy,9499.0,0.5379332122838872\n2494,1983-12-01,unemploy,9331.0,0.5246704034104366\n2495,1984-01-01,unemploy,9008.0,0.4991710744454093\n2496,1984-02-01,unemploy,8791.0,0.4820399463172022\n2497,1984-03-01,unemploy,8746.0,0.4784874082260993\n2498,1984-04-01,unemploy,8762.0,0.4797505328807137\n2499,1984-05-01,unemploy,8456.0,0.4555932738612142\n2500,1984-06-01,unemploy,8226.0,0.43743585695113285\n2501,1984-07-01,unemploy,8537.0,0.46198784242519936\n2502,1984-08-01,unemploy,8519.0,0.4605668271887582\n2503,1984-09-01,unemploy,8367.0,0.44856714296992184\n2504,1984-10-01,unemploy,8381.0,0.4496723770427094\n2505,1984-11-01,unemploy,8198.0,0.4352253888055577\n2506,1984-12-01,unemploy,8358.0,0.4478566353517013\n2507,1985-01-01,unemploy,8423.0,0.4529880792610721\n2508,1985-02-01,unemploy,8321.0,0.4449356595879056\n2509,1985-03-01,unemploy,8339.0,0.4463566748243467\n2510,1985-04-01,unemploy,8395.0,0.45077761111549697\n2511,1985-05-01,unemploy,8302.0,0.443435699060551\n2512,1985-06-01,unemploy,8460.0,0.4559090550248678\n2513,1985-07-01,unemploy,8513.0,0.46009315544327783\n2514,1985-08-01,unemploy,8196.0,0.435067498223731\n2515,1985-09-01,unemploy,8248.0,0.4391726533512276\n2516,1985-10-01,unemploy,8298.0,0.4431199178968975\n2517,1985-11-01,unemploy,8128.0,0.42969921844161996\n2518,1985-12-01,unemploy,8138.0,0.4304886713507539\n2519,1986-01-01,unemploy,7795.0,0.40341043656745873\n2520,1986-02-01,unemploy,8402.0,0.4513302281518907\n2521,1986-03-01,unemploy,8383.0,0.4498302676245362\n2522,1986-04-01,unemploy,8364.0,0.44833030709718164\n2523,1986-05-01,unemploy,8439.0,0.4542512039156864\n2524,1986-06-01,unemploy,8508.0,0.4596984289887108\n2525,1986-07-01,unemploy,8319.0,0.4447777690060788\n2526,1986-08-01,unemploy,8135.0,0.4302518354780137\n2527,1986-09-01,unemploy,8310.0,0.44406726138785824\n2528,1986-10-01,unemploy,8243.0,0.4387779268966606\n2529,1986-11-01,unemploy,8159.0,0.4321465224599353\n2530,1986-12-01,unemploy,7883.0,0.41035762216783767\n2531,1987-01-01,unemploy,7892.0,0.4110681297860583\n2532,1987-02-01,unemploy,7865.0,0.40893660693139655\n2533,1987-03-01,unemploy,7862.0,0.40869977105865635\n2534,1987-04-01,unemploy,7542.0,0.3834372779663693\n2535,1987-05-01,unemploy,7574.0,0.385963527275598\n2536,1987-06-01,unemploy,7398.0,0.37206915607484015\n2537,1987-07-01,unemploy,7268.0,0.3618062682560985\n2538,1987-08-01,unemploy,7261.0,0.36125365121970476\n2539,1987-09-01,unemploy,7102.0,0.3487013499644746\n2540,1987-10-01,unemploy,7227.0,0.3585695113286492\n2541,1987-11-01,unemploy,7035.0,0.34341201547327704\n2542,1987-12-01,unemploy,6936.0,0.3355964316728507\n2543,1988-01-01,unemploy,6953.0,0.33693850161837846\n2544,1988-02-01,unemploy,6929.0,0.33504381463645694\n2545,1988-03-01,unemploy,6876.0,0.3308597142180469\n2546,1988-04-01,unemploy,6601.0,0.3091497592168627\n2547,1988-05-01,unemploy,6779.0,0.3232020209994474\n2548,1988-06-01,unemploy,6546.0,0.30480776821662586\n2549,1988-07-01,unemploy,6605.0,0.3094655403805163\n2550,1988-08-01,unemploy,6843.0,0.3282545196179048\n2551,1988-09-01,unemploy,6604.0,0.3093865950896029\n2552,1988-10-01,unemploy,6568.0,0.30654456461672064\n2553,1988-11-01,unemploy,6537.0,0.3040972605984053\n2554,1988-12-01,unemploy,6518.0,0.30259730007105073\n2555,1989-01-01,unemploy,6682.0,0.3155443277808479\n2556,1989-02-01,unemploy,6359.0,0.29004499881582063\n2557,1989-03-01,unemploy,6205.0,0.2778874240151575\n2558,1989-04-01,unemploy,6468.0,0.2986500355253809\n2559,1989-05-01,unemploy,6375.0,0.291308123470435\n2560,1989-06-01,unemploy,6577.0,0.3072550722349412\n2561,1989-07-01,unemploy,6495.0,0.3007815583800426\n2562,1989-08-01,unemploy,6511.0,0.302044683034657\n2563,1989-09-01,unemploy,6590.0,0.30828136101681536\n2564,1989-10-01,unemploy,6630.0,0.31143917265335125\n2565,1989-11-01,unemploy,6725.0,0.31893897529012394\n2566,1989-12-01,unemploy,6667.0,0.31436014841714693\n2567,1990-01-01,unemploy,6752.0,0.32107049814478567\n2568,1990-02-01,unemploy,6651.0,0.31309702376253257\n2569,1990-03-01,unemploy,6598.0,0.3089129233441225\n2570,1990-04-01,unemploy,6797.0,0.3246230362358885\n2571,1990-05-01,unemploy,6742.0,0.3202810452356517\n2572,1990-06-01,unemploy,6590.0,0.30828136101681536\n2573,1990-07-01,unemploy,6922.0,0.3344911976000632\n2574,1990-08-01,unemploy,7188.0,0.35549064498302674\n2575,1990-09-01,unemploy,7368.0,0.3697007973474382\n2576,1990-10-01,unemploy,7459.0,0.37688481882055735\n2577,1990-11-01,unemploy,7764.0,0.40096313254914345\n2578,1990-12-01,unemploy,7901.0,0.41177863740427884\n2579,1991-01-01,unemploy,8015.0,0.4207784005684061\n2580,1991-02-01,unemploy,8265.0,0.44051472329675534\n2581,1991-03-01,unemploy,8586.0,0.4658561616799558\n2582,1991-04-01,unemploy,8439.0,0.4542512039156864\n2583,1991-05-01,unemploy,8736.0,0.47769795531696535\n2584,1991-06-01,unemploy,8692.0,0.47422436251677585\n2585,1991-07-01,unemploy,8586.0,0.4658561616799558\n2586,1991-08-01,unemploy,8666.0,0.47217178495302753\n2587,1991-09-01,unemploy,8722.0,0.4765927212441778\n2588,1991-10-01,unemploy,8842.0,0.4860661561537854\n2589,1991-11-01,unemploy,8931.0,0.49309228704507774\n2590,1991-12-01,unemploy,9198.0,0.5141706797189548\n2591,1992-01-01,unemploy,9283.0,0.5208810294465935\n2592,1992-02-01,unemploy,9454.0,0.5343806741927845\n2593,1992-03-01,unemploy,9460.0,0.5348543459382648\n2594,1992-04-01,unemploy,9415.0,0.531301807847162\n2595,1992-05-01,unemploy,9744.0,0.5572748085576695\n2596,1992-06-01,unemploy,10040.0,0.580642614668035\n2597,1992-07-01,unemploy,9850.0,0.5656430093944896\n2598,1992-08-01,unemploy,9787.0,0.5606694560669456\n2599,1992-09-01,unemploy,9781.0,0.5601957843214652\n2600,1992-10-01,unemploy,9398.0,0.5299597379016342\n2601,1992-11-01,unemploy,9565.0,0.5431436014841715\n2602,1992-12-01,unemploy,9557.0,0.5425120391568643\n2603,1993-01-01,unemploy,9325.0,0.5241967316649562\n2604,1993-02-01,unemploy,9183.0,0.5129865003552538\n2605,1993-03-01,unemploy,9056.0,0.5029604484092524\n2606,1993-04-01,unemploy,9110.0,0.5072234941185758\n2607,1993-05-01,unemploy,9149.0,0.5103023604641983\n2608,1993-06-01,unemploy,9121.0,0.5080918923186232\n2609,1993-07-01,unemploy,8930.0,0.4930133417541644\n2610,1993-08-01,unemploy,8763.0,0.4798294781716271\n2611,1993-09-01,unemploy,8714.0,0.47596115891687063\n2612,1993-10-01,unemploy,8750.0,0.4788031893897529\n2613,1993-11-01,unemploy,8542.0,0.4623825688797663\n2614,1993-12-01,unemploy,8477.0,0.4572511249703955\n2615,1994-01-01,unemploy,8630.0,0.46932975448014524\n2616,1994-02-01,unemploy,8583.0,0.4656193258072156\n2617,1994-03-01,unemploy,8470.0,0.45669850793400174\n2618,1994-04-01,unemploy,8331.0,0.44572511249703956\n2619,1994-05-01,unemploy,7915.0,0.4128838714770664\n2620,1994-06-01,unemploy,7927.0,0.41383121496802716\n2621,1994-07-01,unemploy,7946.0,0.4153311754953817\n2622,1994-08-01,unemploy,7933.0,0.4143048867135075\n2623,1994-09-01,unemploy,7734.0,0.3985947738217415\n2624,1994-10-01,unemploy,7632.0,0.390542354148575\n2625,1994-11-01,unemploy,7375.0,0.370253414383832\n2626,1994-12-01,unemploy,7230.0,0.35880634720138943\n2627,1995-01-01,unemploy,7375.0,0.370253414383832\n2628,1995-02-01,unemploy,7187.0,0.3554116996921134\n2629,1995-03-01,unemploy,7153.0,0.35272755980105786\n2630,1995-04-01,unemploy,7645.0,0.3915686429304492\n2631,1995-05-01,unemploy,7430.0,0.3745954053840688\n2632,1995-06-01,unemploy,7427.0,0.3743585695113287\n2633,1995-07-01,unemploy,7527.0,0.3822530986026684\n2634,1995-08-01,unemploy,7484.0,0.3788584510933923\n2635,1995-09-01,unemploy,7478.0,0.37838477934791187\n2636,1995-10-01,unemploy,7328.0,0.3665429857109023\n2637,1995-11-01,unemploy,7426.0,0.3742796242204153\n2638,1995-12-01,unemploy,7423.0,0.37404278834767507\n2639,1996-01-01,unemploy,7491.0,0.37941106812978603\n2640,1996-02-01,unemploy,7313.0,0.3653588063472014\n2641,1996-03-01,unemploy,7318.0,0.36575353280176837\n2642,1996-04-01,unemploy,7415.0,0.37341122602036786\n2643,1996-05-01,unemploy,7423.0,0.37404278834767507\n2644,1996-06-01,unemploy,7095.0,0.34814873292808085\n2645,1996-07-01,unemploy,7337.0,0.36725349332912294\n2646,1996-08-01,unemploy,6882.0,0.3313333859635273\n2647,1996-09-01,unemploy,6979.0,0.3389910791821268\n2648,1996-10-01,unemploy,7031.0,0.34309623430962344\n2649,1996-11-01,unemploy,7236.0,0.35928001894686984\n2650,1996-12-01,unemploy,7253.0,0.36062208889239755\n2651,1997-01-01,unemploy,7158.0,0.35312228625562486\n2652,1997-02-01,unemploy,7102.0,0.3487013499644746\n2653,1997-03-01,unemploy,7000.0,0.3406489302913081\n2654,1997-04-01,unemploy,6873.0,0.3306228783453067\n2655,1997-05-01,unemploy,6655.0,0.3134128049261862\n2656,1997-06-01,unemploy,6799.0,0.3247809268177153\n2657,1997-07-01,unemploy,6655.0,0.3134128049261862\n2658,1997-08-01,unemploy,6608.0,0.3097023762532565\n2659,1997-09-01,unemploy,6656.0,0.3134917502170996\n2660,1997-10-01,unemploy,6454.0,0.2975448014525934\n2661,1997-11-01,unemploy,6308.0,0.2860187889792374\n2662,1997-12-01,unemploy,6476.0,0.2992815978526881\n2663,1998-01-01,unemploy,6368.0,0.2907555064340412\n2664,1998-02-01,unemploy,6306.0,0.2858608983974106\n2665,1998-03-01,unemploy,6422.0,0.29501855214336464\n2666,1998-04-01,unemploy,5941.0,0.2570458672140207\n2667,1998-05-01,unemploy,6047.0,0.2654140680508408\n2668,1998-06-01,unemploy,6212.0,0.2784400410515513\n2669,1998-07-01,unemploy,6259.0,0.28215046972448093\n2670,1998-08-01,unemploy,6179.0,0.27583484645140915\n2671,1998-09-01,unemploy,6300.0,0.2853872266519302\n2672,1998-10-01,unemploy,6280.0,0.28380832083366225\n2673,1998-11-01,unemploy,6100.0,0.26959816846925083\n2674,1998-12-01,unemploy,6032.0,0.2642298886871398\n2675,1999-01-01,unemploy,5976.0,0.25980895239598956\n2676,1999-02-01,unemploy,6111.0,0.2704665666692982\n2677,1999-03-01,unemploy,5783.0,0.24457251124970394\n2678,1999-04-01,unemploy,6004.0,0.2620194205415647\n2679,1999-05-01,unemploy,5796.0,0.2455988000315781\n2680,1999-06-01,unemploy,5951.0,0.25783532012315463\n2681,1999-07-01,unemploy,6025.0,0.26367727165074606\n2682,1999-08-01,unemploy,5838.0,0.2489145022499408\n2683,1999-09-01,unemploy,5915.0,0.25499328965027235\n2684,1999-10-01,unemploy,5778.0,0.24417778479513697\n2685,1999-11-01,unemploy,5716.0,0.23928317675850636\n2686,1999-12-01,unemploy,5653.0,0.23430962343096234\n2687,2000-01-01,unemploy,5708.0,0.23865161443119917\n2688,2000-02-01,unemploy,5858.0,0.25049340806820874\n2689,2000-03-01,unemploy,5733.0,0.2406252467040341\n2690,2000-04-01,unemploy,5481.0,0.22073103339385805\n2691,2000-05-01,unemploy,5758.0,0.24259887897686902\n2692,2000-06-01,unemploy,5651.0,0.23415173284913554\n2693,2000-07-01,unemploy,5747.0,0.24173048077682166\n2694,2000-08-01,unemploy,5853.0,0.25009868161364174\n2695,2000-09-01,unemploy,5625.0,0.23209915528538722\n2696,2000-10-01,unemploy,5534.0,0.2249151338122681\n2697,2000-11-01,unemploy,5639.0,0.23320438935817478\n2698,2000-12-01,unemploy,5634.0,0.2328096629036078\n2699,2001-01-01,unemploy,6023.0,0.26351938106891926\n2700,2001-02-01,unemploy,6089.0,0.2687297702692034\n2701,2001-03-01,unemploy,6141.0,0.27283492539670007\n2702,2001-04-01,unemploy,6271.0,0.2830978132154417\n2703,2001-05-01,unemploy,6226.0,0.27954527512433885\n2704,2001-06-01,unemploy,6484.0,0.29991316017999525\n2705,2001-07-01,unemploy,6583.0,0.30772874398042155\n2706,2001-08-01,unemploy,7042.0,0.3439646325096708\n2707,2001-09-01,unemploy,7142.0,0.3518591616010105\n2708,2001-10-01,unemploy,7694.0,0.39543696218520563\n2709,2001-11-01,unemploy,8003.0,0.41983105707744534\n2710,2001-12-01,unemploy,8258.0,0.4399621062603616\n2711,2002-01-01,unemploy,8182.0,0.4339622641509434\n2712,2002-02-01,unemploy,8215.0,0.4365674587510855\n2713,2002-03-01,unemploy,8304.0,0.44359358964237783\n2714,2002-04-01,unemploy,8599.0,0.46688245046182997\n2715,2002-05-01,unemploy,8399.0,0.4510933922791506\n2716,2002-06-01,unemploy,8393.0,0.45061972053367016\n2717,2002-07-01,unemploy,8390.0,0.45038288466092996\n2718,2002-08-01,unemploy,8304.0,0.44359358964237783\n2719,2002-09-01,unemploy,8251.0,0.4394094892239678\n2720,2002-10-01,unemploy,8307.0,0.44383042551511803\n2721,2002-11-01,unemploy,8520.0,0.4606457724796716\n2722,2002-12-01,unemploy,8640.0,0.4701192073892792\n2723,2003-01-01,unemploy,8520.0,0.4606457724796716\n2724,2003-02-01,unemploy,8618.0,0.4683824109891845\n2725,2003-03-01,unemploy,8588.0,0.4660140522617826\n2726,2003-04-01,unemploy,8842.0,0.4860661561537854\n2727,2003-05-01,unemploy,8957.0,0.49514486460882606\n2728,2003-06-01,unemploy,9266.0,0.5195389595010658\n2729,2003-07-01,unemploy,9011.0,0.4994079103181495\n2730,2003-08-01,unemploy,8896.0,0.49032920186310885\n2731,2003-09-01,unemploy,8921.0,0.4923028341359438\n2732,2003-10-01,unemploy,8732.0,0.47738217415331174\n2733,2003-11-01,unemploy,8576.0,0.46506670877082185\n2734,2003-12-01,unemploy,8317.0,0.444619878424252\n2735,2004-01-01,unemploy,8370.0,0.44880397884266204\n2736,2004-02-01,unemploy,8167.0,0.43277808478724245\n2737,2004-03-01,unemploy,8491.0,0.45835635904318306\n2738,2004-04-01,unemploy,8170.0,0.43301492065998265\n2739,2004-05-01,unemploy,8212.0,0.4363306228783453\n2740,2004-06-01,unemploy,8286.0,0.4421725744059367\n2741,2004-07-01,unemploy,8136.0,0.4303307807689271\n2742,2004-08-01,unemploy,7990.0,0.4188047682955712\n2743,2004-09-01,unemploy,7927.0,0.41383121496802716\n2744,2004-10-01,unemploy,8061.0,0.42440988395042234\n2745,2004-11-01,unemploy,7932.0,0.41422594142259417\n2746,2004-12-01,unemploy,7934.0,0.4143838320044209\n2747,2005-01-01,unemploy,7784.0,0.40254203836741137\n2748,2005-02-01,unemploy,7980.0,0.4180153153864372\n2749,2005-03-01,unemploy,7737.0,0.3988316096944817\n2750,2005-04-01,unemploy,7672.0,0.3937001657851109\n2751,2005-05-01,unemploy,7651.0,0.3920423146759296\n2752,2005-06-01,unemploy,7524.0,0.38201626272992817\n2753,2005-07-01,unemploy,7406.0,0.3727007184021473\n2754,2005-08-01,unemploy,7345.0,0.3678850556564301\n2755,2005-09-01,unemploy,7553.0,0.3843056761664167\n2756,2005-10-01,unemploy,7453.0,0.37641114707507695\n2757,2005-11-01,unemploy,7566.0,0.38533196494829086\n2758,2005-12-01,unemploy,7279.0,0.3626746664561459\n2759,2006-01-01,unemploy,7064.0,0.3457014289097655\n2760,2006-02-01,unemploy,7184.0,0.3551748638193732\n2761,2006-03-01,unemploy,7072.0,0.34633299123707273\n2762,2006-04-01,unemploy,7120.0,0.3501223652009158\n2763,2006-05-01,unemploy,6980.0,0.3390700244730402\n2764,2006-06-01,unemploy,7001.0,0.3407278755822215\n2765,2006-07-01,unemploy,7175.0,0.3544643562011526\n2766,2006-08-01,unemploy,7091.0,0.34783295176442725\n2767,2006-09-01,unemploy,6847.0,0.32857030078155836\n2768,2006-10-01,unemploy,6727.0,0.31909686587195074\n2769,2006-11-01,unemploy,6872.0,0.3305439330543933\n2770,2006-12-01,unemploy,6762.0,0.3218599510539196\n2771,2007-01-01,unemploy,7116.0,0.34980658403726217\n2772,2007-02-01,unemploy,6927.0,0.33488592405463014\n2773,2007-03-01,unemploy,6731.0,0.31941264703560435\n2774,2007-04-01,unemploy,6850.0,0.32880713665429856\n2775,2007-05-01,unemploy,6766.0,0.32217573221757323\n2776,2007-06-01,unemploy,6979.0,0.3389910791821268\n2777,2007-07-01,unemploy,7149.0,0.3524117786374043\n2778,2007-08-01,unemploy,7067.0,0.3459382647825057\n2779,2007-09-01,unemploy,7170.0,0.3540696297465856\n2780,2007-10-01,unemploy,7237.0,0.35935896423778324\n2781,2007-11-01,unemploy,7240.0,0.3595958001105234\n2782,2007-12-01,unemploy,7645.0,0.3915686429304492\n2783,2008-01-01,unemploy,7685.0,0.3947264545669851\n2784,2008-02-01,unemploy,7497.0,0.37988473987526644\n2785,2008-03-01,unemploy,7822.0,0.40554195942212046\n2786,2008-04-01,unemploy,7637.0,0.39093708060314203\n2787,2008-05-01,unemploy,8395.0,0.45077761111549697\n2788,2008-06-01,unemploy,8575.0,0.46498776347990844\n2789,2008-07-01,unemploy,8937.0,0.49356595879055815\n2790,2008-08-01,unemploy,9438.0,0.53311754953817\n2791,2008-09-01,unemploy,9494.0,0.5375384858293203\n2792,2008-10-01,unemploy,10074.0,0.5833267545590906\n2793,2008-11-01,unemploy,10538.0,0.6199573695429068\n2794,2008-12-01,unemploy,11286.0,0.6790084471461277\n2795,2009-01-01,unemploy,12058.0,0.7399542117312702\n2796,2009-02-01,unemploy,12898.0,0.8062682560985237\n2797,2009-03-01,unemploy,13426.0,0.8479513697007973\n2798,2009-04-01,unemploy,13853.0,0.8816610089208179\n2799,2009-05-01,unemploy,14499.0,0.9326596668508723\n2800,2009-06-01,unemploy,14707.0,0.9490802873608589\n2801,2009-07-01,unemploy,14601.0,0.9407120865240388\n2802,2009-08-01,unemploy,14814.0,0.9575274334885924\n2803,2009-09-01,unemploy,15009.0,0.9729217652167048\n2804,2009-10-01,unemploy,15352.0,1.0\n2805,2009-11-01,unemploy,15219.0,0.9895002763085182\n2806,2009-12-01,unemploy,15098.0,0.9799478961079972\n2807,2010-01-01,unemploy,15046.0,0.9758427409805005\n2808,2010-02-01,unemploy,15113.0,0.9811320754716981\n2809,2010-03-01,unemploy,15202.0,0.9881582063629905\n2810,2010-04-01,unemploy,15325.0,0.9978684771453383\n2811,2010-05-01,unemploy,14849.0,0.9602905186705613\n2812,2010-06-01,unemploy,14474.0,0.9306860345780374\n2813,2010-07-01,unemploy,14512.0,0.9336859556327465\n2814,2010-08-01,unemploy,14648.0,0.9444225151969685\n2815,2010-09-01,unemploy,14579.0,0.9389752901239441\n2816,2010-10-01,unemploy,14516.0,0.9340017367964001\n2817,2010-11-01,unemploy,15081.0,0.9786058261624694\n2818,2010-12-01,unemploy,14348.0,0.9207389279229494\n2819,2011-01-01,unemploy,14013.0,0.8942922554669614\n2820,2011-02-01,unemploy,13820.0,0.8790558143206758\n2821,2011-03-01,unemploy,13737.0,0.8725033551748638\n2822,2011-04-01,unemploy,13957.0,0.8898713191758112\n2823,2011-05-01,unemploy,13855.0,0.8818188995026447\n2824,2011-06-01,unemploy,13962.0,0.8902660456303781\n2825,2011-07-01,unemploy,13763.0,0.8745559327386121\n2826,2011-08-01,unemploy,13818.0,0.878897923738849\n2827,2011-09-01,unemploy,13948.0,0.8891608115575906\n2828,2011-10-01,unemploy,13594.0,0.8612141785742481\n2829,2011-11-01,unemploy,13302.0,0.8381621536275361\n2830,2011-12-01,unemploy,13093.0,0.8216625878266361\n2831,2012-01-01,unemploy,12797.0,0.7982947817162707\n2832,2012-02-01,unemploy,12813.0,0.799557906370885\n2833,2012-03-01,unemploy,12713.0,0.7916633772795453\n2834,2012-04-01,unemploy,12646.0,0.7863740427883477\n2835,2012-05-01,unemploy,12660.0,0.7874792768611353\n2836,2012-06-01,unemploy,12692.0,0.7900055261703639\n2837,2012-07-01,unemploy,12656.0,0.7871634956974817\n2838,2012-08-01,unemploy,12471.0,0.7725586168785032\n2839,2012-09-01,unemploy,12115.0,0.7444540933133339\n2840,2012-10-01,unemploy,12124.0,0.7451646009315545\n2841,2012-11-01,unemploy,12005.0,0.7357701113128602\n2842,2012-12-01,unemploy,12298.0,0.7589010815504855\n2843,2013-01-01,unemploy,12471.0,0.7725586168785032\n2844,2013-02-01,unemploy,11950.0,0.7314281203126234\n2845,2013-03-01,unemploy,11689.0,0.7108233993842268\n2846,2013-04-01,unemploy,11760.0,0.7164285150390779\n2847,2013-05-01,unemploy,11654.0,0.7080603142022578\n2848,2013-06-01,unemploy,11751.0,0.7157180074208573\n2849,2013-07-01,unemploy,11335.0,0.6828767664008842\n2850,2013-08-01,unemploy,11279.0,0.678455830109734\n2851,2013-09-01,unemploy,11270.0,0.6777453224915134\n2852,2013-10-01,unemploy,11136.0,0.6671666535091182\n2853,2013-11-01,unemploy,10787.0,0.6396147469803426\n2854,2013-12-01,unemploy,10404.0,0.6093787005605116\n2855,2014-01-01,unemploy,10202.0,0.5934317517960054\n2856,2014-02-01,unemploy,10349.0,0.6050367095602748\n2857,2014-03-01,unemploy,10380.0,0.60748401357859\n2858,2014-04-01,unemploy,9702.0,0.5539591063393069\n2859,2014-05-01,unemploy,9859.0,0.5663535170127102\n2860,2014-06-01,unemploy,9460.0,0.5348543459382648\n2861,2014-07-01,unemploy,9608.0,0.5465382489934475\n2862,2014-08-01,unemploy,9599.0,0.5458277413752269\n2863,2014-09-01,unemploy,9262.0,0.5192231783374122\n2864,2014-10-01,unemploy,8990.0,0.4977500592089682\n2865,2014-11-01,unemploy,9090.0,0.5056445883003079\n2866,2014-12-01,unemploy,8717.0,0.4761979947896108\n2867,2015-01-01,unemploy,8903.0,0.49088181889950266\n2868,2015-02-01,unemploy,8610.0,0.4677508486618773\n2869,2015-03-01,unemploy,8504.0,0.4593826478250572\n2870,2015-04-01,unemploy,8526.0,0.46111944422515194\n",
  :format {:type "csv"}}}

5.7 Delayed transformation

Instead of the hanami/plot function, it is possible to used hanami/base:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base hanami/line-chart
                {:=x :date
                 :=y :value
                 :=mark-color "purple"}))

The result is displayed the same way, but the internal representation delays the Hanami transformation of templates.

Let us compare the two:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/plot hanami/line-chart
                {:=x :date
                 :=y :value
                 :=mark-color "purple"})
    kind/pprint)
{:encoding
 {:x {:field :date, :type :temporal},
  :y {:field :value, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :mark {:type "line", :color "purple", :tooltip true},
 :width 400,
 :background "floralwhite",
 :height 300,
 :data
 {:values
  "rownames,date,variable,value,value01\n2297,1967-07-01,unemploy,2944.0,0.020446830346569828\n2298,1967-08-01,unemploy,2945.0,0.020525775637483226\n2299,1967-09-01,unemploy,2958.0,0.021552064419357385\n2300,1967-10-01,unemploy,3143.0,0.036156943238335834\n2301,1967-11-01,unemploy,3066.0,0.030078155838004262\n2302,1967-12-01,unemploy,3018.0,0.026288781874161206\n2303,1968-01-01,unemploy,2878.0,0.015236441146285624\n2304,1968-02-01,unemploy,3001.0,0.024946711928633458\n2305,1968-03-01,unemploy,2877.0,0.015157495855372228\n2306,1968-04-01,unemploy,2709.0,0.0018946869819215285\n2307,1968-05-01,unemploy,2740.0,0.004341991000236836\n2308,1968-06-01,unemploy,2938.0,0.019973158601089443\n2309,1968-07-01,unemploy,2883.0,0.01563116760085261\n2310,1968-08-01,unemploy,2768.0,0.006552459145811952\n2311,1968-09-01,unemploy,2686.0,7.894529091339702E-5\n2312,1968-10-01,unemploy,2689.0,3.157811636535881E-4\n2313,1968-11-01,unemploy,2715.0,0.0023683587274019105\n2314,1968-12-01,unemploy,2685.0,0.0\n2315,1969-01-01,unemploy,2718.0,0.0026051946001421017\n2316,1969-02-01,unemploy,2692.0,5.526170363937791E-4\n2317,1969-03-01,unemploy,2712.0,0.0021315228546617193\n2318,1969-04-01,unemploy,2758.0,0.005763006236677982\n2319,1969-05-01,unemploy,2713.0,0.0022104681455751164\n2320,1969-06-01,unemploy,2816.0,0.010341833109655009\n2321,1969-07-01,unemploy,2868.0,0.014446988237151653\n2322,1969-08-01,unemploy,2856.0,0.01349964474619089\n2323,1969-09-01,unemploy,3040.0,0.02802557827425594\n2324,1969-10-01,unemploy,3049.0,0.028736085892476514\n2325,1969-11-01,unemploy,2856.0,0.01349964474619089\n2326,1969-12-01,unemploy,2884.0,0.015710112891766007\n2327,1970-01-01,unemploy,3201.0,0.04073577011131286\n2328,1970-02-01,unemploy,3453.0,0.06062998342148891\n2329,1970-03-01,unemploy,3635.0,0.07499802636772716\n2330,1970-04-01,unemploy,3797.0,0.08778716349569748\n2331,1970-05-01,unemploy,3919.0,0.09741848898713192\n2332,1970-06-01,unemploy,4071.0,0.10941817320596826\n2333,1970-07-01,unemploy,4175.0,0.11762848346096155\n2334,1970-08-01,unemploy,4256.0,0.1240230520249467\n2335,1970-09-01,unemploy,4456.0,0.13981211020762613\n2336,1970-10-01,unemploy,4591.0,0.1504697244809347\n2337,1970-11-01,unemploy,4898.0,0.1747059287913476\n2338,1970-12-01,unemploy,5076.0,0.18875819057393226\n2339,1971-01-01,unemploy,4986.0,0.18165311439172654\n2340,1971-02-01,unemploy,4903.0,0.1751006552459146\n2341,1971-03-01,unemploy,4987.0,0.18173205968263992\n2342,1971-04-01,unemploy,4959.0,0.17952159153706482\n2343,1971-05-01,unemploy,4996.0,0.1824425673008605\n2344,1971-06-01,unemploy,4949.0,0.17873213862793083\n2345,1971-07-01,unemploy,5035.0,0.185521433646483\n2346,1971-08-01,unemploy,5134.0,0.1933370174469093\n2347,1971-09-01,unemploy,5042.0,0.18607405068287677\n2348,1971-10-01,unemploy,4954.0,0.17912686508249784\n2349,1971-11-01,unemploy,5161.0,0.19546854030157101\n2350,1971-12-01,unemploy,5154.0,0.19491592326517723\n2351,1972-01-01,unemploy,5019.0,0.18425830899186862\n2352,1972-02-01,unemploy,4928.0,0.1770742875187495\n2353,1972-03-01,unemploy,5038.0,0.18575826951922317\n2354,1972-04-01,unemploy,4959.0,0.17952159153706482\n2355,1972-05-01,unemploy,4922.0,0.17660061577326913\n2356,1972-06-01,unemploy,4923.0,0.17667956106418253\n2357,1972-07-01,unemploy,4913.0,0.17589010815504855\n2358,1972-08-01,unemploy,4939.0,0.17794268571879687\n2359,1972-09-01,unemploy,4849.0,0.17083760953659113\n2360,1972-10-01,unemploy,4875.0,0.17289018710033946\n2361,1972-11-01,unemploy,4602.0,0.15133812268098207\n2362,1972-12-01,unemploy,4543.0,0.14668035051709166\n2363,1973-01-01,unemploy,4326.0,0.1295492223888845\n2364,1973-02-01,unemploy,4452.0,0.13949632904397252\n2365,1973-03-01,unemploy,4394.0,0.1349175021709955\n2366,1973-04-01,unemploy,4459.0,0.1400489460803663\n2367,1973-05-01,unemploy,4329.0,0.1297860582616247\n2368,1973-06-01,unemploy,4363.0,0.13247019815268019\n2369,1973-07-01,unemploy,4305.0,0.12789137127970315\n2370,1973-08-01,unemploy,4305.0,0.12789137127970315\n2371,1973-09-01,unemploy,4350.0,0.13144390937080602\n2372,1973-10-01,unemploy,4144.0,0.11518117944264625\n2373,1973-11-01,unemploy,4396.0,0.1350753927528223\n2374,1973-12-01,unemploy,4489.0,0.1424173048077682\n2375,1974-01-01,unemploy,4644.0,0.15465382489934476\n2376,1974-02-01,unemploy,4731.0,0.1615220652088103\n2377,1974-03-01,unemploy,4634.0,0.15386437199021077\n2378,1974-04-01,unemploy,4618.0,0.15260124733559643\n2379,1974-05-01,unemploy,4705.0,0.15946948764506197\n2380,1974-06-01,unemploy,4927.0,0.1769953422278361\n2381,1974-07-01,unemploy,5063.0,0.1877319017920581\n2382,1974-08-01,unemploy,5022.0,0.18449514486460883\n2383,1974-09-01,unemploy,5437.0,0.21725744059366858\n2384,1974-10-01,unemploy,5523.0,0.22404673561222074\n2385,1974-11-01,unemploy,6140.0,0.27275598010578667\n2386,1974-12-01,unemploy,6636.0,0.3119128443988316\n2387,1975-01-01,unemploy,7501.0,0.38020052103892005\n2388,1975-02-01,unemploy,7520.0,0.38170048156627456\n2389,1975-03-01,unemploy,7978.0,0.4178574248046104\n2390,1975-04-01,unemploy,8210.0,0.43617273229651854\n2391,1975-05-01,unemploy,8433.0,0.45377753217020605\n2392,1975-06-01,unemploy,8220.0,0.4369621852056525\n2393,1975-07-01,unemploy,8127.0,0.42962027315070656\n2394,1975-08-01,unemploy,7928.0,0.41391016025894056\n2395,1975-09-01,unemploy,7923.0,0.41351543380437356\n2396,1975-10-01,unemploy,7897.0,0.41146285624062523\n2397,1975-11-01,unemploy,7794.0,0.40333149127654533\n2398,1975-12-01,unemploy,7744.0,0.3993842267308755\n2399,1976-01-01,unemploy,7534.0,0.3828057156390621\n2400,1976-02-01,unemploy,7326.0,0.3663850951290756\n2401,1976-03-01,unemploy,7230.0,0.35880634720138943\n2402,1976-04-01,unemploy,7330.0,0.3667008762927291\n2403,1976-05-01,unemploy,7053.0,0.34483303070971816\n2404,1976-06-01,unemploy,7322.0,0.36606931396542197\n2405,1976-07-01,unemploy,7490.0,0.3793321228388727\n2406,1976-08-01,unemploy,7518.0,0.38154259098444776\n2407,1976-09-01,unemploy,7380.0,0.370648140838399\n2408,1976-10-01,unemploy,7430.0,0.3745954053840688\n2409,1976-11-01,unemploy,7620.0,0.38959501065761426\n2410,1976-12-01,unemploy,7545.0,0.3836741138391095\n2411,1977-01-01,unemploy,7280.0,0.3627536117470593\n2412,1977-02-01,unemploy,7443.0,0.375621694165943\n2413,1977-03-01,unemploy,7307.0,0.364885134601721\n2414,1977-04-01,unemploy,7059.0,0.34530670245519857\n2415,1977-05-01,unemploy,6911.0,0.33362279940001577\n2416,1977-06-01,unemploy,7134.0,0.35122759927370334\n2417,1977-07-01,unemploy,6829.0,0.32714928554511724\n2418,1977-08-01,unemploy,6925.0,0.33472803347280333\n2419,1977-09-01,unemploy,6751.0,0.32099155285387226\n2420,1977-10-01,unemploy,6763.0,0.321938896344833\n2421,1977-11-01,unemploy,6815.0,0.3260440514723297\n2422,1977-12-01,unemploy,6386.0,0.29217652167048236\n2423,1978-01-01,unemploy,6489.0,0.30030788663456226\n2424,1978-02-01,unemploy,6318.0,0.28680824188837134\n2425,1978-03-01,unemploy,6337.0,0.2883082024157259\n2426,1978-04-01,unemploy,6180.0,0.27591379174232256\n2427,1978-05-01,unemploy,6127.0,0.2717296913239125\n2428,1978-06-01,unemploy,6028.0,0.2639141075234862\n2429,1978-07-01,unemploy,6309.0,0.2860977342701508\n2430,1978-08-01,unemploy,6080.0,0.26801926265098286\n2431,1978-09-01,unemploy,6125.0,0.27157180074208576\n2432,1978-10-01,unemploy,5947.0,0.2575195389595011\n2433,1978-11-01,unemploy,6077.0,0.26778242677824265\n2434,1978-12-01,unemploy,6228.0,0.2797031657061656\n2435,1979-01-01,unemploy,6109.0,0.2703086760874714\n2436,1979-02-01,unemploy,6173.0,0.2753611747059288\n2437,1979-03-01,unemploy,6109.0,0.2703086760874714\n2438,1979-04-01,unemploy,6069.0,0.2671508644509355\n2439,1979-05-01,unemploy,5840.0,0.24907239283176758\n2440,1979-06-01,unemploy,5959.0,0.25846688245046184\n2441,1979-07-01,unemploy,5996.0,0.26138785821425753\n2442,1979-08-01,unemploy,6320.0,0.28696613247019814\n2443,1979-09-01,unemploy,6190.0,0.2767032446514565\n2444,1979-10-01,unemploy,6296.0,0.2850714454882766\n2445,1979-11-01,unemploy,6238.0,0.2804926186152996\n2446,1979-12-01,unemploy,6325.0,0.28736085892476515\n2447,1980-01-01,unemploy,6683.0,0.31562327307176125\n2448,1980-02-01,unemploy,6702.0,0.3171232335991158\n2449,1980-03-01,unemploy,6729.0,0.31925475645377754\n2450,1980-04-01,unemploy,7358.0,0.36891134443830426\n2451,1980-05-01,unemploy,7984.0,0.41833109655009076\n2452,1980-06-01,unemploy,8098.0,0.427330859714218\n2453,1980-07-01,unemploy,8363.0,0.44825136180626823\n2454,1980-08-01,unemploy,8281.0,0.4417778479513697\n2455,1980-09-01,unemploy,8021.0,0.42125207231388645\n2456,1980-10-01,unemploy,8088.0,0.42654140680508407\n2457,1980-11-01,unemploy,8023.0,0.42140996289571325\n2458,1980-12-01,unemploy,7718.0,0.39733164916712715\n2459,1981-01-01,unemploy,8071.0,0.42519933685955635\n2460,1981-02-01,unemploy,8051.0,0.4236204310412884\n2461,1981-03-01,unemploy,7982.0,0.418173205968264\n2462,1981-04-01,unemploy,7869.0,0.40925238809505016\n2463,1981-05-01,unemploy,8174.0,0.4333307018236362\n2464,1981-06-01,unemploy,8098.0,0.427330859714218\n2465,1981-07-01,unemploy,7863.0,0.40877871634956975\n2466,1981-08-01,unemploy,8036.0,0.4224362516775874\n2467,1981-09-01,unemploy,8230.0,0.43775163811478646\n2468,1981-10-01,unemploy,8646.0,0.4705928791347596\n2469,1981-11-01,unemploy,9029.0,0.5008289255545907\n2470,1981-12-01,unemploy,9267.0,0.5196179047919791\n2471,1982-01-01,unemploy,9397.0,0.5298807926107207\n2472,1982-02-01,unemploy,9705.0,0.554195942212047\n2473,1982-03-01,unemploy,9895.0,0.5691955474855925\n2474,1982-04-01,unemploy,10244.0,0.596747454014368\n2475,1982-05-01,unemploy,10335.0,0.6039314754874872\n2476,1982-06-01,unemploy,10538.0,0.6199573695429068\n2477,1982-07-01,unemploy,10849.0,0.6445093550169733\n2478,1982-08-01,unemploy,10881.0,0.647035604326202\n2479,1982-09-01,unemploy,11217.0,0.6735612220731033\n2480,1982-10-01,unemploy,11529.0,0.6981921528380832\n2481,1982-11-01,unemploy,11938.0,0.7304807768216626\n2482,1982-12-01,unemploy,12051.0,0.7394015946948764\n2483,1983-01-01,unemploy,11534.0,0.6985868792926502\n2484,1983-02-01,unemploy,11545.0,0.6994552774926975\n2485,1983-03-01,unemploy,11408.0,0.6886397726375622\n2486,1983-04-01,unemploy,11268.0,0.6775874319096866\n2487,1983-05-01,unemploy,11154.0,0.6685876687455593\n2488,1983-06-01,unemploy,11246.0,0.6758506355095919\n2489,1983-07-01,unemploy,10548.0,0.6207468224520407\n2490,1983-08-01,unemploy,10623.0,0.6266677192705455\n2491,1983-09-01,unemploy,10282.0,0.5997473750690772\n2492,1983-10-01,unemploy,9887.0,0.5685639851582853\n2493,1983-11-01,unemploy,9499.0,0.5379332122838872\n2494,1983-12-01,unemploy,9331.0,0.5246704034104366\n2495,1984-01-01,unemploy,9008.0,0.4991710744454093\n2496,1984-02-01,unemploy,8791.0,0.4820399463172022\n2497,1984-03-01,unemploy,8746.0,0.4784874082260993\n2498,1984-04-01,unemploy,8762.0,0.4797505328807137\n2499,1984-05-01,unemploy,8456.0,0.4555932738612142\n2500,1984-06-01,unemploy,8226.0,0.43743585695113285\n2501,1984-07-01,unemploy,8537.0,0.46198784242519936\n2502,1984-08-01,unemploy,8519.0,0.4605668271887582\n2503,1984-09-01,unemploy,8367.0,0.44856714296992184\n2504,1984-10-01,unemploy,8381.0,0.4496723770427094\n2505,1984-11-01,unemploy,8198.0,0.4352253888055577\n2506,1984-12-01,unemploy,8358.0,0.4478566353517013\n2507,1985-01-01,unemploy,8423.0,0.4529880792610721\n2508,1985-02-01,unemploy,8321.0,0.4449356595879056\n2509,1985-03-01,unemploy,8339.0,0.4463566748243467\n2510,1985-04-01,unemploy,8395.0,0.45077761111549697\n2511,1985-05-01,unemploy,8302.0,0.443435699060551\n2512,1985-06-01,unemploy,8460.0,0.4559090550248678\n2513,1985-07-01,unemploy,8513.0,0.46009315544327783\n2514,1985-08-01,unemploy,8196.0,0.435067498223731\n2515,1985-09-01,unemploy,8248.0,0.4391726533512276\n2516,1985-10-01,unemploy,8298.0,0.4431199178968975\n2517,1985-11-01,unemploy,8128.0,0.42969921844161996\n2518,1985-12-01,unemploy,8138.0,0.4304886713507539\n2519,1986-01-01,unemploy,7795.0,0.40341043656745873\n2520,1986-02-01,unemploy,8402.0,0.4513302281518907\n2521,1986-03-01,unemploy,8383.0,0.4498302676245362\n2522,1986-04-01,unemploy,8364.0,0.44833030709718164\n2523,1986-05-01,unemploy,8439.0,0.4542512039156864\n2524,1986-06-01,unemploy,8508.0,0.4596984289887108\n2525,1986-07-01,unemploy,8319.0,0.4447777690060788\n2526,1986-08-01,unemploy,8135.0,0.4302518354780137\n2527,1986-09-01,unemploy,8310.0,0.44406726138785824\n2528,1986-10-01,unemploy,8243.0,0.4387779268966606\n2529,1986-11-01,unemploy,8159.0,0.4321465224599353\n2530,1986-12-01,unemploy,7883.0,0.41035762216783767\n2531,1987-01-01,unemploy,7892.0,0.4110681297860583\n2532,1987-02-01,unemploy,7865.0,0.40893660693139655\n2533,1987-03-01,unemploy,7862.0,0.40869977105865635\n2534,1987-04-01,unemploy,7542.0,0.3834372779663693\n2535,1987-05-01,unemploy,7574.0,0.385963527275598\n2536,1987-06-01,unemploy,7398.0,0.37206915607484015\n2537,1987-07-01,unemploy,7268.0,0.3618062682560985\n2538,1987-08-01,unemploy,7261.0,0.36125365121970476\n2539,1987-09-01,unemploy,7102.0,0.3487013499644746\n2540,1987-10-01,unemploy,7227.0,0.3585695113286492\n2541,1987-11-01,unemploy,7035.0,0.34341201547327704\n2542,1987-12-01,unemploy,6936.0,0.3355964316728507\n2543,1988-01-01,unemploy,6953.0,0.33693850161837846\n2544,1988-02-01,unemploy,6929.0,0.33504381463645694\n2545,1988-03-01,unemploy,6876.0,0.3308597142180469\n2546,1988-04-01,unemploy,6601.0,0.3091497592168627\n2547,1988-05-01,unemploy,6779.0,0.3232020209994474\n2548,1988-06-01,unemploy,6546.0,0.30480776821662586\n2549,1988-07-01,unemploy,6605.0,0.3094655403805163\n2550,1988-08-01,unemploy,6843.0,0.3282545196179048\n2551,1988-09-01,unemploy,6604.0,0.3093865950896029\n2552,1988-10-01,unemploy,6568.0,0.30654456461672064\n2553,1988-11-01,unemploy,6537.0,0.3040972605984053\n2554,1988-12-01,unemploy,6518.0,0.30259730007105073\n2555,1989-01-01,unemploy,6682.0,0.3155443277808479\n2556,1989-02-01,unemploy,6359.0,0.29004499881582063\n2557,1989-03-01,unemploy,6205.0,0.2778874240151575\n2558,1989-04-01,unemploy,6468.0,0.2986500355253809\n2559,1989-05-01,unemploy,6375.0,0.291308123470435\n2560,1989-06-01,unemploy,6577.0,0.3072550722349412\n2561,1989-07-01,unemploy,6495.0,0.3007815583800426\n2562,1989-08-01,unemploy,6511.0,0.302044683034657\n2563,1989-09-01,unemploy,6590.0,0.30828136101681536\n2564,1989-10-01,unemploy,6630.0,0.31143917265335125\n2565,1989-11-01,unemploy,6725.0,0.31893897529012394\n2566,1989-12-01,unemploy,6667.0,0.31436014841714693\n2567,1990-01-01,unemploy,6752.0,0.32107049814478567\n2568,1990-02-01,unemploy,6651.0,0.31309702376253257\n2569,1990-03-01,unemploy,6598.0,0.3089129233441225\n2570,1990-04-01,unemploy,6797.0,0.3246230362358885\n2571,1990-05-01,unemploy,6742.0,0.3202810452356517\n2572,1990-06-01,unemploy,6590.0,0.30828136101681536\n2573,1990-07-01,unemploy,6922.0,0.3344911976000632\n2574,1990-08-01,unemploy,7188.0,0.35549064498302674\n2575,1990-09-01,unemploy,7368.0,0.3697007973474382\n2576,1990-10-01,unemploy,7459.0,0.37688481882055735\n2577,1990-11-01,unemploy,7764.0,0.40096313254914345\n2578,1990-12-01,unemploy,7901.0,0.41177863740427884\n2579,1991-01-01,unemploy,8015.0,0.4207784005684061\n2580,1991-02-01,unemploy,8265.0,0.44051472329675534\n2581,1991-03-01,unemploy,8586.0,0.4658561616799558\n2582,1991-04-01,unemploy,8439.0,0.4542512039156864\n2583,1991-05-01,unemploy,8736.0,0.47769795531696535\n2584,1991-06-01,unemploy,8692.0,0.47422436251677585\n2585,1991-07-01,unemploy,8586.0,0.4658561616799558\n2586,1991-08-01,unemploy,8666.0,0.47217178495302753\n2587,1991-09-01,unemploy,8722.0,0.4765927212441778\n2588,1991-10-01,unemploy,8842.0,0.4860661561537854\n2589,1991-11-01,unemploy,8931.0,0.49309228704507774\n2590,1991-12-01,unemploy,9198.0,0.5141706797189548\n2591,1992-01-01,unemploy,9283.0,0.5208810294465935\n2592,1992-02-01,unemploy,9454.0,0.5343806741927845\n2593,1992-03-01,unemploy,9460.0,0.5348543459382648\n2594,1992-04-01,unemploy,9415.0,0.531301807847162\n2595,1992-05-01,unemploy,9744.0,0.5572748085576695\n2596,1992-06-01,unemploy,10040.0,0.580642614668035\n2597,1992-07-01,unemploy,9850.0,0.5656430093944896\n2598,1992-08-01,unemploy,9787.0,0.5606694560669456\n2599,1992-09-01,unemploy,9781.0,0.5601957843214652\n2600,1992-10-01,unemploy,9398.0,0.5299597379016342\n2601,1992-11-01,unemploy,9565.0,0.5431436014841715\n2602,1992-12-01,unemploy,9557.0,0.5425120391568643\n2603,1993-01-01,unemploy,9325.0,0.5241967316649562\n2604,1993-02-01,unemploy,9183.0,0.5129865003552538\n2605,1993-03-01,unemploy,9056.0,0.5029604484092524\n2606,1993-04-01,unemploy,9110.0,0.5072234941185758\n2607,1993-05-01,unemploy,9149.0,0.5103023604641983\n2608,1993-06-01,unemploy,9121.0,0.5080918923186232\n2609,1993-07-01,unemploy,8930.0,0.4930133417541644\n2610,1993-08-01,unemploy,8763.0,0.4798294781716271\n2611,1993-09-01,unemploy,8714.0,0.47596115891687063\n2612,1993-10-01,unemploy,8750.0,0.4788031893897529\n2613,1993-11-01,unemploy,8542.0,0.4623825688797663\n2614,1993-12-01,unemploy,8477.0,0.4572511249703955\n2615,1994-01-01,unemploy,8630.0,0.46932975448014524\n2616,1994-02-01,unemploy,8583.0,0.4656193258072156\n2617,1994-03-01,unemploy,8470.0,0.45669850793400174\n2618,1994-04-01,unemploy,8331.0,0.44572511249703956\n2619,1994-05-01,unemploy,7915.0,0.4128838714770664\n2620,1994-06-01,unemploy,7927.0,0.41383121496802716\n2621,1994-07-01,unemploy,7946.0,0.4153311754953817\n2622,1994-08-01,unemploy,7933.0,0.4143048867135075\n2623,1994-09-01,unemploy,7734.0,0.3985947738217415\n2624,1994-10-01,unemploy,7632.0,0.390542354148575\n2625,1994-11-01,unemploy,7375.0,0.370253414383832\n2626,1994-12-01,unemploy,7230.0,0.35880634720138943\n2627,1995-01-01,unemploy,7375.0,0.370253414383832\n2628,1995-02-01,unemploy,7187.0,0.3554116996921134\n2629,1995-03-01,unemploy,7153.0,0.35272755980105786\n2630,1995-04-01,unemploy,7645.0,0.3915686429304492\n2631,1995-05-01,unemploy,7430.0,0.3745954053840688\n2632,1995-06-01,unemploy,7427.0,0.3743585695113287\n2633,1995-07-01,unemploy,7527.0,0.3822530986026684\n2634,1995-08-01,unemploy,7484.0,0.3788584510933923\n2635,1995-09-01,unemploy,7478.0,0.37838477934791187\n2636,1995-10-01,unemploy,7328.0,0.3665429857109023\n2637,1995-11-01,unemploy,7426.0,0.3742796242204153\n2638,1995-12-01,unemploy,7423.0,0.37404278834767507\n2639,1996-01-01,unemploy,7491.0,0.37941106812978603\n2640,1996-02-01,unemploy,7313.0,0.3653588063472014\n2641,1996-03-01,unemploy,7318.0,0.36575353280176837\n2642,1996-04-01,unemploy,7415.0,0.37341122602036786\n2643,1996-05-01,unemploy,7423.0,0.37404278834767507\n2644,1996-06-01,unemploy,7095.0,0.34814873292808085\n2645,1996-07-01,unemploy,7337.0,0.36725349332912294\n2646,1996-08-01,unemploy,6882.0,0.3313333859635273\n2647,1996-09-01,unemploy,6979.0,0.3389910791821268\n2648,1996-10-01,unemploy,7031.0,0.34309623430962344\n2649,1996-11-01,unemploy,7236.0,0.35928001894686984\n2650,1996-12-01,unemploy,7253.0,0.36062208889239755\n2651,1997-01-01,unemploy,7158.0,0.35312228625562486\n2652,1997-02-01,unemploy,7102.0,0.3487013499644746\n2653,1997-03-01,unemploy,7000.0,0.3406489302913081\n2654,1997-04-01,unemploy,6873.0,0.3306228783453067\n2655,1997-05-01,unemploy,6655.0,0.3134128049261862\n2656,1997-06-01,unemploy,6799.0,0.3247809268177153\n2657,1997-07-01,unemploy,6655.0,0.3134128049261862\n2658,1997-08-01,unemploy,6608.0,0.3097023762532565\n2659,1997-09-01,unemploy,6656.0,0.3134917502170996\n2660,1997-10-01,unemploy,6454.0,0.2975448014525934\n2661,1997-11-01,unemploy,6308.0,0.2860187889792374\n2662,1997-12-01,unemploy,6476.0,0.2992815978526881\n2663,1998-01-01,unemploy,6368.0,0.2907555064340412\n2664,1998-02-01,unemploy,6306.0,0.2858608983974106\n2665,1998-03-01,unemploy,6422.0,0.29501855214336464\n2666,1998-04-01,unemploy,5941.0,0.2570458672140207\n2667,1998-05-01,unemploy,6047.0,0.2654140680508408\n2668,1998-06-01,unemploy,6212.0,0.2784400410515513\n2669,1998-07-01,unemploy,6259.0,0.28215046972448093\n2670,1998-08-01,unemploy,6179.0,0.27583484645140915\n2671,1998-09-01,unemploy,6300.0,0.2853872266519302\n2672,1998-10-01,unemploy,6280.0,0.28380832083366225\n2673,1998-11-01,unemploy,6100.0,0.26959816846925083\n2674,1998-12-01,unemploy,6032.0,0.2642298886871398\n2675,1999-01-01,unemploy,5976.0,0.25980895239598956\n2676,1999-02-01,unemploy,6111.0,0.2704665666692982\n2677,1999-03-01,unemploy,5783.0,0.24457251124970394\n2678,1999-04-01,unemploy,6004.0,0.2620194205415647\n2679,1999-05-01,unemploy,5796.0,0.2455988000315781\n2680,1999-06-01,unemploy,5951.0,0.25783532012315463\n2681,1999-07-01,unemploy,6025.0,0.26367727165074606\n2682,1999-08-01,unemploy,5838.0,0.2489145022499408\n2683,1999-09-01,unemploy,5915.0,0.25499328965027235\n2684,1999-10-01,unemploy,5778.0,0.24417778479513697\n2685,1999-11-01,unemploy,5716.0,0.23928317675850636\n2686,1999-12-01,unemploy,5653.0,0.23430962343096234\n2687,2000-01-01,unemploy,5708.0,0.23865161443119917\n2688,2000-02-01,unemploy,5858.0,0.25049340806820874\n2689,2000-03-01,unemploy,5733.0,0.2406252467040341\n2690,2000-04-01,unemploy,5481.0,0.22073103339385805\n2691,2000-05-01,unemploy,5758.0,0.24259887897686902\n2692,2000-06-01,unemploy,5651.0,0.23415173284913554\n2693,2000-07-01,unemploy,5747.0,0.24173048077682166\n2694,2000-08-01,unemploy,5853.0,0.25009868161364174\n2695,2000-09-01,unemploy,5625.0,0.23209915528538722\n2696,2000-10-01,unemploy,5534.0,0.2249151338122681\n2697,2000-11-01,unemploy,5639.0,0.23320438935817478\n2698,2000-12-01,unemploy,5634.0,0.2328096629036078\n2699,2001-01-01,unemploy,6023.0,0.26351938106891926\n2700,2001-02-01,unemploy,6089.0,0.2687297702692034\n2701,2001-03-01,unemploy,6141.0,0.27283492539670007\n2702,2001-04-01,unemploy,6271.0,0.2830978132154417\n2703,2001-05-01,unemploy,6226.0,0.27954527512433885\n2704,2001-06-01,unemploy,6484.0,0.29991316017999525\n2705,2001-07-01,unemploy,6583.0,0.30772874398042155\n2706,2001-08-01,unemploy,7042.0,0.3439646325096708\n2707,2001-09-01,unemploy,7142.0,0.3518591616010105\n2708,2001-10-01,unemploy,7694.0,0.39543696218520563\n2709,2001-11-01,unemploy,8003.0,0.41983105707744534\n2710,2001-12-01,unemploy,8258.0,0.4399621062603616\n2711,2002-01-01,unemploy,8182.0,0.4339622641509434\n2712,2002-02-01,unemploy,8215.0,0.4365674587510855\n2713,2002-03-01,unemploy,8304.0,0.44359358964237783\n2714,2002-04-01,unemploy,8599.0,0.46688245046182997\n2715,2002-05-01,unemploy,8399.0,0.4510933922791506\n2716,2002-06-01,unemploy,8393.0,0.45061972053367016\n2717,2002-07-01,unemploy,8390.0,0.45038288466092996\n2718,2002-08-01,unemploy,8304.0,0.44359358964237783\n2719,2002-09-01,unemploy,8251.0,0.4394094892239678\n2720,2002-10-01,unemploy,8307.0,0.44383042551511803\n2721,2002-11-01,unemploy,8520.0,0.4606457724796716\n2722,2002-12-01,unemploy,8640.0,0.4701192073892792\n2723,2003-01-01,unemploy,8520.0,0.4606457724796716\n2724,2003-02-01,unemploy,8618.0,0.4683824109891845\n2725,2003-03-01,unemploy,8588.0,0.4660140522617826\n2726,2003-04-01,unemploy,8842.0,0.4860661561537854\n2727,2003-05-01,unemploy,8957.0,0.49514486460882606\n2728,2003-06-01,unemploy,9266.0,0.5195389595010658\n2729,2003-07-01,unemploy,9011.0,0.4994079103181495\n2730,2003-08-01,unemploy,8896.0,0.49032920186310885\n2731,2003-09-01,unemploy,8921.0,0.4923028341359438\n2732,2003-10-01,unemploy,8732.0,0.47738217415331174\n2733,2003-11-01,unemploy,8576.0,0.46506670877082185\n2734,2003-12-01,unemploy,8317.0,0.444619878424252\n2735,2004-01-01,unemploy,8370.0,0.44880397884266204\n2736,2004-02-01,unemploy,8167.0,0.43277808478724245\n2737,2004-03-01,unemploy,8491.0,0.45835635904318306\n2738,2004-04-01,unemploy,8170.0,0.43301492065998265\n2739,2004-05-01,unemploy,8212.0,0.4363306228783453\n2740,2004-06-01,unemploy,8286.0,0.4421725744059367\n2741,2004-07-01,unemploy,8136.0,0.4303307807689271\n2742,2004-08-01,unemploy,7990.0,0.4188047682955712\n2743,2004-09-01,unemploy,7927.0,0.41383121496802716\n2744,2004-10-01,unemploy,8061.0,0.42440988395042234\n2745,2004-11-01,unemploy,7932.0,0.41422594142259417\n2746,2004-12-01,unemploy,7934.0,0.4143838320044209\n2747,2005-01-01,unemploy,7784.0,0.40254203836741137\n2748,2005-02-01,unemploy,7980.0,0.4180153153864372\n2749,2005-03-01,unemploy,7737.0,0.3988316096944817\n2750,2005-04-01,unemploy,7672.0,0.3937001657851109\n2751,2005-05-01,unemploy,7651.0,0.3920423146759296\n2752,2005-06-01,unemploy,7524.0,0.38201626272992817\n2753,2005-07-01,unemploy,7406.0,0.3727007184021473\n2754,2005-08-01,unemploy,7345.0,0.3678850556564301\n2755,2005-09-01,unemploy,7553.0,0.3843056761664167\n2756,2005-10-01,unemploy,7453.0,0.37641114707507695\n2757,2005-11-01,unemploy,7566.0,0.38533196494829086\n2758,2005-12-01,unemploy,7279.0,0.3626746664561459\n2759,2006-01-01,unemploy,7064.0,0.3457014289097655\n2760,2006-02-01,unemploy,7184.0,0.3551748638193732\n2761,2006-03-01,unemploy,7072.0,0.34633299123707273\n2762,2006-04-01,unemploy,7120.0,0.3501223652009158\n2763,2006-05-01,unemploy,6980.0,0.3390700244730402\n2764,2006-06-01,unemploy,7001.0,0.3407278755822215\n2765,2006-07-01,unemploy,7175.0,0.3544643562011526\n2766,2006-08-01,unemploy,7091.0,0.34783295176442725\n2767,2006-09-01,unemploy,6847.0,0.32857030078155836\n2768,2006-10-01,unemploy,6727.0,0.31909686587195074\n2769,2006-11-01,unemploy,6872.0,0.3305439330543933\n2770,2006-12-01,unemploy,6762.0,0.3218599510539196\n2771,2007-01-01,unemploy,7116.0,0.34980658403726217\n2772,2007-02-01,unemploy,6927.0,0.33488592405463014\n2773,2007-03-01,unemploy,6731.0,0.31941264703560435\n2774,2007-04-01,unemploy,6850.0,0.32880713665429856\n2775,2007-05-01,unemploy,6766.0,0.32217573221757323\n2776,2007-06-01,unemploy,6979.0,0.3389910791821268\n2777,2007-07-01,unemploy,7149.0,0.3524117786374043\n2778,2007-08-01,unemploy,7067.0,0.3459382647825057\n2779,2007-09-01,unemploy,7170.0,0.3540696297465856\n2780,2007-10-01,unemploy,7237.0,0.35935896423778324\n2781,2007-11-01,unemploy,7240.0,0.3595958001105234\n2782,2007-12-01,unemploy,7645.0,0.3915686429304492\n2783,2008-01-01,unemploy,7685.0,0.3947264545669851\n2784,2008-02-01,unemploy,7497.0,0.37988473987526644\n2785,2008-03-01,unemploy,7822.0,0.40554195942212046\n2786,2008-04-01,unemploy,7637.0,0.39093708060314203\n2787,2008-05-01,unemploy,8395.0,0.45077761111549697\n2788,2008-06-01,unemploy,8575.0,0.46498776347990844\n2789,2008-07-01,unemploy,8937.0,0.49356595879055815\n2790,2008-08-01,unemploy,9438.0,0.53311754953817\n2791,2008-09-01,unemploy,9494.0,0.5375384858293203\n2792,2008-10-01,unemploy,10074.0,0.5833267545590906\n2793,2008-11-01,unemploy,10538.0,0.6199573695429068\n2794,2008-12-01,unemploy,11286.0,0.6790084471461277\n2795,2009-01-01,unemploy,12058.0,0.7399542117312702\n2796,2009-02-01,unemploy,12898.0,0.8062682560985237\n2797,2009-03-01,unemploy,13426.0,0.8479513697007973\n2798,2009-04-01,unemploy,13853.0,0.8816610089208179\n2799,2009-05-01,unemploy,14499.0,0.9326596668508723\n2800,2009-06-01,unemploy,14707.0,0.9490802873608589\n2801,2009-07-01,unemploy,14601.0,0.9407120865240388\n2802,2009-08-01,unemploy,14814.0,0.9575274334885924\n2803,2009-09-01,unemploy,15009.0,0.9729217652167048\n2804,2009-10-01,unemploy,15352.0,1.0\n2805,2009-11-01,unemploy,15219.0,0.9895002763085182\n2806,2009-12-01,unemploy,15098.0,0.9799478961079972\n2807,2010-01-01,unemploy,15046.0,0.9758427409805005\n2808,2010-02-01,unemploy,15113.0,0.9811320754716981\n2809,2010-03-01,unemploy,15202.0,0.9881582063629905\n2810,2010-04-01,unemploy,15325.0,0.9978684771453383\n2811,2010-05-01,unemploy,14849.0,0.9602905186705613\n2812,2010-06-01,unemploy,14474.0,0.9306860345780374\n2813,2010-07-01,unemploy,14512.0,0.9336859556327465\n2814,2010-08-01,unemploy,14648.0,0.9444225151969685\n2815,2010-09-01,unemploy,14579.0,0.9389752901239441\n2816,2010-10-01,unemploy,14516.0,0.9340017367964001\n2817,2010-11-01,unemploy,15081.0,0.9786058261624694\n2818,2010-12-01,unemploy,14348.0,0.9207389279229494\n2819,2011-01-01,unemploy,14013.0,0.8942922554669614\n2820,2011-02-01,unemploy,13820.0,0.8790558143206758\n2821,2011-03-01,unemploy,13737.0,0.8725033551748638\n2822,2011-04-01,unemploy,13957.0,0.8898713191758112\n2823,2011-05-01,unemploy,13855.0,0.8818188995026447\n2824,2011-06-01,unemploy,13962.0,0.8902660456303781\n2825,2011-07-01,unemploy,13763.0,0.8745559327386121\n2826,2011-08-01,unemploy,13818.0,0.878897923738849\n2827,2011-09-01,unemploy,13948.0,0.8891608115575906\n2828,2011-10-01,unemploy,13594.0,0.8612141785742481\n2829,2011-11-01,unemploy,13302.0,0.8381621536275361\n2830,2011-12-01,unemploy,13093.0,0.8216625878266361\n2831,2012-01-01,unemploy,12797.0,0.7982947817162707\n2832,2012-02-01,unemploy,12813.0,0.799557906370885\n2833,2012-03-01,unemploy,12713.0,0.7916633772795453\n2834,2012-04-01,unemploy,12646.0,0.7863740427883477\n2835,2012-05-01,unemploy,12660.0,0.7874792768611353\n2836,2012-06-01,unemploy,12692.0,0.7900055261703639\n2837,2012-07-01,unemploy,12656.0,0.7871634956974817\n2838,2012-08-01,unemploy,12471.0,0.7725586168785032\n2839,2012-09-01,unemploy,12115.0,0.7444540933133339\n2840,2012-10-01,unemploy,12124.0,0.7451646009315545\n2841,2012-11-01,unemploy,12005.0,0.7357701113128602\n2842,2012-12-01,unemploy,12298.0,0.7589010815504855\n2843,2013-01-01,unemploy,12471.0,0.7725586168785032\n2844,2013-02-01,unemploy,11950.0,0.7314281203126234\n2845,2013-03-01,unemploy,11689.0,0.7108233993842268\n2846,2013-04-01,unemploy,11760.0,0.7164285150390779\n2847,2013-05-01,unemploy,11654.0,0.7080603142022578\n2848,2013-06-01,unemploy,11751.0,0.7157180074208573\n2849,2013-07-01,unemploy,11335.0,0.6828767664008842\n2850,2013-08-01,unemploy,11279.0,0.678455830109734\n2851,2013-09-01,unemploy,11270.0,0.6777453224915134\n2852,2013-10-01,unemploy,11136.0,0.6671666535091182\n2853,2013-11-01,unemploy,10787.0,0.6396147469803426\n2854,2013-12-01,unemploy,10404.0,0.6093787005605116\n2855,2014-01-01,unemploy,10202.0,0.5934317517960054\n2856,2014-02-01,unemploy,10349.0,0.6050367095602748\n2857,2014-03-01,unemploy,10380.0,0.60748401357859\n2858,2014-04-01,unemploy,9702.0,0.5539591063393069\n2859,2014-05-01,unemploy,9859.0,0.5663535170127102\n2860,2014-06-01,unemploy,9460.0,0.5348543459382648\n2861,2014-07-01,unemploy,9608.0,0.5465382489934475\n2862,2014-08-01,unemploy,9599.0,0.5458277413752269\n2863,2014-09-01,unemploy,9262.0,0.5192231783374122\n2864,2014-10-01,unemploy,8990.0,0.4977500592089682\n2865,2014-11-01,unemploy,9090.0,0.5056445883003079\n2866,2014-12-01,unemploy,8717.0,0.4761979947896108\n2867,2015-01-01,unemploy,8903.0,0.49088181889950266\n2868,2015-02-01,unemploy,8610.0,0.4677508486618773\n2869,2015-03-01,unemploy,8504.0,0.4593826478250572\n2870,2015-04-01,unemploy,8526.0,0.46111944422515194\n",
  :format {:type "csv"}}}
(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base hanami/line-chart
                {:=x :date
                 :=y :value
                 :=mark-color "purple"})
    kind/pprint)
{:encoding :=encoding,
 :usermeta :=usermeta,
 :mark
 {:type "line",
  :color :=mark-color,
  :size :=mark-size,
  :opacity :=mark-opacity,
  :tooltip :=mark-tooltip},
 :width :=width,
 :background :=background,
 :title :=title,
 :layer :=layer,
 :kindly/f #'scicloj.tableplot.v1.hanami/vega-lite-xform,
 :aerial.hanami.templates/defaults
 {:=x2 :com.rpl.specter.impl/NONE,
  :=base-dataset ggplot2/economics_long [574 5]:

| :rownames |      :date | :variable | :value |   :value01 |
|----------:|------------|-----------|-------:|-----------:|
|      2297 | 1967-07-01 |  unemploy | 2944.0 | 0.02044683 |
|      2298 | 1967-08-01 |  unemploy | 2945.0 | 0.02052578 |
|      2299 | 1967-09-01 |  unemploy | 2958.0 | 0.02155206 |
|      2300 | 1967-10-01 |  unemploy | 3143.0 | 0.03615694 |
|      2301 | 1967-11-01 |  unemploy | 3066.0 | 0.03007816 |
|      2302 | 1967-12-01 |  unemploy | 3018.0 | 0.02628878 |
|      2303 | 1968-01-01 |  unemploy | 2878.0 | 0.01523644 |
|      2304 | 1968-02-01 |  unemploy | 3001.0 | 0.02494671 |
|      2305 | 1968-03-01 |  unemploy | 2877.0 | 0.01515750 |
|      2306 | 1968-04-01 |  unemploy | 2709.0 | 0.00189469 |
|       ... |        ... |       ... |    ... |        ... |
|      2860 | 2014-06-01 |  unemploy | 9460.0 | 0.53485435 |
|      2861 | 2014-07-01 |  unemploy | 9608.0 | 0.54653825 |
|      2862 | 2014-08-01 |  unemploy | 9599.0 | 0.54582774 |
|      2863 | 2014-09-01 |  unemploy | 9262.0 | 0.51922318 |
|      2864 | 2014-10-01 |  unemploy | 8990.0 | 0.49775006 |
|      2865 | 2014-11-01 |  unemploy | 9090.0 | 0.50564459 |
|      2866 | 2014-12-01 |  unemploy | 8717.0 | 0.47619799 |
|      2867 | 2015-01-01 |  unemploy | 8903.0 | 0.49088182 |
|      2868 | 2015-02-01 |  unemploy | 8610.0 | 0.46775085 |
|      2869 | 2015-03-01 |  unemploy | 8504.0 | 0.45938265 |
|      2870 | 2015-04-01 |  unemploy | 8526.0 | 0.46111944 |
,
  :=layer [],
  :=y-type #function[clojure.lang.AFunction/1],
  :=x2-encoding #function[clojure.lang.AFunction/1],
  :=opacity :com.rpl.specter.impl/NONE,
  :=y2-after-stat :=y2,
  :=x2-after-stat :=x2,
  :=usermeta {:embedOptions {:renderer :=renderer}},
  :=title :com.rpl.specter.impl/NONE,
  :=y-type-after-stat #function[clojure.lang.AFunction/1],
  :=height 300,
  :=renderer :svg,
  :=mark-opacity :com.rpl.specter.impl/NONE,
  :=y-title :com.rpl.specter.impl/NONE,
  :=size :com.rpl.specter.impl/NONE,
  :=group #function[clojure.lang.AFunction/1],
  :=mark-size :com.rpl.specter.impl/NONE,
  :=layer? :com.rpl.specter.impl/NONE,
  :=size-type #function[clojure.lang.AFunction/1],
  :=layer-dataset ggplot2/economics_long [574 5]:

| :rownames |      :date | :variable | :value |   :value01 |
|----------:|------------|-----------|-------:|-----------:|
|      2297 | 1967-07-01 |  unemploy | 2944.0 | 0.02044683 |
|      2298 | 1967-08-01 |  unemploy | 2945.0 | 0.02052578 |
|      2299 | 1967-09-01 |  unemploy | 2958.0 | 0.02155206 |
|      2300 | 1967-10-01 |  unemploy | 3143.0 | 0.03615694 |
|      2301 | 1967-11-01 |  unemploy | 3066.0 | 0.03007816 |
|      2302 | 1967-12-01 |  unemploy | 3018.0 | 0.02628878 |
|      2303 | 1968-01-01 |  unemploy | 2878.0 | 0.01523644 |
|      2304 | 1968-02-01 |  unemploy | 3001.0 | 0.02494671 |
|      2305 | 1968-03-01 |  unemploy | 2877.0 | 0.01515750 |
|      2306 | 1968-04-01 |  unemploy | 2709.0 | 0.00189469 |
|       ... |        ... |       ... |    ... |        ... |
|      2860 | 2014-06-01 |  unemploy | 9460.0 | 0.53485435 |
|      2861 | 2014-07-01 |  unemploy | 9608.0 | 0.54653825 |
|      2862 | 2014-08-01 |  unemploy | 9599.0 | 0.54582774 |
|      2863 | 2014-09-01 |  unemploy | 9262.0 | 0.51922318 |
|      2864 | 2014-10-01 |  unemploy | 8990.0 | 0.49775006 |
|      2865 | 2014-11-01 |  unemploy | 9090.0 | 0.50564459 |
|      2866 | 2014-12-01 |  unemploy | 8717.0 | 0.47619799 |
|      2867 | 2015-01-01 |  unemploy | 8903.0 | 0.49088182 |
|      2868 | 2015-02-01 |  unemploy | 8610.0 | 0.46775085 |
|      2869 | 2015-03-01 |  unemploy | 8504.0 | 0.45938265 |
|      2870 | 2015-04-01 |  unemploy | 8526.0 | 0.46111944 |
,
  :=color :com.rpl.specter.impl/NONE,
  :=mark-color "purple",
  :=x :date,
  :=y2 :com.rpl.specter.impl/NONE,
  :=x-after-stat :=x,
  :DFMT {:type "csv"},
  :=encoding
  {:color {:field :=color, :type :=color-type},
   :size {:field :=size, :type :=size-type},
   :x
   {:field :=x-after-stat,
    :type :=x-type-after-stat,
    :title :=x-title,
    :bin :=x-bin},
   :y
   {:field :=y-after-stat,
    :type :=y-type-after-stat,
    :title :=y-title,
    :bin :=y-bin},
   :x2 :=x2-encoding,
   :y2 :=y2-encoding},
  :=x-type-after-stat #function[clojure.lang.AFunction/1],
  :=x-bin :com.rpl.specter.impl/NONE,
  :=x-type #function[clojure.lang.AFunction/1],
  :=histogram-nbins 10,
  :=stat :=dataset,
  :=width 400,
  :=color-type #function[clojure.lang.AFunction/1],
  :=mark "circle",
  :=y-bin :com.rpl.specter.impl/NONE,
  :=x-title :com.rpl.specter.impl/NONE,
  :=csv-data #function[clojure.lang.AFunction/1],
  :=y :value,
  :=data {:values :=csv-data, :format {:type "csv"}},
  :=dataset #function[clojure.lang.AFunction/1],
  :VALDATA :=csv-data,
  :=mark-tooltip true,
  :=background "floralwhite",
  :=y-after-stat :=y,
  :=predictors [:=x],
  :=y2-encoding #function[clojure.lang.AFunction/1]},
 :height :=height,
 :data :=data}

The structure returned by hanami/base is a Hanami template (with local defaults). When it is displayed, it goes through the Hanami transform to recieve the Vega-Lite spec.

When we use base, we can keep processing the template in a pipeline of transformations. We will use it soon with layers.

5.8 Adding layers

A base plot does not need to have a specified chart. Instead, we may add layers:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value
                 :=mark-color "purple"})
    hanami/layer-line)

The substitution keys can also be specified on the layer level:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-line {:=mark-color "purple"}))

This allows us to create, e.g., aesthetic differences between layers:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-point {:=mark-color "green"
                        :=mark-size 200
                        :=mark-opacity 0.1})
    (hanami/layer-line {:=mark-color "purple"}))

We can also skip the base and have everything in the layer:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/layer-line {:=x :date
                       :=y :value
                       :=mark-color "purple"}))

5.9 Updating data

Using hanami/update-data, we may process the dataset during the pipeline, affecting only the layers added further down the pipeline.

This functionality is inspired by ggbuilder and metamorph.

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-line {:=mark-color "purple"})
    (hanami/update-data tc/random 5)
    (hanami/layer-point {:=mark-color "green"
                        :=mark-size 200}))

You see, we have lots of data for the lines, but only five random points.

5.10 Processing raw vega-lite

During a pipeline, we may call hanami/plot to apply the Hanami transform and realize the Vega-Lite spec.

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-line {:=mark-color "purple"})
    (hanami/update-data tc/random 5)
    (hanami/layer-point {:=mark-color "green"
                        :=mark-size 200})
    hanami/plot
    kind/pprint)
{:encoding
 {:x {:field :date, :type :temporal},
  :y {:field :value, :type :quantitative}},
 :usermeta {:embedOptions {:renderer :svg}},
 :width 400,
 :background "floralwhite",
 :layer
 [{:mark {:type "line", :color "purple", :tooltip true},
   :encoding
   {:x {:field :date, :type :temporal},
    :y {:field :value, :type :quantitative}},
   :data
   {:values
    "rownames,date,variable,value,value01\n2297,1967-07-01,unemploy,2944.0,0.020446830346569828\n2298,1967-08-01,unemploy,2945.0,0.020525775637483226\n2299,1967-09-01,unemploy,2958.0,0.021552064419357385\n2300,1967-10-01,unemploy,3143.0,0.036156943238335834\n2301,1967-11-01,unemploy,3066.0,0.030078155838004262\n2302,1967-12-01,unemploy,3018.0,0.026288781874161206\n2303,1968-01-01,unemploy,2878.0,0.015236441146285624\n2304,1968-02-01,unemploy,3001.0,0.024946711928633458\n2305,1968-03-01,unemploy,2877.0,0.015157495855372228\n2306,1968-04-01,unemploy,2709.0,0.0018946869819215285\n2307,1968-05-01,unemploy,2740.0,0.004341991000236836\n2308,1968-06-01,unemploy,2938.0,0.019973158601089443\n2309,1968-07-01,unemploy,2883.0,0.01563116760085261\n2310,1968-08-01,unemploy,2768.0,0.006552459145811952\n2311,1968-09-01,unemploy,2686.0,7.894529091339702E-5\n2312,1968-10-01,unemploy,2689.0,3.157811636535881E-4\n2313,1968-11-01,unemploy,2715.0,0.0023683587274019105\n2314,1968-12-01,unemploy,2685.0,0.0\n2315,1969-01-01,unemploy,2718.0,0.0026051946001421017\n2316,1969-02-01,unemploy,2692.0,5.526170363937791E-4\n2317,1969-03-01,unemploy,2712.0,0.0021315228546617193\n2318,1969-04-01,unemploy,2758.0,0.005763006236677982\n2319,1969-05-01,unemploy,2713.0,0.0022104681455751164\n2320,1969-06-01,unemploy,2816.0,0.010341833109655009\n2321,1969-07-01,unemploy,2868.0,0.014446988237151653\n2322,1969-08-01,unemploy,2856.0,0.01349964474619089\n2323,1969-09-01,unemploy,3040.0,0.02802557827425594\n2324,1969-10-01,unemploy,3049.0,0.028736085892476514\n2325,1969-11-01,unemploy,2856.0,0.01349964474619089\n2326,1969-12-01,unemploy,2884.0,0.015710112891766007\n2327,1970-01-01,unemploy,3201.0,0.04073577011131286\n2328,1970-02-01,unemploy,3453.0,0.06062998342148891\n2329,1970-03-01,unemploy,3635.0,0.07499802636772716\n2330,1970-04-01,unemploy,3797.0,0.08778716349569748\n2331,1970-05-01,unemploy,3919.0,0.09741848898713192\n2332,1970-06-01,unemploy,4071.0,0.10941817320596826\n2333,1970-07-01,unemploy,4175.0,0.11762848346096155\n2334,1970-08-01,unemploy,4256.0,0.1240230520249467\n2335,1970-09-01,unemploy,4456.0,0.13981211020762613\n2336,1970-10-01,unemploy,4591.0,0.1504697244809347\n2337,1970-11-01,unemploy,4898.0,0.1747059287913476\n2338,1970-12-01,unemploy,5076.0,0.18875819057393226\n2339,1971-01-01,unemploy,4986.0,0.18165311439172654\n2340,1971-02-01,unemploy,4903.0,0.1751006552459146\n2341,1971-03-01,unemploy,4987.0,0.18173205968263992\n2342,1971-04-01,unemploy,4959.0,0.17952159153706482\n2343,1971-05-01,unemploy,4996.0,0.1824425673008605\n2344,1971-06-01,unemploy,4949.0,0.17873213862793083\n2345,1971-07-01,unemploy,5035.0,0.185521433646483\n2346,1971-08-01,unemploy,5134.0,0.1933370174469093\n2347,1971-09-01,unemploy,5042.0,0.18607405068287677\n2348,1971-10-01,unemploy,4954.0,0.17912686508249784\n2349,1971-11-01,unemploy,5161.0,0.19546854030157101\n2350,1971-12-01,unemploy,5154.0,0.19491592326517723\n2351,1972-01-01,unemploy,5019.0,0.18425830899186862\n2352,1972-02-01,unemploy,4928.0,0.1770742875187495\n2353,1972-03-01,unemploy,5038.0,0.18575826951922317\n2354,1972-04-01,unemploy,4959.0,0.17952159153706482\n2355,1972-05-01,unemploy,4922.0,0.17660061577326913\n2356,1972-06-01,unemploy,4923.0,0.17667956106418253\n2357,1972-07-01,unemploy,4913.0,0.17589010815504855\n2358,1972-08-01,unemploy,4939.0,0.17794268571879687\n2359,1972-09-01,unemploy,4849.0,0.17083760953659113\n2360,1972-10-01,unemploy,4875.0,0.17289018710033946\n2361,1972-11-01,unemploy,4602.0,0.15133812268098207\n2362,1972-12-01,unemploy,4543.0,0.14668035051709166\n2363,1973-01-01,unemploy,4326.0,0.1295492223888845\n2364,1973-02-01,unemploy,4452.0,0.13949632904397252\n2365,1973-03-01,unemploy,4394.0,0.1349175021709955\n2366,1973-04-01,unemploy,4459.0,0.1400489460803663\n2367,1973-05-01,unemploy,4329.0,0.1297860582616247\n2368,1973-06-01,unemploy,4363.0,0.13247019815268019\n2369,1973-07-01,unemploy,4305.0,0.12789137127970315\n2370,1973-08-01,unemploy,4305.0,0.12789137127970315\n2371,1973-09-01,unemploy,4350.0,0.13144390937080602\n2372,1973-10-01,unemploy,4144.0,0.11518117944264625\n2373,1973-11-01,unemploy,4396.0,0.1350753927528223\n2374,1973-12-01,unemploy,4489.0,0.1424173048077682\n2375,1974-01-01,unemploy,4644.0,0.15465382489934476\n2376,1974-02-01,unemploy,4731.0,0.1615220652088103\n2377,1974-03-01,unemploy,4634.0,0.15386437199021077\n2378,1974-04-01,unemploy,4618.0,0.15260124733559643\n2379,1974-05-01,unemploy,4705.0,0.15946948764506197\n2380,1974-06-01,unemploy,4927.0,0.1769953422278361\n2381,1974-07-01,unemploy,5063.0,0.1877319017920581\n2382,1974-08-01,unemploy,5022.0,0.18449514486460883\n2383,1974-09-01,unemploy,5437.0,0.21725744059366858\n2384,1974-10-01,unemploy,5523.0,0.22404673561222074\n2385,1974-11-01,unemploy,6140.0,0.27275598010578667\n2386,1974-12-01,unemploy,6636.0,0.3119128443988316\n2387,1975-01-01,unemploy,7501.0,0.38020052103892005\n2388,1975-02-01,unemploy,7520.0,0.38170048156627456\n2389,1975-03-01,unemploy,7978.0,0.4178574248046104\n2390,1975-04-01,unemploy,8210.0,0.43617273229651854\n2391,1975-05-01,unemploy,8433.0,0.45377753217020605\n2392,1975-06-01,unemploy,8220.0,0.4369621852056525\n2393,1975-07-01,unemploy,8127.0,0.42962027315070656\n2394,1975-08-01,unemploy,7928.0,0.41391016025894056\n2395,1975-09-01,unemploy,7923.0,0.41351543380437356\n2396,1975-10-01,unemploy,7897.0,0.41146285624062523\n2397,1975-11-01,unemploy,7794.0,0.40333149127654533\n2398,1975-12-01,unemploy,7744.0,0.3993842267308755\n2399,1976-01-01,unemploy,7534.0,0.3828057156390621\n2400,1976-02-01,unemploy,7326.0,0.3663850951290756\n2401,1976-03-01,unemploy,7230.0,0.35880634720138943\n2402,1976-04-01,unemploy,7330.0,0.3667008762927291\n2403,1976-05-01,unemploy,7053.0,0.34483303070971816\n2404,1976-06-01,unemploy,7322.0,0.36606931396542197\n2405,1976-07-01,unemploy,7490.0,0.3793321228388727\n2406,1976-08-01,unemploy,7518.0,0.38154259098444776\n2407,1976-09-01,unemploy,7380.0,0.370648140838399\n2408,1976-10-01,unemploy,7430.0,0.3745954053840688\n2409,1976-11-01,unemploy,7620.0,0.38959501065761426\n2410,1976-12-01,unemploy,7545.0,0.3836741138391095\n2411,1977-01-01,unemploy,7280.0,0.3627536117470593\n2412,1977-02-01,unemploy,7443.0,0.375621694165943\n2413,1977-03-01,unemploy,7307.0,0.364885134601721\n2414,1977-04-01,unemploy,7059.0,0.34530670245519857\n2415,1977-05-01,unemploy,6911.0,0.33362279940001577\n2416,1977-06-01,unemploy,7134.0,0.35122759927370334\n2417,1977-07-01,unemploy,6829.0,0.32714928554511724\n2418,1977-08-01,unemploy,6925.0,0.33472803347280333\n2419,1977-09-01,unemploy,6751.0,0.32099155285387226\n2420,1977-10-01,unemploy,6763.0,0.321938896344833\n2421,1977-11-01,unemploy,6815.0,0.3260440514723297\n2422,1977-12-01,unemploy,6386.0,0.29217652167048236\n2423,1978-01-01,unemploy,6489.0,0.30030788663456226\n2424,1978-02-01,unemploy,6318.0,0.28680824188837134\n2425,1978-03-01,unemploy,6337.0,0.2883082024157259\n2426,1978-04-01,unemploy,6180.0,0.27591379174232256\n2427,1978-05-01,unemploy,6127.0,0.2717296913239125\n2428,1978-06-01,unemploy,6028.0,0.2639141075234862\n2429,1978-07-01,unemploy,6309.0,0.2860977342701508\n2430,1978-08-01,unemploy,6080.0,0.26801926265098286\n2431,1978-09-01,unemploy,6125.0,0.27157180074208576\n2432,1978-10-01,unemploy,5947.0,0.2575195389595011\n2433,1978-11-01,unemploy,6077.0,0.26778242677824265\n2434,1978-12-01,unemploy,6228.0,0.2797031657061656\n2435,1979-01-01,unemploy,6109.0,0.2703086760874714\n2436,1979-02-01,unemploy,6173.0,0.2753611747059288\n2437,1979-03-01,unemploy,6109.0,0.2703086760874714\n2438,1979-04-01,unemploy,6069.0,0.2671508644509355\n2439,1979-05-01,unemploy,5840.0,0.24907239283176758\n2440,1979-06-01,unemploy,5959.0,0.25846688245046184\n2441,1979-07-01,unemploy,5996.0,0.26138785821425753\n2442,1979-08-01,unemploy,6320.0,0.28696613247019814\n2443,1979-09-01,unemploy,6190.0,0.2767032446514565\n2444,1979-10-01,unemploy,6296.0,0.2850714454882766\n2445,1979-11-01,unemploy,6238.0,0.2804926186152996\n2446,1979-12-01,unemploy,6325.0,0.28736085892476515\n2447,1980-01-01,unemploy,6683.0,0.31562327307176125\n2448,1980-02-01,unemploy,6702.0,0.3171232335991158\n2449,1980-03-01,unemploy,6729.0,0.31925475645377754\n2450,1980-04-01,unemploy,7358.0,0.36891134443830426\n2451,1980-05-01,unemploy,7984.0,0.41833109655009076\n2452,1980-06-01,unemploy,8098.0,0.427330859714218\n2453,1980-07-01,unemploy,8363.0,0.44825136180626823\n2454,1980-08-01,unemploy,8281.0,0.4417778479513697\n2455,1980-09-01,unemploy,8021.0,0.42125207231388645\n2456,1980-10-01,unemploy,8088.0,0.42654140680508407\n2457,1980-11-01,unemploy,8023.0,0.42140996289571325\n2458,1980-12-01,unemploy,7718.0,0.39733164916712715\n2459,1981-01-01,unemploy,8071.0,0.42519933685955635\n2460,1981-02-01,unemploy,8051.0,0.4236204310412884\n2461,1981-03-01,unemploy,7982.0,0.418173205968264\n2462,1981-04-01,unemploy,7869.0,0.40925238809505016\n2463,1981-05-01,unemploy,8174.0,0.4333307018236362\n2464,1981-06-01,unemploy,8098.0,0.427330859714218\n2465,1981-07-01,unemploy,7863.0,0.40877871634956975\n2466,1981-08-01,unemploy,8036.0,0.4224362516775874\n2467,1981-09-01,unemploy,8230.0,0.43775163811478646\n2468,1981-10-01,unemploy,8646.0,0.4705928791347596\n2469,1981-11-01,unemploy,9029.0,0.5008289255545907\n2470,1981-12-01,unemploy,9267.0,0.5196179047919791\n2471,1982-01-01,unemploy,9397.0,0.5298807926107207\n2472,1982-02-01,unemploy,9705.0,0.554195942212047\n2473,1982-03-01,unemploy,9895.0,0.5691955474855925\n2474,1982-04-01,unemploy,10244.0,0.596747454014368\n2475,1982-05-01,unemploy,10335.0,0.6039314754874872\n2476,1982-06-01,unemploy,10538.0,0.6199573695429068\n2477,1982-07-01,unemploy,10849.0,0.6445093550169733\n2478,1982-08-01,unemploy,10881.0,0.647035604326202\n2479,1982-09-01,unemploy,11217.0,0.6735612220731033\n2480,1982-10-01,unemploy,11529.0,0.6981921528380832\n2481,1982-11-01,unemploy,11938.0,0.7304807768216626\n2482,1982-12-01,unemploy,12051.0,0.7394015946948764\n2483,1983-01-01,unemploy,11534.0,0.6985868792926502\n2484,1983-02-01,unemploy,11545.0,0.6994552774926975\n2485,1983-03-01,unemploy,11408.0,0.6886397726375622\n2486,1983-04-01,unemploy,11268.0,0.6775874319096866\n2487,1983-05-01,unemploy,11154.0,0.6685876687455593\n2488,1983-06-01,unemploy,11246.0,0.6758506355095919\n2489,1983-07-01,unemploy,10548.0,0.6207468224520407\n2490,1983-08-01,unemploy,10623.0,0.6266677192705455\n2491,1983-09-01,unemploy,10282.0,0.5997473750690772\n2492,1983-10-01,unemploy,9887.0,0.5685639851582853\n2493,1983-11-01,unemploy,9499.0,0.5379332122838872\n2494,1983-12-01,unemploy,9331.0,0.5246704034104366\n2495,1984-01-01,unemploy,9008.0,0.4991710744454093\n2496,1984-02-01,unemploy,8791.0,0.4820399463172022\n2497,1984-03-01,unemploy,8746.0,0.4784874082260993\n2498,1984-04-01,unemploy,8762.0,0.4797505328807137\n2499,1984-05-01,unemploy,8456.0,0.4555932738612142\n2500,1984-06-01,unemploy,8226.0,0.43743585695113285\n2501,1984-07-01,unemploy,8537.0,0.46198784242519936\n2502,1984-08-01,unemploy,8519.0,0.4605668271887582\n2503,1984-09-01,unemploy,8367.0,0.44856714296992184\n2504,1984-10-01,unemploy,8381.0,0.4496723770427094\n2505,1984-11-01,unemploy,8198.0,0.4352253888055577\n2506,1984-12-01,unemploy,8358.0,0.4478566353517013\n2507,1985-01-01,unemploy,8423.0,0.4529880792610721\n2508,1985-02-01,unemploy,8321.0,0.4449356595879056\n2509,1985-03-01,unemploy,8339.0,0.4463566748243467\n2510,1985-04-01,unemploy,8395.0,0.45077761111549697\n2511,1985-05-01,unemploy,8302.0,0.443435699060551\n2512,1985-06-01,unemploy,8460.0,0.4559090550248678\n2513,1985-07-01,unemploy,8513.0,0.46009315544327783\n2514,1985-08-01,unemploy,8196.0,0.435067498223731\n2515,1985-09-01,unemploy,8248.0,0.4391726533512276\n2516,1985-10-01,unemploy,8298.0,0.4431199178968975\n2517,1985-11-01,unemploy,8128.0,0.42969921844161996\n2518,1985-12-01,unemploy,8138.0,0.4304886713507539\n2519,1986-01-01,unemploy,7795.0,0.40341043656745873\n2520,1986-02-01,unemploy,8402.0,0.4513302281518907\n2521,1986-03-01,unemploy,8383.0,0.4498302676245362\n2522,1986-04-01,unemploy,8364.0,0.44833030709718164\n2523,1986-05-01,unemploy,8439.0,0.4542512039156864\n2524,1986-06-01,unemploy,8508.0,0.4596984289887108\n2525,1986-07-01,unemploy,8319.0,0.4447777690060788\n2526,1986-08-01,unemploy,8135.0,0.4302518354780137\n2527,1986-09-01,unemploy,8310.0,0.44406726138785824\n2528,1986-10-01,unemploy,8243.0,0.4387779268966606\n2529,1986-11-01,unemploy,8159.0,0.4321465224599353\n2530,1986-12-01,unemploy,7883.0,0.41035762216783767\n2531,1987-01-01,unemploy,7892.0,0.4110681297860583\n2532,1987-02-01,unemploy,7865.0,0.40893660693139655\n2533,1987-03-01,unemploy,7862.0,0.40869977105865635\n2534,1987-04-01,unemploy,7542.0,0.3834372779663693\n2535,1987-05-01,unemploy,7574.0,0.385963527275598\n2536,1987-06-01,unemploy,7398.0,0.37206915607484015\n2537,1987-07-01,unemploy,7268.0,0.3618062682560985\n2538,1987-08-01,unemploy,7261.0,0.36125365121970476\n2539,1987-09-01,unemploy,7102.0,0.3487013499644746\n2540,1987-10-01,unemploy,7227.0,0.3585695113286492\n2541,1987-11-01,unemploy,7035.0,0.34341201547327704\n2542,1987-12-01,unemploy,6936.0,0.3355964316728507\n2543,1988-01-01,unemploy,6953.0,0.33693850161837846\n2544,1988-02-01,unemploy,6929.0,0.33504381463645694\n2545,1988-03-01,unemploy,6876.0,0.3308597142180469\n2546,1988-04-01,unemploy,6601.0,0.3091497592168627\n2547,1988-05-01,unemploy,6779.0,0.3232020209994474\n2548,1988-06-01,unemploy,6546.0,0.30480776821662586\n2549,1988-07-01,unemploy,6605.0,0.3094655403805163\n2550,1988-08-01,unemploy,6843.0,0.3282545196179048\n2551,1988-09-01,unemploy,6604.0,0.3093865950896029\n2552,1988-10-01,unemploy,6568.0,0.30654456461672064\n2553,1988-11-01,unemploy,6537.0,0.3040972605984053\n2554,1988-12-01,unemploy,6518.0,0.30259730007105073\n2555,1989-01-01,unemploy,6682.0,0.3155443277808479\n2556,1989-02-01,unemploy,6359.0,0.29004499881582063\n2557,1989-03-01,unemploy,6205.0,0.2778874240151575\n2558,1989-04-01,unemploy,6468.0,0.2986500355253809\n2559,1989-05-01,unemploy,6375.0,0.291308123470435\n2560,1989-06-01,unemploy,6577.0,0.3072550722349412\n2561,1989-07-01,unemploy,6495.0,0.3007815583800426\n2562,1989-08-01,unemploy,6511.0,0.302044683034657\n2563,1989-09-01,unemploy,6590.0,0.30828136101681536\n2564,1989-10-01,unemploy,6630.0,0.31143917265335125\n2565,1989-11-01,unemploy,6725.0,0.31893897529012394\n2566,1989-12-01,unemploy,6667.0,0.31436014841714693\n2567,1990-01-01,unemploy,6752.0,0.32107049814478567\n2568,1990-02-01,unemploy,6651.0,0.31309702376253257\n2569,1990-03-01,unemploy,6598.0,0.3089129233441225\n2570,1990-04-01,unemploy,6797.0,0.3246230362358885\n2571,1990-05-01,unemploy,6742.0,0.3202810452356517\n2572,1990-06-01,unemploy,6590.0,0.30828136101681536\n2573,1990-07-01,unemploy,6922.0,0.3344911976000632\n2574,1990-08-01,unemploy,7188.0,0.35549064498302674\n2575,1990-09-01,unemploy,7368.0,0.3697007973474382\n2576,1990-10-01,unemploy,7459.0,0.37688481882055735\n2577,1990-11-01,unemploy,7764.0,0.40096313254914345\n2578,1990-12-01,unemploy,7901.0,0.41177863740427884\n2579,1991-01-01,unemploy,8015.0,0.4207784005684061\n2580,1991-02-01,unemploy,8265.0,0.44051472329675534\n2581,1991-03-01,unemploy,8586.0,0.4658561616799558\n2582,1991-04-01,unemploy,8439.0,0.4542512039156864\n2583,1991-05-01,unemploy,8736.0,0.47769795531696535\n2584,1991-06-01,unemploy,8692.0,0.47422436251677585\n2585,1991-07-01,unemploy,8586.0,0.4658561616799558\n2586,1991-08-01,unemploy,8666.0,0.47217178495302753\n2587,1991-09-01,unemploy,8722.0,0.4765927212441778\n2588,1991-10-01,unemploy,8842.0,0.4860661561537854\n2589,1991-11-01,unemploy,8931.0,0.49309228704507774\n2590,1991-12-01,unemploy,9198.0,0.5141706797189548\n2591,1992-01-01,unemploy,9283.0,0.5208810294465935\n2592,1992-02-01,unemploy,9454.0,0.5343806741927845\n2593,1992-03-01,unemploy,9460.0,0.5348543459382648\n2594,1992-04-01,unemploy,9415.0,0.531301807847162\n2595,1992-05-01,unemploy,9744.0,0.5572748085576695\n2596,1992-06-01,unemploy,10040.0,0.580642614668035\n2597,1992-07-01,unemploy,9850.0,0.5656430093944896\n2598,1992-08-01,unemploy,9787.0,0.5606694560669456\n2599,1992-09-01,unemploy,9781.0,0.5601957843214652\n2600,1992-10-01,unemploy,9398.0,0.5299597379016342\n2601,1992-11-01,unemploy,9565.0,0.5431436014841715\n2602,1992-12-01,unemploy,9557.0,0.5425120391568643\n2603,1993-01-01,unemploy,9325.0,0.5241967316649562\n2604,1993-02-01,unemploy,9183.0,0.5129865003552538\n2605,1993-03-01,unemploy,9056.0,0.5029604484092524\n2606,1993-04-01,unemploy,9110.0,0.5072234941185758\n2607,1993-05-01,unemploy,9149.0,0.5103023604641983\n2608,1993-06-01,unemploy,9121.0,0.5080918923186232\n2609,1993-07-01,unemploy,8930.0,0.4930133417541644\n2610,1993-08-01,unemploy,8763.0,0.4798294781716271\n2611,1993-09-01,unemploy,8714.0,0.47596115891687063\n2612,1993-10-01,unemploy,8750.0,0.4788031893897529\n2613,1993-11-01,unemploy,8542.0,0.4623825688797663\n2614,1993-12-01,unemploy,8477.0,0.4572511249703955\n2615,1994-01-01,unemploy,8630.0,0.46932975448014524\n2616,1994-02-01,unemploy,8583.0,0.4656193258072156\n2617,1994-03-01,unemploy,8470.0,0.45669850793400174\n2618,1994-04-01,unemploy,8331.0,0.44572511249703956\n2619,1994-05-01,unemploy,7915.0,0.4128838714770664\n2620,1994-06-01,unemploy,7927.0,0.41383121496802716\n2621,1994-07-01,unemploy,7946.0,0.4153311754953817\n2622,1994-08-01,unemploy,7933.0,0.4143048867135075\n2623,1994-09-01,unemploy,7734.0,0.3985947738217415\n2624,1994-10-01,unemploy,7632.0,0.390542354148575\n2625,1994-11-01,unemploy,7375.0,0.370253414383832\n2626,1994-12-01,unemploy,7230.0,0.35880634720138943\n2627,1995-01-01,unemploy,7375.0,0.370253414383832\n2628,1995-02-01,unemploy,7187.0,0.3554116996921134\n2629,1995-03-01,unemploy,7153.0,0.35272755980105786\n2630,1995-04-01,unemploy,7645.0,0.3915686429304492\n2631,1995-05-01,unemploy,7430.0,0.3745954053840688\n2632,1995-06-01,unemploy,7427.0,0.3743585695113287\n2633,1995-07-01,unemploy,7527.0,0.3822530986026684\n2634,1995-08-01,unemploy,7484.0,0.3788584510933923\n2635,1995-09-01,unemploy,7478.0,0.37838477934791187\n2636,1995-10-01,unemploy,7328.0,0.3665429857109023\n2637,1995-11-01,unemploy,7426.0,0.3742796242204153\n2638,1995-12-01,unemploy,7423.0,0.37404278834767507\n2639,1996-01-01,unemploy,7491.0,0.37941106812978603\n2640,1996-02-01,unemploy,7313.0,0.3653588063472014\n2641,1996-03-01,unemploy,7318.0,0.36575353280176837\n2642,1996-04-01,unemploy,7415.0,0.37341122602036786\n2643,1996-05-01,unemploy,7423.0,0.37404278834767507\n2644,1996-06-01,unemploy,7095.0,0.34814873292808085\n2645,1996-07-01,unemploy,7337.0,0.36725349332912294\n2646,1996-08-01,unemploy,6882.0,0.3313333859635273\n2647,1996-09-01,unemploy,6979.0,0.3389910791821268\n2648,1996-10-01,unemploy,7031.0,0.34309623430962344\n2649,1996-11-01,unemploy,7236.0,0.35928001894686984\n2650,1996-12-01,unemploy,7253.0,0.36062208889239755\n2651,1997-01-01,unemploy,7158.0,0.35312228625562486\n2652,1997-02-01,unemploy,7102.0,0.3487013499644746\n2653,1997-03-01,unemploy,7000.0,0.3406489302913081\n2654,1997-04-01,unemploy,6873.0,0.3306228783453067\n2655,1997-05-01,unemploy,6655.0,0.3134128049261862\n2656,1997-06-01,unemploy,6799.0,0.3247809268177153\n2657,1997-07-01,unemploy,6655.0,0.3134128049261862\n2658,1997-08-01,unemploy,6608.0,0.3097023762532565\n2659,1997-09-01,unemploy,6656.0,0.3134917502170996\n2660,1997-10-01,unemploy,6454.0,0.2975448014525934\n2661,1997-11-01,unemploy,6308.0,0.2860187889792374\n2662,1997-12-01,unemploy,6476.0,0.2992815978526881\n2663,1998-01-01,unemploy,6368.0,0.2907555064340412\n2664,1998-02-01,unemploy,6306.0,0.2858608983974106\n2665,1998-03-01,unemploy,6422.0,0.29501855214336464\n2666,1998-04-01,unemploy,5941.0,0.2570458672140207\n2667,1998-05-01,unemploy,6047.0,0.2654140680508408\n2668,1998-06-01,unemploy,6212.0,0.2784400410515513\n2669,1998-07-01,unemploy,6259.0,0.28215046972448093\n2670,1998-08-01,unemploy,6179.0,0.27583484645140915\n2671,1998-09-01,unemploy,6300.0,0.2853872266519302\n2672,1998-10-01,unemploy,6280.0,0.28380832083366225\n2673,1998-11-01,unemploy,6100.0,0.26959816846925083\n2674,1998-12-01,unemploy,6032.0,0.2642298886871398\n2675,1999-01-01,unemploy,5976.0,0.25980895239598956\n2676,1999-02-01,unemploy,6111.0,0.2704665666692982\n2677,1999-03-01,unemploy,5783.0,0.24457251124970394\n2678,1999-04-01,unemploy,6004.0,0.2620194205415647\n2679,1999-05-01,unemploy,5796.0,0.2455988000315781\n2680,1999-06-01,unemploy,5951.0,0.25783532012315463\n2681,1999-07-01,unemploy,6025.0,0.26367727165074606\n2682,1999-08-01,unemploy,5838.0,0.2489145022499408\n2683,1999-09-01,unemploy,5915.0,0.25499328965027235\n2684,1999-10-01,unemploy,5778.0,0.24417778479513697\n2685,1999-11-01,unemploy,5716.0,0.23928317675850636\n2686,1999-12-01,unemploy,5653.0,0.23430962343096234\n2687,2000-01-01,unemploy,5708.0,0.23865161443119917\n2688,2000-02-01,unemploy,5858.0,0.25049340806820874\n2689,2000-03-01,unemploy,5733.0,0.2406252467040341\n2690,2000-04-01,unemploy,5481.0,0.22073103339385805\n2691,2000-05-01,unemploy,5758.0,0.24259887897686902\n2692,2000-06-01,unemploy,5651.0,0.23415173284913554\n2693,2000-07-01,unemploy,5747.0,0.24173048077682166\n2694,2000-08-01,unemploy,5853.0,0.25009868161364174\n2695,2000-09-01,unemploy,5625.0,0.23209915528538722\n2696,2000-10-01,unemploy,5534.0,0.2249151338122681\n2697,2000-11-01,unemploy,5639.0,0.23320438935817478\n2698,2000-12-01,unemploy,5634.0,0.2328096629036078\n2699,2001-01-01,unemploy,6023.0,0.26351938106891926\n2700,2001-02-01,unemploy,6089.0,0.2687297702692034\n2701,2001-03-01,unemploy,6141.0,0.27283492539670007\n2702,2001-04-01,unemploy,6271.0,0.2830978132154417\n2703,2001-05-01,unemploy,6226.0,0.27954527512433885\n2704,2001-06-01,unemploy,6484.0,0.29991316017999525\n2705,2001-07-01,unemploy,6583.0,0.30772874398042155\n2706,2001-08-01,unemploy,7042.0,0.3439646325096708\n2707,2001-09-01,unemploy,7142.0,0.3518591616010105\n2708,2001-10-01,unemploy,7694.0,0.39543696218520563\n2709,2001-11-01,unemploy,8003.0,0.41983105707744534\n2710,2001-12-01,unemploy,8258.0,0.4399621062603616\n2711,2002-01-01,unemploy,8182.0,0.4339622641509434\n2712,2002-02-01,unemploy,8215.0,0.4365674587510855\n2713,2002-03-01,unemploy,8304.0,0.44359358964237783\n2714,2002-04-01,unemploy,8599.0,0.46688245046182997\n2715,2002-05-01,unemploy,8399.0,0.4510933922791506\n2716,2002-06-01,unemploy,8393.0,0.45061972053367016\n2717,2002-07-01,unemploy,8390.0,0.45038288466092996\n2718,2002-08-01,unemploy,8304.0,0.44359358964237783\n2719,2002-09-01,unemploy,8251.0,0.4394094892239678\n2720,2002-10-01,unemploy,8307.0,0.44383042551511803\n2721,2002-11-01,unemploy,8520.0,0.4606457724796716\n2722,2002-12-01,unemploy,8640.0,0.4701192073892792\n2723,2003-01-01,unemploy,8520.0,0.4606457724796716\n2724,2003-02-01,unemploy,8618.0,0.4683824109891845\n2725,2003-03-01,unemploy,8588.0,0.4660140522617826\n2726,2003-04-01,unemploy,8842.0,0.4860661561537854\n2727,2003-05-01,unemploy,8957.0,0.49514486460882606\n2728,2003-06-01,unemploy,9266.0,0.5195389595010658\n2729,2003-07-01,unemploy,9011.0,0.4994079103181495\n2730,2003-08-01,unemploy,8896.0,0.49032920186310885\n2731,2003-09-01,unemploy,8921.0,0.4923028341359438\n2732,2003-10-01,unemploy,8732.0,0.47738217415331174\n2733,2003-11-01,unemploy,8576.0,0.46506670877082185\n2734,2003-12-01,unemploy,8317.0,0.444619878424252\n2735,2004-01-01,unemploy,8370.0,0.44880397884266204\n2736,2004-02-01,unemploy,8167.0,0.43277808478724245\n2737,2004-03-01,unemploy,8491.0,0.45835635904318306\n2738,2004-04-01,unemploy,8170.0,0.43301492065998265\n2739,2004-05-01,unemploy,8212.0,0.4363306228783453\n2740,2004-06-01,unemploy,8286.0,0.4421725744059367\n2741,2004-07-01,unemploy,8136.0,0.4303307807689271\n2742,2004-08-01,unemploy,7990.0,0.4188047682955712\n2743,2004-09-01,unemploy,7927.0,0.41383121496802716\n2744,2004-10-01,unemploy,8061.0,0.42440988395042234\n2745,2004-11-01,unemploy,7932.0,0.41422594142259417\n2746,2004-12-01,unemploy,7934.0,0.4143838320044209\n2747,2005-01-01,unemploy,7784.0,0.40254203836741137\n2748,2005-02-01,unemploy,7980.0,0.4180153153864372\n2749,2005-03-01,unemploy,7737.0,0.3988316096944817\n2750,2005-04-01,unemploy,7672.0,0.3937001657851109\n2751,2005-05-01,unemploy,7651.0,0.3920423146759296\n2752,2005-06-01,unemploy,7524.0,0.38201626272992817\n2753,2005-07-01,unemploy,7406.0,0.3727007184021473\n2754,2005-08-01,unemploy,7345.0,0.3678850556564301\n2755,2005-09-01,unemploy,7553.0,0.3843056761664167\n2756,2005-10-01,unemploy,7453.0,0.37641114707507695\n2757,2005-11-01,unemploy,7566.0,0.38533196494829086\n2758,2005-12-01,unemploy,7279.0,0.3626746664561459\n2759,2006-01-01,unemploy,7064.0,0.3457014289097655\n2760,2006-02-01,unemploy,7184.0,0.3551748638193732\n2761,2006-03-01,unemploy,7072.0,0.34633299123707273\n2762,2006-04-01,unemploy,7120.0,0.3501223652009158\n2763,2006-05-01,unemploy,6980.0,0.3390700244730402\n2764,2006-06-01,unemploy,7001.0,0.3407278755822215\n2765,2006-07-01,unemploy,7175.0,0.3544643562011526\n2766,2006-08-01,unemploy,7091.0,0.34783295176442725\n2767,2006-09-01,unemploy,6847.0,0.32857030078155836\n2768,2006-10-01,unemploy,6727.0,0.31909686587195074\n2769,2006-11-01,unemploy,6872.0,0.3305439330543933\n2770,2006-12-01,unemploy,6762.0,0.3218599510539196\n2771,2007-01-01,unemploy,7116.0,0.34980658403726217\n2772,2007-02-01,unemploy,6927.0,0.33488592405463014\n2773,2007-03-01,unemploy,6731.0,0.31941264703560435\n2774,2007-04-01,unemploy,6850.0,0.32880713665429856\n2775,2007-05-01,unemploy,6766.0,0.32217573221757323\n2776,2007-06-01,unemploy,6979.0,0.3389910791821268\n2777,2007-07-01,unemploy,7149.0,0.3524117786374043\n2778,2007-08-01,unemploy,7067.0,0.3459382647825057\n2779,2007-09-01,unemploy,7170.0,0.3540696297465856\n2780,2007-10-01,unemploy,7237.0,0.35935896423778324\n2781,2007-11-01,unemploy,7240.0,0.3595958001105234\n2782,2007-12-01,unemploy,7645.0,0.3915686429304492\n2783,2008-01-01,unemploy,7685.0,0.3947264545669851\n2784,2008-02-01,unemploy,7497.0,0.37988473987526644\n2785,2008-03-01,unemploy,7822.0,0.40554195942212046\n2786,2008-04-01,unemploy,7637.0,0.39093708060314203\n2787,2008-05-01,unemploy,8395.0,0.45077761111549697\n2788,2008-06-01,unemploy,8575.0,0.46498776347990844\n2789,2008-07-01,unemploy,8937.0,0.49356595879055815\n2790,2008-08-01,unemploy,9438.0,0.53311754953817\n2791,2008-09-01,unemploy,9494.0,0.5375384858293203\n2792,2008-10-01,unemploy,10074.0,0.5833267545590906\n2793,2008-11-01,unemploy,10538.0,0.6199573695429068\n2794,2008-12-01,unemploy,11286.0,0.6790084471461277\n2795,2009-01-01,unemploy,12058.0,0.7399542117312702\n2796,2009-02-01,unemploy,12898.0,0.8062682560985237\n2797,2009-03-01,unemploy,13426.0,0.8479513697007973\n2798,2009-04-01,unemploy,13853.0,0.8816610089208179\n2799,2009-05-01,unemploy,14499.0,0.9326596668508723\n2800,2009-06-01,unemploy,14707.0,0.9490802873608589\n2801,2009-07-01,unemploy,14601.0,0.9407120865240388\n2802,2009-08-01,unemploy,14814.0,0.9575274334885924\n2803,2009-09-01,unemploy,15009.0,0.9729217652167048\n2804,2009-10-01,unemploy,15352.0,1.0\n2805,2009-11-01,unemploy,15219.0,0.9895002763085182\n2806,2009-12-01,unemploy,15098.0,0.9799478961079972\n2807,2010-01-01,unemploy,15046.0,0.9758427409805005\n2808,2010-02-01,unemploy,15113.0,0.9811320754716981\n2809,2010-03-01,unemploy,15202.0,0.9881582063629905\n2810,2010-04-01,unemploy,15325.0,0.9978684771453383\n2811,2010-05-01,unemploy,14849.0,0.9602905186705613\n2812,2010-06-01,unemploy,14474.0,0.9306860345780374\n2813,2010-07-01,unemploy,14512.0,0.9336859556327465\n2814,2010-08-01,unemploy,14648.0,0.9444225151969685\n2815,2010-09-01,unemploy,14579.0,0.9389752901239441\n2816,2010-10-01,unemploy,14516.0,0.9340017367964001\n2817,2010-11-01,unemploy,15081.0,0.9786058261624694\n2818,2010-12-01,unemploy,14348.0,0.9207389279229494\n2819,2011-01-01,unemploy,14013.0,0.8942922554669614\n2820,2011-02-01,unemploy,13820.0,0.8790558143206758\n2821,2011-03-01,unemploy,13737.0,0.8725033551748638\n2822,2011-04-01,unemploy,13957.0,0.8898713191758112\n2823,2011-05-01,unemploy,13855.0,0.8818188995026447\n2824,2011-06-01,unemploy,13962.0,0.8902660456303781\n2825,2011-07-01,unemploy,13763.0,0.8745559327386121\n2826,2011-08-01,unemploy,13818.0,0.878897923738849\n2827,2011-09-01,unemploy,13948.0,0.8891608115575906\n2828,2011-10-01,unemploy,13594.0,0.8612141785742481\n2829,2011-11-01,unemploy,13302.0,0.8381621536275361\n2830,2011-12-01,unemploy,13093.0,0.8216625878266361\n2831,2012-01-01,unemploy,12797.0,0.7982947817162707\n2832,2012-02-01,unemploy,12813.0,0.799557906370885\n2833,2012-03-01,unemploy,12713.0,0.7916633772795453\n2834,2012-04-01,unemploy,12646.0,0.7863740427883477\n2835,2012-05-01,unemploy,12660.0,0.7874792768611353\n2836,2012-06-01,unemploy,12692.0,0.7900055261703639\n2837,2012-07-01,unemploy,12656.0,0.7871634956974817\n2838,2012-08-01,unemploy,12471.0,0.7725586168785032\n2839,2012-09-01,unemploy,12115.0,0.7444540933133339\n2840,2012-10-01,unemploy,12124.0,0.7451646009315545\n2841,2012-11-01,unemploy,12005.0,0.7357701113128602\n2842,2012-12-01,unemploy,12298.0,0.7589010815504855\n2843,2013-01-01,unemploy,12471.0,0.7725586168785032\n2844,2013-02-01,unemploy,11950.0,0.7314281203126234\n2845,2013-03-01,unemploy,11689.0,0.7108233993842268\n2846,2013-04-01,unemploy,11760.0,0.7164285150390779\n2847,2013-05-01,unemploy,11654.0,0.7080603142022578\n2848,2013-06-01,unemploy,11751.0,0.7157180074208573\n2849,2013-07-01,unemploy,11335.0,0.6828767664008842\n2850,2013-08-01,unemploy,11279.0,0.678455830109734\n2851,2013-09-01,unemploy,11270.0,0.6777453224915134\n2852,2013-10-01,unemploy,11136.0,0.6671666535091182\n2853,2013-11-01,unemploy,10787.0,0.6396147469803426\n2854,2013-12-01,unemploy,10404.0,0.6093787005605116\n2855,2014-01-01,unemploy,10202.0,0.5934317517960054\n2856,2014-02-01,unemploy,10349.0,0.6050367095602748\n2857,2014-03-01,unemploy,10380.0,0.60748401357859\n2858,2014-04-01,unemploy,9702.0,0.5539591063393069\n2859,2014-05-01,unemploy,9859.0,0.5663535170127102\n2860,2014-06-01,unemploy,9460.0,0.5348543459382648\n2861,2014-07-01,unemploy,9608.0,0.5465382489934475\n2862,2014-08-01,unemploy,9599.0,0.5458277413752269\n2863,2014-09-01,unemploy,9262.0,0.5192231783374122\n2864,2014-10-01,unemploy,8990.0,0.4977500592089682\n2865,2014-11-01,unemploy,9090.0,0.5056445883003079\n2866,2014-12-01,unemploy,8717.0,0.4761979947896108\n2867,2015-01-01,unemploy,8903.0,0.49088181889950266\n2868,2015-02-01,unemploy,8610.0,0.4677508486618773\n2869,2015-03-01,unemploy,8504.0,0.4593826478250572\n2870,2015-04-01,unemploy,8526.0,0.46111944422515194\n",
    :format {:type "csv"}}}
  {:mark {:type "circle", :color "green", :size 200, :tooltip true},
   :encoding
   {:x {:field :date, :type :temporal},
    :y {:field :value, :type :quantitative}},
   :data
   {:values
    "rownames,date,variable,value,value01\n2445,1979-11-01,unemploy,6238.0,0.2804926186152996\n2574,1990-08-01,unemploy,7188.0,0.35549064498302674\n2312,1968-10-01,unemploy,2689.0,3.157811636535881E-4\n2619,1994-05-01,unemploy,7915.0,0.4128838714770664\n2455,1980-09-01,unemploy,8021.0,0.42125207231388645\n",
    :format {:type "csv"}}}],
 :height 300,
 :data
 {:values
  "rownames,date,variable,value,value01\n2297,1967-07-01,unemploy,2944.0,0.020446830346569828\n2298,1967-08-01,unemploy,2945.0,0.020525775637483226\n2299,1967-09-01,unemploy,2958.0,0.021552064419357385\n2300,1967-10-01,unemploy,3143.0,0.036156943238335834\n2301,1967-11-01,unemploy,3066.0,0.030078155838004262\n2302,1967-12-01,unemploy,3018.0,0.026288781874161206\n2303,1968-01-01,unemploy,2878.0,0.015236441146285624\n2304,1968-02-01,unemploy,3001.0,0.024946711928633458\n2305,1968-03-01,unemploy,2877.0,0.015157495855372228\n2306,1968-04-01,unemploy,2709.0,0.0018946869819215285\n2307,1968-05-01,unemploy,2740.0,0.004341991000236836\n2308,1968-06-01,unemploy,2938.0,0.019973158601089443\n2309,1968-07-01,unemploy,2883.0,0.01563116760085261\n2310,1968-08-01,unemploy,2768.0,0.006552459145811952\n2311,1968-09-01,unemploy,2686.0,7.894529091339702E-5\n2312,1968-10-01,unemploy,2689.0,3.157811636535881E-4\n2313,1968-11-01,unemploy,2715.0,0.0023683587274019105\n2314,1968-12-01,unemploy,2685.0,0.0\n2315,1969-01-01,unemploy,2718.0,0.0026051946001421017\n2316,1969-02-01,unemploy,2692.0,5.526170363937791E-4\n2317,1969-03-01,unemploy,2712.0,0.0021315228546617193\n2318,1969-04-01,unemploy,2758.0,0.005763006236677982\n2319,1969-05-01,unemploy,2713.0,0.0022104681455751164\n2320,1969-06-01,unemploy,2816.0,0.010341833109655009\n2321,1969-07-01,unemploy,2868.0,0.014446988237151653\n2322,1969-08-01,unemploy,2856.0,0.01349964474619089\n2323,1969-09-01,unemploy,3040.0,0.02802557827425594\n2324,1969-10-01,unemploy,3049.0,0.028736085892476514\n2325,1969-11-01,unemploy,2856.0,0.01349964474619089\n2326,1969-12-01,unemploy,2884.0,0.015710112891766007\n2327,1970-01-01,unemploy,3201.0,0.04073577011131286\n2328,1970-02-01,unemploy,3453.0,0.06062998342148891\n2329,1970-03-01,unemploy,3635.0,0.07499802636772716\n2330,1970-04-01,unemploy,3797.0,0.08778716349569748\n2331,1970-05-01,unemploy,3919.0,0.09741848898713192\n2332,1970-06-01,unemploy,4071.0,0.10941817320596826\n2333,1970-07-01,unemploy,4175.0,0.11762848346096155\n2334,1970-08-01,unemploy,4256.0,0.1240230520249467\n2335,1970-09-01,unemploy,4456.0,0.13981211020762613\n2336,1970-10-01,unemploy,4591.0,0.1504697244809347\n2337,1970-11-01,unemploy,4898.0,0.1747059287913476\n2338,1970-12-01,unemploy,5076.0,0.18875819057393226\n2339,1971-01-01,unemploy,4986.0,0.18165311439172654\n2340,1971-02-01,unemploy,4903.0,0.1751006552459146\n2341,1971-03-01,unemploy,4987.0,0.18173205968263992\n2342,1971-04-01,unemploy,4959.0,0.17952159153706482\n2343,1971-05-01,unemploy,4996.0,0.1824425673008605\n2344,1971-06-01,unemploy,4949.0,0.17873213862793083\n2345,1971-07-01,unemploy,5035.0,0.185521433646483\n2346,1971-08-01,unemploy,5134.0,0.1933370174469093\n2347,1971-09-01,unemploy,5042.0,0.18607405068287677\n2348,1971-10-01,unemploy,4954.0,0.17912686508249784\n2349,1971-11-01,unemploy,5161.0,0.19546854030157101\n2350,1971-12-01,unemploy,5154.0,0.19491592326517723\n2351,1972-01-01,unemploy,5019.0,0.18425830899186862\n2352,1972-02-01,unemploy,4928.0,0.1770742875187495\n2353,1972-03-01,unemploy,5038.0,0.18575826951922317\n2354,1972-04-01,unemploy,4959.0,0.17952159153706482\n2355,1972-05-01,unemploy,4922.0,0.17660061577326913\n2356,1972-06-01,unemploy,4923.0,0.17667956106418253\n2357,1972-07-01,unemploy,4913.0,0.17589010815504855\n2358,1972-08-01,unemploy,4939.0,0.17794268571879687\n2359,1972-09-01,unemploy,4849.0,0.17083760953659113\n2360,1972-10-01,unemploy,4875.0,0.17289018710033946\n2361,1972-11-01,unemploy,4602.0,0.15133812268098207\n2362,1972-12-01,unemploy,4543.0,0.14668035051709166\n2363,1973-01-01,unemploy,4326.0,0.1295492223888845\n2364,1973-02-01,unemploy,4452.0,0.13949632904397252\n2365,1973-03-01,unemploy,4394.0,0.1349175021709955\n2366,1973-04-01,unemploy,4459.0,0.1400489460803663\n2367,1973-05-01,unemploy,4329.0,0.1297860582616247\n2368,1973-06-01,unemploy,4363.0,0.13247019815268019\n2369,1973-07-01,unemploy,4305.0,0.12789137127970315\n2370,1973-08-01,unemploy,4305.0,0.12789137127970315\n2371,1973-09-01,unemploy,4350.0,0.13144390937080602\n2372,1973-10-01,unemploy,4144.0,0.11518117944264625\n2373,1973-11-01,unemploy,4396.0,0.1350753927528223\n2374,1973-12-01,unemploy,4489.0,0.1424173048077682\n2375,1974-01-01,unemploy,4644.0,0.15465382489934476\n2376,1974-02-01,unemploy,4731.0,0.1615220652088103\n2377,1974-03-01,unemploy,4634.0,0.15386437199021077\n2378,1974-04-01,unemploy,4618.0,0.15260124733559643\n2379,1974-05-01,unemploy,4705.0,0.15946948764506197\n2380,1974-06-01,unemploy,4927.0,0.1769953422278361\n2381,1974-07-01,unemploy,5063.0,0.1877319017920581\n2382,1974-08-01,unemploy,5022.0,0.18449514486460883\n2383,1974-09-01,unemploy,5437.0,0.21725744059366858\n2384,1974-10-01,unemploy,5523.0,0.22404673561222074\n2385,1974-11-01,unemploy,6140.0,0.27275598010578667\n2386,1974-12-01,unemploy,6636.0,0.3119128443988316\n2387,1975-01-01,unemploy,7501.0,0.38020052103892005\n2388,1975-02-01,unemploy,7520.0,0.38170048156627456\n2389,1975-03-01,unemploy,7978.0,0.4178574248046104\n2390,1975-04-01,unemploy,8210.0,0.43617273229651854\n2391,1975-05-01,unemploy,8433.0,0.45377753217020605\n2392,1975-06-01,unemploy,8220.0,0.4369621852056525\n2393,1975-07-01,unemploy,8127.0,0.42962027315070656\n2394,1975-08-01,unemploy,7928.0,0.41391016025894056\n2395,1975-09-01,unemploy,7923.0,0.41351543380437356\n2396,1975-10-01,unemploy,7897.0,0.41146285624062523\n2397,1975-11-01,unemploy,7794.0,0.40333149127654533\n2398,1975-12-01,unemploy,7744.0,0.3993842267308755\n2399,1976-01-01,unemploy,7534.0,0.3828057156390621\n2400,1976-02-01,unemploy,7326.0,0.3663850951290756\n2401,1976-03-01,unemploy,7230.0,0.35880634720138943\n2402,1976-04-01,unemploy,7330.0,0.3667008762927291\n2403,1976-05-01,unemploy,7053.0,0.34483303070971816\n2404,1976-06-01,unemploy,7322.0,0.36606931396542197\n2405,1976-07-01,unemploy,7490.0,0.3793321228388727\n2406,1976-08-01,unemploy,7518.0,0.38154259098444776\n2407,1976-09-01,unemploy,7380.0,0.370648140838399\n2408,1976-10-01,unemploy,7430.0,0.3745954053840688\n2409,1976-11-01,unemploy,7620.0,0.38959501065761426\n2410,1976-12-01,unemploy,7545.0,0.3836741138391095\n2411,1977-01-01,unemploy,7280.0,0.3627536117470593\n2412,1977-02-01,unemploy,7443.0,0.375621694165943\n2413,1977-03-01,unemploy,7307.0,0.364885134601721\n2414,1977-04-01,unemploy,7059.0,0.34530670245519857\n2415,1977-05-01,unemploy,6911.0,0.33362279940001577\n2416,1977-06-01,unemploy,7134.0,0.35122759927370334\n2417,1977-07-01,unemploy,6829.0,0.32714928554511724\n2418,1977-08-01,unemploy,6925.0,0.33472803347280333\n2419,1977-09-01,unemploy,6751.0,0.32099155285387226\n2420,1977-10-01,unemploy,6763.0,0.321938896344833\n2421,1977-11-01,unemploy,6815.0,0.3260440514723297\n2422,1977-12-01,unemploy,6386.0,0.29217652167048236\n2423,1978-01-01,unemploy,6489.0,0.30030788663456226\n2424,1978-02-01,unemploy,6318.0,0.28680824188837134\n2425,1978-03-01,unemploy,6337.0,0.2883082024157259\n2426,1978-04-01,unemploy,6180.0,0.27591379174232256\n2427,1978-05-01,unemploy,6127.0,0.2717296913239125\n2428,1978-06-01,unemploy,6028.0,0.2639141075234862\n2429,1978-07-01,unemploy,6309.0,0.2860977342701508\n2430,1978-08-01,unemploy,6080.0,0.26801926265098286\n2431,1978-09-01,unemploy,6125.0,0.27157180074208576\n2432,1978-10-01,unemploy,5947.0,0.2575195389595011\n2433,1978-11-01,unemploy,6077.0,0.26778242677824265\n2434,1978-12-01,unemploy,6228.0,0.2797031657061656\n2435,1979-01-01,unemploy,6109.0,0.2703086760874714\n2436,1979-02-01,unemploy,6173.0,0.2753611747059288\n2437,1979-03-01,unemploy,6109.0,0.2703086760874714\n2438,1979-04-01,unemploy,6069.0,0.2671508644509355\n2439,1979-05-01,unemploy,5840.0,0.24907239283176758\n2440,1979-06-01,unemploy,5959.0,0.25846688245046184\n2441,1979-07-01,unemploy,5996.0,0.26138785821425753\n2442,1979-08-01,unemploy,6320.0,0.28696613247019814\n2443,1979-09-01,unemploy,6190.0,0.2767032446514565\n2444,1979-10-01,unemploy,6296.0,0.2850714454882766\n2445,1979-11-01,unemploy,6238.0,0.2804926186152996\n2446,1979-12-01,unemploy,6325.0,0.28736085892476515\n2447,1980-01-01,unemploy,6683.0,0.31562327307176125\n2448,1980-02-01,unemploy,6702.0,0.3171232335991158\n2449,1980-03-01,unemploy,6729.0,0.31925475645377754\n2450,1980-04-01,unemploy,7358.0,0.36891134443830426\n2451,1980-05-01,unemploy,7984.0,0.41833109655009076\n2452,1980-06-01,unemploy,8098.0,0.427330859714218\n2453,1980-07-01,unemploy,8363.0,0.44825136180626823\n2454,1980-08-01,unemploy,8281.0,0.4417778479513697\n2455,1980-09-01,unemploy,8021.0,0.42125207231388645\n2456,1980-10-01,unemploy,8088.0,0.42654140680508407\n2457,1980-11-01,unemploy,8023.0,0.42140996289571325\n2458,1980-12-01,unemploy,7718.0,0.39733164916712715\n2459,1981-01-01,unemploy,8071.0,0.42519933685955635\n2460,1981-02-01,unemploy,8051.0,0.4236204310412884\n2461,1981-03-01,unemploy,7982.0,0.418173205968264\n2462,1981-04-01,unemploy,7869.0,0.40925238809505016\n2463,1981-05-01,unemploy,8174.0,0.4333307018236362\n2464,1981-06-01,unemploy,8098.0,0.427330859714218\n2465,1981-07-01,unemploy,7863.0,0.40877871634956975\n2466,1981-08-01,unemploy,8036.0,0.4224362516775874\n2467,1981-09-01,unemploy,8230.0,0.43775163811478646\n2468,1981-10-01,unemploy,8646.0,0.4705928791347596\n2469,1981-11-01,unemploy,9029.0,0.5008289255545907\n2470,1981-12-01,unemploy,9267.0,0.5196179047919791\n2471,1982-01-01,unemploy,9397.0,0.5298807926107207\n2472,1982-02-01,unemploy,9705.0,0.554195942212047\n2473,1982-03-01,unemploy,9895.0,0.5691955474855925\n2474,1982-04-01,unemploy,10244.0,0.596747454014368\n2475,1982-05-01,unemploy,10335.0,0.6039314754874872\n2476,1982-06-01,unemploy,10538.0,0.6199573695429068\n2477,1982-07-01,unemploy,10849.0,0.6445093550169733\n2478,1982-08-01,unemploy,10881.0,0.647035604326202\n2479,1982-09-01,unemploy,11217.0,0.6735612220731033\n2480,1982-10-01,unemploy,11529.0,0.6981921528380832\n2481,1982-11-01,unemploy,11938.0,0.7304807768216626\n2482,1982-12-01,unemploy,12051.0,0.7394015946948764\n2483,1983-01-01,unemploy,11534.0,0.6985868792926502\n2484,1983-02-01,unemploy,11545.0,0.6994552774926975\n2485,1983-03-01,unemploy,11408.0,0.6886397726375622\n2486,1983-04-01,unemploy,11268.0,0.6775874319096866\n2487,1983-05-01,unemploy,11154.0,0.6685876687455593\n2488,1983-06-01,unemploy,11246.0,0.6758506355095919\n2489,1983-07-01,unemploy,10548.0,0.6207468224520407\n2490,1983-08-01,unemploy,10623.0,0.6266677192705455\n2491,1983-09-01,unemploy,10282.0,0.5997473750690772\n2492,1983-10-01,unemploy,9887.0,0.5685639851582853\n2493,1983-11-01,unemploy,9499.0,0.5379332122838872\n2494,1983-12-01,unemploy,9331.0,0.5246704034104366\n2495,1984-01-01,unemploy,9008.0,0.4991710744454093\n2496,1984-02-01,unemploy,8791.0,0.4820399463172022\n2497,1984-03-01,unemploy,8746.0,0.4784874082260993\n2498,1984-04-01,unemploy,8762.0,0.4797505328807137\n2499,1984-05-01,unemploy,8456.0,0.4555932738612142\n2500,1984-06-01,unemploy,8226.0,0.43743585695113285\n2501,1984-07-01,unemploy,8537.0,0.46198784242519936\n2502,1984-08-01,unemploy,8519.0,0.4605668271887582\n2503,1984-09-01,unemploy,8367.0,0.44856714296992184\n2504,1984-10-01,unemploy,8381.0,0.4496723770427094\n2505,1984-11-01,unemploy,8198.0,0.4352253888055577\n2506,1984-12-01,unemploy,8358.0,0.4478566353517013\n2507,1985-01-01,unemploy,8423.0,0.4529880792610721\n2508,1985-02-01,unemploy,8321.0,0.4449356595879056\n2509,1985-03-01,unemploy,8339.0,0.4463566748243467\n2510,1985-04-01,unemploy,8395.0,0.45077761111549697\n2511,1985-05-01,unemploy,8302.0,0.443435699060551\n2512,1985-06-01,unemploy,8460.0,0.4559090550248678\n2513,1985-07-01,unemploy,8513.0,0.46009315544327783\n2514,1985-08-01,unemploy,8196.0,0.435067498223731\n2515,1985-09-01,unemploy,8248.0,0.4391726533512276\n2516,1985-10-01,unemploy,8298.0,0.4431199178968975\n2517,1985-11-01,unemploy,8128.0,0.42969921844161996\n2518,1985-12-01,unemploy,8138.0,0.4304886713507539\n2519,1986-01-01,unemploy,7795.0,0.40341043656745873\n2520,1986-02-01,unemploy,8402.0,0.4513302281518907\n2521,1986-03-01,unemploy,8383.0,0.4498302676245362\n2522,1986-04-01,unemploy,8364.0,0.44833030709718164\n2523,1986-05-01,unemploy,8439.0,0.4542512039156864\n2524,1986-06-01,unemploy,8508.0,0.4596984289887108\n2525,1986-07-01,unemploy,8319.0,0.4447777690060788\n2526,1986-08-01,unemploy,8135.0,0.4302518354780137\n2527,1986-09-01,unemploy,8310.0,0.44406726138785824\n2528,1986-10-01,unemploy,8243.0,0.4387779268966606\n2529,1986-11-01,unemploy,8159.0,0.4321465224599353\n2530,1986-12-01,unemploy,7883.0,0.41035762216783767\n2531,1987-01-01,unemploy,7892.0,0.4110681297860583\n2532,1987-02-01,unemploy,7865.0,0.40893660693139655\n2533,1987-03-01,unemploy,7862.0,0.40869977105865635\n2534,1987-04-01,unemploy,7542.0,0.3834372779663693\n2535,1987-05-01,unemploy,7574.0,0.385963527275598\n2536,1987-06-01,unemploy,7398.0,0.37206915607484015\n2537,1987-07-01,unemploy,7268.0,0.3618062682560985\n2538,1987-08-01,unemploy,7261.0,0.36125365121970476\n2539,1987-09-01,unemploy,7102.0,0.3487013499644746\n2540,1987-10-01,unemploy,7227.0,0.3585695113286492\n2541,1987-11-01,unemploy,7035.0,0.34341201547327704\n2542,1987-12-01,unemploy,6936.0,0.3355964316728507\n2543,1988-01-01,unemploy,6953.0,0.33693850161837846\n2544,1988-02-01,unemploy,6929.0,0.33504381463645694\n2545,1988-03-01,unemploy,6876.0,0.3308597142180469\n2546,1988-04-01,unemploy,6601.0,0.3091497592168627\n2547,1988-05-01,unemploy,6779.0,0.3232020209994474\n2548,1988-06-01,unemploy,6546.0,0.30480776821662586\n2549,1988-07-01,unemploy,6605.0,0.3094655403805163\n2550,1988-08-01,unemploy,6843.0,0.3282545196179048\n2551,1988-09-01,unemploy,6604.0,0.3093865950896029\n2552,1988-10-01,unemploy,6568.0,0.30654456461672064\n2553,1988-11-01,unemploy,6537.0,0.3040972605984053\n2554,1988-12-01,unemploy,6518.0,0.30259730007105073\n2555,1989-01-01,unemploy,6682.0,0.3155443277808479\n2556,1989-02-01,unemploy,6359.0,0.29004499881582063\n2557,1989-03-01,unemploy,6205.0,0.2778874240151575\n2558,1989-04-01,unemploy,6468.0,0.2986500355253809\n2559,1989-05-01,unemploy,6375.0,0.291308123470435\n2560,1989-06-01,unemploy,6577.0,0.3072550722349412\n2561,1989-07-01,unemploy,6495.0,0.3007815583800426\n2562,1989-08-01,unemploy,6511.0,0.302044683034657\n2563,1989-09-01,unemploy,6590.0,0.30828136101681536\n2564,1989-10-01,unemploy,6630.0,0.31143917265335125\n2565,1989-11-01,unemploy,6725.0,0.31893897529012394\n2566,1989-12-01,unemploy,6667.0,0.31436014841714693\n2567,1990-01-01,unemploy,6752.0,0.32107049814478567\n2568,1990-02-01,unemploy,6651.0,0.31309702376253257\n2569,1990-03-01,unemploy,6598.0,0.3089129233441225\n2570,1990-04-01,unemploy,6797.0,0.3246230362358885\n2571,1990-05-01,unemploy,6742.0,0.3202810452356517\n2572,1990-06-01,unemploy,6590.0,0.30828136101681536\n2573,1990-07-01,unemploy,6922.0,0.3344911976000632\n2574,1990-08-01,unemploy,7188.0,0.35549064498302674\n2575,1990-09-01,unemploy,7368.0,0.3697007973474382\n2576,1990-10-01,unemploy,7459.0,0.37688481882055735\n2577,1990-11-01,unemploy,7764.0,0.40096313254914345\n2578,1990-12-01,unemploy,7901.0,0.41177863740427884\n2579,1991-01-01,unemploy,8015.0,0.4207784005684061\n2580,1991-02-01,unemploy,8265.0,0.44051472329675534\n2581,1991-03-01,unemploy,8586.0,0.4658561616799558\n2582,1991-04-01,unemploy,8439.0,0.4542512039156864\n2583,1991-05-01,unemploy,8736.0,0.47769795531696535\n2584,1991-06-01,unemploy,8692.0,0.47422436251677585\n2585,1991-07-01,unemploy,8586.0,0.4658561616799558\n2586,1991-08-01,unemploy,8666.0,0.47217178495302753\n2587,1991-09-01,unemploy,8722.0,0.4765927212441778\n2588,1991-10-01,unemploy,8842.0,0.4860661561537854\n2589,1991-11-01,unemploy,8931.0,0.49309228704507774\n2590,1991-12-01,unemploy,9198.0,0.5141706797189548\n2591,1992-01-01,unemploy,9283.0,0.5208810294465935\n2592,1992-02-01,unemploy,9454.0,0.5343806741927845\n2593,1992-03-01,unemploy,9460.0,0.5348543459382648\n2594,1992-04-01,unemploy,9415.0,0.531301807847162\n2595,1992-05-01,unemploy,9744.0,0.5572748085576695\n2596,1992-06-01,unemploy,10040.0,0.580642614668035\n2597,1992-07-01,unemploy,9850.0,0.5656430093944896\n2598,1992-08-01,unemploy,9787.0,0.5606694560669456\n2599,1992-09-01,unemploy,9781.0,0.5601957843214652\n2600,1992-10-01,unemploy,9398.0,0.5299597379016342\n2601,1992-11-01,unemploy,9565.0,0.5431436014841715\n2602,1992-12-01,unemploy,9557.0,0.5425120391568643\n2603,1993-01-01,unemploy,9325.0,0.5241967316649562\n2604,1993-02-01,unemploy,9183.0,0.5129865003552538\n2605,1993-03-01,unemploy,9056.0,0.5029604484092524\n2606,1993-04-01,unemploy,9110.0,0.5072234941185758\n2607,1993-05-01,unemploy,9149.0,0.5103023604641983\n2608,1993-06-01,unemploy,9121.0,0.5080918923186232\n2609,1993-07-01,unemploy,8930.0,0.4930133417541644\n2610,1993-08-01,unemploy,8763.0,0.4798294781716271\n2611,1993-09-01,unemploy,8714.0,0.47596115891687063\n2612,1993-10-01,unemploy,8750.0,0.4788031893897529\n2613,1993-11-01,unemploy,8542.0,0.4623825688797663\n2614,1993-12-01,unemploy,8477.0,0.4572511249703955\n2615,1994-01-01,unemploy,8630.0,0.46932975448014524\n2616,1994-02-01,unemploy,8583.0,0.4656193258072156\n2617,1994-03-01,unemploy,8470.0,0.45669850793400174\n2618,1994-04-01,unemploy,8331.0,0.44572511249703956\n2619,1994-05-01,unemploy,7915.0,0.4128838714770664\n2620,1994-06-01,unemploy,7927.0,0.41383121496802716\n2621,1994-07-01,unemploy,7946.0,0.4153311754953817\n2622,1994-08-01,unemploy,7933.0,0.4143048867135075\n2623,1994-09-01,unemploy,7734.0,0.3985947738217415\n2624,1994-10-01,unemploy,7632.0,0.390542354148575\n2625,1994-11-01,unemploy,7375.0,0.370253414383832\n2626,1994-12-01,unemploy,7230.0,0.35880634720138943\n2627,1995-01-01,unemploy,7375.0,0.370253414383832\n2628,1995-02-01,unemploy,7187.0,0.3554116996921134\n2629,1995-03-01,unemploy,7153.0,0.35272755980105786\n2630,1995-04-01,unemploy,7645.0,0.3915686429304492\n2631,1995-05-01,unemploy,7430.0,0.3745954053840688\n2632,1995-06-01,unemploy,7427.0,0.3743585695113287\n2633,1995-07-01,unemploy,7527.0,0.3822530986026684\n2634,1995-08-01,unemploy,7484.0,0.3788584510933923\n2635,1995-09-01,unemploy,7478.0,0.37838477934791187\n2636,1995-10-01,unemploy,7328.0,0.3665429857109023\n2637,1995-11-01,unemploy,7426.0,0.3742796242204153\n2638,1995-12-01,unemploy,7423.0,0.37404278834767507\n2639,1996-01-01,unemploy,7491.0,0.37941106812978603\n2640,1996-02-01,unemploy,7313.0,0.3653588063472014\n2641,1996-03-01,unemploy,7318.0,0.36575353280176837\n2642,1996-04-01,unemploy,7415.0,0.37341122602036786\n2643,1996-05-01,unemploy,7423.0,0.37404278834767507\n2644,1996-06-01,unemploy,7095.0,0.34814873292808085\n2645,1996-07-01,unemploy,7337.0,0.36725349332912294\n2646,1996-08-01,unemploy,6882.0,0.3313333859635273\n2647,1996-09-01,unemploy,6979.0,0.3389910791821268\n2648,1996-10-01,unemploy,7031.0,0.34309623430962344\n2649,1996-11-01,unemploy,7236.0,0.35928001894686984\n2650,1996-12-01,unemploy,7253.0,0.36062208889239755\n2651,1997-01-01,unemploy,7158.0,0.35312228625562486\n2652,1997-02-01,unemploy,7102.0,0.3487013499644746\n2653,1997-03-01,unemploy,7000.0,0.3406489302913081\n2654,1997-04-01,unemploy,6873.0,0.3306228783453067\n2655,1997-05-01,unemploy,6655.0,0.3134128049261862\n2656,1997-06-01,unemploy,6799.0,0.3247809268177153\n2657,1997-07-01,unemploy,6655.0,0.3134128049261862\n2658,1997-08-01,unemploy,6608.0,0.3097023762532565\n2659,1997-09-01,unemploy,6656.0,0.3134917502170996\n2660,1997-10-01,unemploy,6454.0,0.2975448014525934\n2661,1997-11-01,unemploy,6308.0,0.2860187889792374\n2662,1997-12-01,unemploy,6476.0,0.2992815978526881\n2663,1998-01-01,unemploy,6368.0,0.2907555064340412\n2664,1998-02-01,unemploy,6306.0,0.2858608983974106\n2665,1998-03-01,unemploy,6422.0,0.29501855214336464\n2666,1998-04-01,unemploy,5941.0,0.2570458672140207\n2667,1998-05-01,unemploy,6047.0,0.2654140680508408\n2668,1998-06-01,unemploy,6212.0,0.2784400410515513\n2669,1998-07-01,unemploy,6259.0,0.28215046972448093\n2670,1998-08-01,unemploy,6179.0,0.27583484645140915\n2671,1998-09-01,unemploy,6300.0,0.2853872266519302\n2672,1998-10-01,unemploy,6280.0,0.28380832083366225\n2673,1998-11-01,unemploy,6100.0,0.26959816846925083\n2674,1998-12-01,unemploy,6032.0,0.2642298886871398\n2675,1999-01-01,unemploy,5976.0,0.25980895239598956\n2676,1999-02-01,unemploy,6111.0,0.2704665666692982\n2677,1999-03-01,unemploy,5783.0,0.24457251124970394\n2678,1999-04-01,unemploy,6004.0,0.2620194205415647\n2679,1999-05-01,unemploy,5796.0,0.2455988000315781\n2680,1999-06-01,unemploy,5951.0,0.25783532012315463\n2681,1999-07-01,unemploy,6025.0,0.26367727165074606\n2682,1999-08-01,unemploy,5838.0,0.2489145022499408\n2683,1999-09-01,unemploy,5915.0,0.25499328965027235\n2684,1999-10-01,unemploy,5778.0,0.24417778479513697\n2685,1999-11-01,unemploy,5716.0,0.23928317675850636\n2686,1999-12-01,unemploy,5653.0,0.23430962343096234\n2687,2000-01-01,unemploy,5708.0,0.23865161443119917\n2688,2000-02-01,unemploy,5858.0,0.25049340806820874\n2689,2000-03-01,unemploy,5733.0,0.2406252467040341\n2690,2000-04-01,unemploy,5481.0,0.22073103339385805\n2691,2000-05-01,unemploy,5758.0,0.24259887897686902\n2692,2000-06-01,unemploy,5651.0,0.23415173284913554\n2693,2000-07-01,unemploy,5747.0,0.24173048077682166\n2694,2000-08-01,unemploy,5853.0,0.25009868161364174\n2695,2000-09-01,unemploy,5625.0,0.23209915528538722\n2696,2000-10-01,unemploy,5534.0,0.2249151338122681\n2697,2000-11-01,unemploy,5639.0,0.23320438935817478\n2698,2000-12-01,unemploy,5634.0,0.2328096629036078\n2699,2001-01-01,unemploy,6023.0,0.26351938106891926\n2700,2001-02-01,unemploy,6089.0,0.2687297702692034\n2701,2001-03-01,unemploy,6141.0,0.27283492539670007\n2702,2001-04-01,unemploy,6271.0,0.2830978132154417\n2703,2001-05-01,unemploy,6226.0,0.27954527512433885\n2704,2001-06-01,unemploy,6484.0,0.29991316017999525\n2705,2001-07-01,unemploy,6583.0,0.30772874398042155\n2706,2001-08-01,unemploy,7042.0,0.3439646325096708\n2707,2001-09-01,unemploy,7142.0,0.3518591616010105\n2708,2001-10-01,unemploy,7694.0,0.39543696218520563\n2709,2001-11-01,unemploy,8003.0,0.41983105707744534\n2710,2001-12-01,unemploy,8258.0,0.4399621062603616\n2711,2002-01-01,unemploy,8182.0,0.4339622641509434\n2712,2002-02-01,unemploy,8215.0,0.4365674587510855\n2713,2002-03-01,unemploy,8304.0,0.44359358964237783\n2714,2002-04-01,unemploy,8599.0,0.46688245046182997\n2715,2002-05-01,unemploy,8399.0,0.4510933922791506\n2716,2002-06-01,unemploy,8393.0,0.45061972053367016\n2717,2002-07-01,unemploy,8390.0,0.45038288466092996\n2718,2002-08-01,unemploy,8304.0,0.44359358964237783\n2719,2002-09-01,unemploy,8251.0,0.4394094892239678\n2720,2002-10-01,unemploy,8307.0,0.44383042551511803\n2721,2002-11-01,unemploy,8520.0,0.4606457724796716\n2722,2002-12-01,unemploy,8640.0,0.4701192073892792\n2723,2003-01-01,unemploy,8520.0,0.4606457724796716\n2724,2003-02-01,unemploy,8618.0,0.4683824109891845\n2725,2003-03-01,unemploy,8588.0,0.4660140522617826\n2726,2003-04-01,unemploy,8842.0,0.4860661561537854\n2727,2003-05-01,unemploy,8957.0,0.49514486460882606\n2728,2003-06-01,unemploy,9266.0,0.5195389595010658\n2729,2003-07-01,unemploy,9011.0,0.4994079103181495\n2730,2003-08-01,unemploy,8896.0,0.49032920186310885\n2731,2003-09-01,unemploy,8921.0,0.4923028341359438\n2732,2003-10-01,unemploy,8732.0,0.47738217415331174\n2733,2003-11-01,unemploy,8576.0,0.46506670877082185\n2734,2003-12-01,unemploy,8317.0,0.444619878424252\n2735,2004-01-01,unemploy,8370.0,0.44880397884266204\n2736,2004-02-01,unemploy,8167.0,0.43277808478724245\n2737,2004-03-01,unemploy,8491.0,0.45835635904318306\n2738,2004-04-01,unemploy,8170.0,0.43301492065998265\n2739,2004-05-01,unemploy,8212.0,0.4363306228783453\n2740,2004-06-01,unemploy,8286.0,0.4421725744059367\n2741,2004-07-01,unemploy,8136.0,0.4303307807689271\n2742,2004-08-01,unemploy,7990.0,0.4188047682955712\n2743,2004-09-01,unemploy,7927.0,0.41383121496802716\n2744,2004-10-01,unemploy,8061.0,0.42440988395042234\n2745,2004-11-01,unemploy,7932.0,0.41422594142259417\n2746,2004-12-01,unemploy,7934.0,0.4143838320044209\n2747,2005-01-01,unemploy,7784.0,0.40254203836741137\n2748,2005-02-01,unemploy,7980.0,0.4180153153864372\n2749,2005-03-01,unemploy,7737.0,0.3988316096944817\n2750,2005-04-01,unemploy,7672.0,0.3937001657851109\n2751,2005-05-01,unemploy,7651.0,0.3920423146759296\n2752,2005-06-01,unemploy,7524.0,0.38201626272992817\n2753,2005-07-01,unemploy,7406.0,0.3727007184021473\n2754,2005-08-01,unemploy,7345.0,0.3678850556564301\n2755,2005-09-01,unemploy,7553.0,0.3843056761664167\n2756,2005-10-01,unemploy,7453.0,0.37641114707507695\n2757,2005-11-01,unemploy,7566.0,0.38533196494829086\n2758,2005-12-01,unemploy,7279.0,0.3626746664561459\n2759,2006-01-01,unemploy,7064.0,0.3457014289097655\n2760,2006-02-01,unemploy,7184.0,0.3551748638193732\n2761,2006-03-01,unemploy,7072.0,0.34633299123707273\n2762,2006-04-01,unemploy,7120.0,0.3501223652009158\n2763,2006-05-01,unemploy,6980.0,0.3390700244730402\n2764,2006-06-01,unemploy,7001.0,0.3407278755822215\n2765,2006-07-01,unemploy,7175.0,0.3544643562011526\n2766,2006-08-01,unemploy,7091.0,0.34783295176442725\n2767,2006-09-01,unemploy,6847.0,0.32857030078155836\n2768,2006-10-01,unemploy,6727.0,0.31909686587195074\n2769,2006-11-01,unemploy,6872.0,0.3305439330543933\n2770,2006-12-01,unemploy,6762.0,0.3218599510539196\n2771,2007-01-01,unemploy,7116.0,0.34980658403726217\n2772,2007-02-01,unemploy,6927.0,0.33488592405463014\n2773,2007-03-01,unemploy,6731.0,0.31941264703560435\n2774,2007-04-01,unemploy,6850.0,0.32880713665429856\n2775,2007-05-01,unemploy,6766.0,0.32217573221757323\n2776,2007-06-01,unemploy,6979.0,0.3389910791821268\n2777,2007-07-01,unemploy,7149.0,0.3524117786374043\n2778,2007-08-01,unemploy,7067.0,0.3459382647825057\n2779,2007-09-01,unemploy,7170.0,0.3540696297465856\n2780,2007-10-01,unemploy,7237.0,0.35935896423778324\n2781,2007-11-01,unemploy,7240.0,0.3595958001105234\n2782,2007-12-01,unemploy,7645.0,0.3915686429304492\n2783,2008-01-01,unemploy,7685.0,0.3947264545669851\n2784,2008-02-01,unemploy,7497.0,0.37988473987526644\n2785,2008-03-01,unemploy,7822.0,0.40554195942212046\n2786,2008-04-01,unemploy,7637.0,0.39093708060314203\n2787,2008-05-01,unemploy,8395.0,0.45077761111549697\n2788,2008-06-01,unemploy,8575.0,0.46498776347990844\n2789,2008-07-01,unemploy,8937.0,0.49356595879055815\n2790,2008-08-01,unemploy,9438.0,0.53311754953817\n2791,2008-09-01,unemploy,9494.0,0.5375384858293203\n2792,2008-10-01,unemploy,10074.0,0.5833267545590906\n2793,2008-11-01,unemploy,10538.0,0.6199573695429068\n2794,2008-12-01,unemploy,11286.0,0.6790084471461277\n2795,2009-01-01,unemploy,12058.0,0.7399542117312702\n2796,2009-02-01,unemploy,12898.0,0.8062682560985237\n2797,2009-03-01,unemploy,13426.0,0.8479513697007973\n2798,2009-04-01,unemploy,13853.0,0.8816610089208179\n2799,2009-05-01,unemploy,14499.0,0.9326596668508723\n2800,2009-06-01,unemploy,14707.0,0.9490802873608589\n2801,2009-07-01,unemploy,14601.0,0.9407120865240388\n2802,2009-08-01,unemploy,14814.0,0.9575274334885924\n2803,2009-09-01,unemploy,15009.0,0.9729217652167048\n2804,2009-10-01,unemploy,15352.0,1.0\n2805,2009-11-01,unemploy,15219.0,0.9895002763085182\n2806,2009-12-01,unemploy,15098.0,0.9799478961079972\n2807,2010-01-01,unemploy,15046.0,0.9758427409805005\n2808,2010-02-01,unemploy,15113.0,0.9811320754716981\n2809,2010-03-01,unemploy,15202.0,0.9881582063629905\n2810,2010-04-01,unemploy,15325.0,0.9978684771453383\n2811,2010-05-01,unemploy,14849.0,0.9602905186705613\n2812,2010-06-01,unemploy,14474.0,0.9306860345780374\n2813,2010-07-01,unemploy,14512.0,0.9336859556327465\n2814,2010-08-01,unemploy,14648.0,0.9444225151969685\n2815,2010-09-01,unemploy,14579.0,0.9389752901239441\n2816,2010-10-01,unemploy,14516.0,0.9340017367964001\n2817,2010-11-01,unemploy,15081.0,0.9786058261624694\n2818,2010-12-01,unemploy,14348.0,0.9207389279229494\n2819,2011-01-01,unemploy,14013.0,0.8942922554669614\n2820,2011-02-01,unemploy,13820.0,0.8790558143206758\n2821,2011-03-01,unemploy,13737.0,0.8725033551748638\n2822,2011-04-01,unemploy,13957.0,0.8898713191758112\n2823,2011-05-01,unemploy,13855.0,0.8818188995026447\n2824,2011-06-01,unemploy,13962.0,0.8902660456303781\n2825,2011-07-01,unemploy,13763.0,0.8745559327386121\n2826,2011-08-01,unemploy,13818.0,0.878897923738849\n2827,2011-09-01,unemploy,13948.0,0.8891608115575906\n2828,2011-10-01,unemploy,13594.0,0.8612141785742481\n2829,2011-11-01,unemploy,13302.0,0.8381621536275361\n2830,2011-12-01,unemploy,13093.0,0.8216625878266361\n2831,2012-01-01,unemploy,12797.0,0.7982947817162707\n2832,2012-02-01,unemploy,12813.0,0.799557906370885\n2833,2012-03-01,unemploy,12713.0,0.7916633772795453\n2834,2012-04-01,unemploy,12646.0,0.7863740427883477\n2835,2012-05-01,unemploy,12660.0,0.7874792768611353\n2836,2012-06-01,unemploy,12692.0,0.7900055261703639\n2837,2012-07-01,unemploy,12656.0,0.7871634956974817\n2838,2012-08-01,unemploy,12471.0,0.7725586168785032\n2839,2012-09-01,unemploy,12115.0,0.7444540933133339\n2840,2012-10-01,unemploy,12124.0,0.7451646009315545\n2841,2012-11-01,unemploy,12005.0,0.7357701113128602\n2842,2012-12-01,unemploy,12298.0,0.7589010815504855\n2843,2013-01-01,unemploy,12471.0,0.7725586168785032\n2844,2013-02-01,unemploy,11950.0,0.7314281203126234\n2845,2013-03-01,unemploy,11689.0,0.7108233993842268\n2846,2013-04-01,unemploy,11760.0,0.7164285150390779\n2847,2013-05-01,unemploy,11654.0,0.7080603142022578\n2848,2013-06-01,unemploy,11751.0,0.7157180074208573\n2849,2013-07-01,unemploy,11335.0,0.6828767664008842\n2850,2013-08-01,unemploy,11279.0,0.678455830109734\n2851,2013-09-01,unemploy,11270.0,0.6777453224915134\n2852,2013-10-01,unemploy,11136.0,0.6671666535091182\n2853,2013-11-01,unemploy,10787.0,0.6396147469803426\n2854,2013-12-01,unemploy,10404.0,0.6093787005605116\n2855,2014-01-01,unemploy,10202.0,0.5934317517960054\n2856,2014-02-01,unemploy,10349.0,0.6050367095602748\n2857,2014-03-01,unemploy,10380.0,0.60748401357859\n2858,2014-04-01,unemploy,9702.0,0.5539591063393069\n2859,2014-05-01,unemploy,9859.0,0.5663535170127102\n2860,2014-06-01,unemploy,9460.0,0.5348543459382648\n2861,2014-07-01,unemploy,9608.0,0.5465382489934475\n2862,2014-08-01,unemploy,9599.0,0.5458277413752269\n2863,2014-09-01,unemploy,9262.0,0.5192231783374122\n2864,2014-10-01,unemploy,8990.0,0.4977500592089682\n2865,2014-11-01,unemploy,9090.0,0.5056445883003079\n2866,2014-12-01,unemploy,8717.0,0.4761979947896108\n2867,2015-01-01,unemploy,8903.0,0.49088181889950266\n2868,2015-02-01,unemploy,8610.0,0.4677508486618773\n2869,2015-03-01,unemploy,8504.0,0.4593826478250572\n2870,2015-04-01,unemploy,8526.0,0.46111944422515194\n",
  :format {:type "csv"}}}

While this in itself does not affect the display of the plot, it allows us to keep editing it as a Vega-Lite spec. For example, let us change the backgound colour this way:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-line {:=mark-color "purple"})
    (hanami/update-data tc/random 5)
    (hanami/layer-point {:=mark-color "green"
                        :=mark-size 200})
    hanami/plot
    (assoc :background "lightgrey"))

For another example, let us change the y scale to logarithmic. See Scale in the Vega-Lite documentation.

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-line {:=mark-color "purple"})
    (hanami/update-data tc/random 5)
    (hanami/layer-point {:=mark-color "green"
                        :=mark-size 200})
    hanami/plot
    (assoc-in [:encoding :y :scale :type] "log"))

5.11 Smoothing

hanami/layer-smooth is a layer that applies some statistical processing to the dataset to model it as a smooth shape. It is inspired by ggplot’s geom_smooth.

At the moment, it can only be used to model :=y by linear regression. Soon we will add more ways of modelling the data.

(-> datasets/iris
    (hanami/base {:=title "dummy"
                 :=mark-color "green"
                 :=x :sepal-width
                 :=y :sepal-length})
    hanami/layer-point
    (hanami/layer-smooth {:=mark-color "orange"}))

By default, the regression is computed with only one predictor variable, which is :=x. But this can be overriden using the :predictors key. We may compute a regression with more than one predictor.

(-> datasets/iris
    (hanami/base {:=x :sepal-width
                 :=y :sepal-length})
    hanami/layer-point
    (hanami/layer-smooth {:=predictors [:petal-width
                                       :petal-length]}))

5.12 Grouping

The regression computed by hanami/layer-smooth is affected by the inferred grouping of the data.

For example, here we recieve three regression lines, each for every species.

(-> datasets/iris
    (hanami/base {:=title "dummy"
                 :=color :species
                 :=x :sepal-width
                 :=y :sepal-length})
    hanami/layer-point
    hanami/layer-smooth)

This happened because the :color field was :species, which is of :nominal type.

But we may override this using the :group key. For example, let us avoid grouping:

(-> datasets/iris
    (hanami/base {:=title "dummy"
                 :=mark-color "green"
                 :=color :species
                 :=group []
                 :=x :sepal-width
                 :=y :sepal-length})
    hanami/layer-point
    hanami/layer-smooth)

5.13 Example: out-of-sample predictions

Here is a slighly more elaborate example inpired by the London Clojurians talk mentioned in the preface.

Assume we wish to predict the unemployment rate for 96 months. Let us add those months to our dataset, and mark them as Future (considering the original data as Past):

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (tc/add-column :relative-time "Past")
    (tc/concat (tc/dataset {:date (-> datasets/economics-long
                                      :date
                                      last
                                      (datetime/plus-temporal-amount (range 96) :days))
                            :relative-time "Future"}))
    (print/print-range 6))

ggplot2/economics_long [670 6]:

:rownames :date :variable :value :value01 :relative-time
2297 1967-07-01 unemploy 2944.0 0.02044683 Past
2298 1967-08-01 unemploy 2945.0 0.02052578 Past
2299 1967-09-01 unemploy 2958.0 0.02155206 Past
… … … … … …
2015-07-02 Future
2015-07-03 Future
2015-07-04 Future
2015-07-05 Future

Let us represent our dates as numbers, so that we can use them in linear regression:

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (tc/add-column :relative-time "Past")
    (tc/concat (tc/dataset {:date (-> datasets/economics-long
                                      :date
                                      last
                                      (datetime/plus-temporal-amount (range 96) :months))
                            :relative-time "Future"}))
    (tc/add-column :year #(datetime/long-temporal-field :years (:date %)))
    (tc/add-column :month #(datetime/long-temporal-field :months (:date %)))
    (tc/map-columns :yearmonth [:year :month] (fn [y m] (+ m (* 12 y))))
    (print/print-range 6))

ggplot2/economics_long [670 9]:

:rownames :date :variable :value :value01 :relative-time :year :month :yearmonth
2297 1967-07-01 unemploy 2944.0 0.02044683 Past 1967 7 23611
2298 1967-08-01 unemploy 2945.0 0.02052578 Past 1967 8 23612
2299 1967-09-01 unemploy 2958.0 0.02155206 Past 1967 9 23613
… … … … … … … … …
2022-12-01 Future 2022 12 24276
2023-01-01 Future 2023 1 24277
2023-02-01 Future 2023 2 24278
2023-03-01 Future 2023 3 24279

Let us use the same regression line for the Past and Future groups. To do this, we avoid grouping by assigning [] to :=group. The line is affected only by the past, since in the Future, :=y is missing. We use the numerical field :yearmonth as the regression predictor, but for plotting, we still use the :temporal field :date.

(-> datasets/economics-long
    (tc/select-rows #(-> % :variable (= "unemploy")))
    (tc/add-column :relative-time "Past")
    (tc/concat (tc/dataset {:date (-> datasets/economics-long
                                      :date
                                      last
                                      (datetime/plus-temporal-amount (range 96) :months))
                            :relative-time "Future"}))
    (tc/add-column :year #(datetime/long-temporal-field :years (:date %)))
    (tc/add-column :month #(datetime/long-temporal-field :months (:date %)))
    (tc/map-columns :yearmonth [:year :month] (fn [y m] (+ m (* 12 y))))
    (hanami/base {:=x :date
                 :=y :value})
    (hanami/layer-smooth {:=color :relative-time
                         :=mark-size 10
                         :=group []
                         :=predictors [:yearmonth]})
    ;; Keep only the past for the following layer:
    (hanami/update-data (fn [dataset]
                         (-> dataset
                             (tc/select-rows (fn [row]
                                               (-> row :relative-time (= "Past")))))))
    (hanami/layer-line {:=mark-color "purple"
                       :=mark-size 3}))

5.14 Histograms

Histograms can also be represented as layers with statistical processing:

(-> datasets/iris
    (hanami/layer-histogram {:=x :sepal-width}))
(-> datasets/iris
    (hanami/layer-histogram {:=x :sepal-width
                            :=histogram-nbins 30}))
source: notebooks/tableplot_book/hanami_walkthrough.clj