Draft

# Noway Clojure Meetup Dec. 2025: Data analysis

Meetup notes
Published

December 3, 2025

(def ds
  (-> (rdatasets/gapminder-gapminder)
      (tc/order-by :year)))
(-> ds
    (tc/order-by :year)
    (plotly/layer-line {:=x :year
                        :=y :gdp-percap
                        :=color :country}))
(def kuwait? (comp #{"Kuwait"} :country))
(def ds-kuwait
  (-> ds
      (tc/order-by [:country :year])
      (tc/select-rows kuwait?)))

Why does gdp per capita decrease in Kuwait?

(-> ds-kuwait
    (plotly/layer-line {:=x :year
                        :=y :gdp-percap})
    (plotly/layer-line {:=x :year
                        :=y :pop}))

Population has increased sharply.

What about total gdp?

(-> ds-kuwait
    (tc/* :gdp [:gdp-percap :pop])
    (plotly/layer-line {:=x :year
                        :=y :gdp}))

GDP has been rising, overall, even if GDP per capita has been falling.

(tc/head ds)

https://vincentarelbundock.github.io/Rdatasets/csv/gapminder/gapminder.csv [5 7]:

:rownames :country :continent :year :life-exp :pop :gdp-percap
613 Guinea Africa 1952 33.609 2664249 510.1964923
289 China Asia 1952 44.000 556263527 400.4486110
1657 West Bank and Gaza Asia 1952 43.160 1030585 1515.5923290
769 Italy Europe 1952 65.940 47666000 4931.4041550
973 Mauritius Africa 1952 50.986 516556 1967.9557070
(defn select-continent [table continent]
  (-> table
      (tc/select-rows (comp #{continent} :continent))))
(defn view-continent [continent]
  [continent
   (-> ds
       (select-continent continent)
       (plotly/layer-line {:=x :year
                           :=y :gdp-percap
                           :=color :country}))])
(def continents
  (into (sorted-set)
        (tc/column ds :continent)))
continents
#{"Africa" "Americas" "Asia" "Europe" "Oceania"}
(mapv view-continent continents)

[

[

"Africa"

]

[

"Americas"

]

[

"Asia"

]

[

"Europe"

]

[

"Oceania"

]

]

source: src/clojure_norway/meetup_2025_12.clj