Contents

Callysto.ca Banner

Open in Callysto

Google Ngram ViewerΒΆ

The Google Books Ngram Viewer allows you to search for and visualize the frequency of terms in books.

The search terms and options are specified in lists, then the graph generated by the Ngram Viewer is embedded as an iFrame.

search_terms = ['Mars', 'Venus']
options = ['case_insensitive=on', 'year_start=1957', 'year_end=2008', 'corpus=15', 'smoothing=3']

content = '%2C'.join(search_terms)
options.insert(0, content)
parameters = '&'.join(options)
ngram_url_base = 'https://books.google.com/ngrams/interactive_chart?content='
ngram_url = ngram_url_base + parameters

print('Mentions of Mars or Venus in English Books Over Time')
from IPython.display import IFrame
IFrame(ngram_url, width=900, height=500)
Mentions of Mars or Venus in English Books Over Time

Callysto.ca License