Letter frequency is the number of times letters of the alphabet appear on average in written language. Letter frequency analysis dates back to the Arab mathematician Al-Kindi (c. 801-873 AD), who formally developed the method to break ciphers.
This chart shows the letter frequency of entries in the Concise Oxford dictionary. The sample data is taken from Pavel Micka's website, which cites data taken from Robert Lewand's Cryptological Mathematics.
The below code is a short example of how a barchart can be used to visualise the relative frequency of the letters in the english language.
import pandas as pd # everything is easier with pandas
from novem import Plot # get the novem plot
# construct a new novem chart, if the name already exists it will
# be updated
barchart = Plot("en_letter_frequency",
type="bar",
caption = "Analysis of entries in the Concise Oxford dictionary"
"as published by the compilers. The chart above"
"represents data taken from Pavel Micka's website,"
"which cites Robert Lewand's Cryptological Mathematics"
)
# read the letter data and set an index
df = pd.read_csv("en_letter_freq.csv")
df = df.set_index("letter")
# write the data to the barchart
df.pipe(barchart)
#print the chart url
print(barchart.url)