The circular buttons use callback to update which of the two is selected.
This graphic illustrates string frequency over a period of time. Press left and right arrow keys to cycle through the data. A hash code adapted from Java is used to determine the color of the strings and the bars. log-scales are used to allow for visibility of small sample sizes at early time.
(defn splits | |
[s] | |
(take-while | |
(comp seq second) | |
(iterate | |
(fn [[prefix suffix]] | |
[(conj prefix (first suffix)) | |
(rest suffix)]) | |
[[] s]))) |
(defmacro aggregate | |
"Simple aggregation. Iterates over seq, binding values to | |
seq-bind. agg-bind is initially initial-val, but is bound to the value | |
of body after each iteration, and returned as the final value." | |
[agg-bind initial-val | |
[seq-bind seq] | |
& body] | |
`(reduce | |
(fn [~agg-bind ~seq-bind] | |
(do ~@body)) |
;; Anti patterns | |
;; Implicit data manipulation anti-pattern | |
;; | |
;; Having nested calls manipulating data, instead of explicitly stating | |
;; what changes are performed to the data | |
(def h | |
[z] | |
;; ... |
for f in ~/dir/*.txt; do bin/do_thing $f; done |
Projection of all British outbound postcodes (also known as "the bit before the space")
Voronoi diagram for British outbound postcodes. The voronoi
function breaks when the data points close to each other are not removed.
Demographics treemap with population distribution and revenue obtained from that demographic associated with each node. The (fictitious) demographics data is loaded from a CSV file, whereas the revenue data is randomly generated.
Click to add nodes! Nodes near the cursor will be linked to the new node. Clicking an existing node will remove it.
This is an extension of this example, adding the capability of removing nodes by clicking them. This means that dragging is no longer supported.