Bar Chart

Simple bar chart

Compare with D3.js original

SELECT letter, frequency::float * 100 AS frequency
FROM EXTERNAL CSV("http://scleraviz.herokuapp.com/assets/data/letterfreq.csv")
PLOT(GEOM=BAR(x=letter, y=frequency), TOOLTIP=frequency)
AXIS letter(LABEL="Letter")
AXIS frequency(LABEL="Frequency (%)")

Description

Plots the frequency of letters in the English language. Hovering on each bar displays a tooltip with the associated frequency value.

Data Preparation

The data is retrieved from a URL, and is cast to float and normalized

letterfreq.csv

letter,frequency
A,.08167
B,.01492
C,.02782
D,.04253
E,.12702
F,.02288
G,.02015
H,.06094
I,.06966
J,.00153
K,.00772
L,.04025
M,.02406
N,.06749
O,.07507
P,.01929
Q,.00095
R,.05987
S,.06327
T,.09056
U,.02758
V,.00978
W,.02360
X,.00150
Y,.01974
Z,.00074

Built with D3 and D3-Legend

Powered by Sclera