have reference to vs have to do with

have reference to

have to do with

How often have the words have reference to and have to do with occurred in a corpus of books? (source: Google Ngram Viewer )