by a hair vs pretty near

by a hair

pretty near

How often have the words by a hair and pretty near occurred in a corpus of books? (source: Google Ngram Viewer )