September 2015
Beginner to intermediate
608 pages
13h 43m
English
A histogram is one way to visualize the distribution of a single sequence of values. Histograms simply take a continuous distribution, bin it, and plot the frequencies of points falling into each bin as a bar. The height of each bar in the histogram represents how many points in the data are contained in that bin.
We've already seen how to bin data ourselves, but incanter.charts contains a histogram function that will bin the data and visualize it as a histogram in two steps. We require incanter.charts as c in this chapter (and throughout the book).
(defn ex-1-12 []
(-> (load-data :uk-scrubbed)
(i/$ "Electorate")
(c/histogram)
(i/view)))The preceding code generates the following chart:
We can configure the number of bins data is segmented ...
Read now
Unlock full access