do duty vs do something in someone's stead

do duty

do something in someone's stead

How often have the words do duty and do something in someone's stead occurred in a corpus of books? (source: Google Ngram Viewer )