bad egg vs black hat

bad egg

noun
  • Someone whose behaviour is reprehensible or irresponsible; a rogue. 

  • An egg that has gone bad; a rotten egg. 

black hat

noun
  • A malicious hacker, one who violates computer security out of maliciousness or for personal gain. 

  • A villain or bad guy in a story, especially in a Western (a film or other work of the Western genre). 

  • A Haredi Jew; a member of an ultra-Orthodox Jewish community. 

How often have the words bad egg and black hat occurred in a corpus of books? (source: Google Ngram Viewer )