Skip to content

Commit

Permalink
chicago-bike-times - reorganized plots
Browse files Browse the repository at this point in the history
  • Loading branch information
daslu committed Nov 6, 2024
1 parent d915cba commit 4f3418a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions notebooks/noj_book/chicago_bike_times.clj
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,6 @@

(def i->day (comp [:Mon :Tue :Wed :Thu :Fri :Sat :Sun] dec))

(-> processed-trips
(tc/group-by [:day-of-week :hour])
(tc/aggregate {:n tc/row-count})
(tc/group-by :day-of-week {:result-type :as-map})
(->> (into (sorted-map)))
(update-vals #(plotly/layer-bar
%
{:=x :hour
:=y :n}))
(update-keys i->day))


(-> processed-trips
(tc/group-by [:day-of-week :hour])
(tc/aggregate {:n tc/row-count})
Expand All @@ -119,6 +107,9 @@
{:=x :hour
:=y :n})])})
(tc/order-by [:day-of-week])
(tc/map-columns :day-of-week
[:day-of-week]
i->day)
kind/table)


Expand Down

0 comments on commit 4f3418a

Please sign in to comment.