do something on the spur of the moment vs play it by ear

do something on the spur of the moment

play it by ear

How often have the words do something on the spur of the moment and play it by ear occurred in a corpus of books? (source: Google Ngram Viewer )