Getting started with panthera and COVID-19

(require '[panthera.panthera :as pt])
(require '[libpython-clj.python :refer [call-attr]])
12.6s
panthera (Clojure)
(def covid-url "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv")
0.0s
panthera (Clojure)
'user/covid-url
(def covid
  (pt/read-csv covid-url))
0.1s
panthera (Clojure)
'user/covid
(defn show
  [obj]
  (if (pt/series? obj)
  	{:nextjournal/viewer "html" 
     :nextjournal.viewer/value (call-attr (call-attr obj "to_frame") "to_html")}
    {:nextjournal/viewer "html" 
     :nextjournal.viewer/value (call-attr obj "to_html")}))
0.0s
panthera (Clojure)
'user/show
(print (pt/names covid))
0.6s
panthera (Clojure)
(show (pt/head covid))
0.0s
panthera (Clojure)
(-> (pt/melt covid {:id-vars ["Province/State" "Country/Region" "Lat" "Long"]
                    :var-name :date})
  pt/head
  show)
0.4s
panthera (Clojure)
Runtimes (1)