on foot vs riding the rails

on foot

prep
  • In progress or in preparation; active, in operation. 

  • On one's feet; walking, jogging or running but not in a vehicle or on the back of an animal. 

riding the rails

How often have the words on foot and riding the rails occurred in a corpus of books? (source: Google Ngram Viewer )