genereate historical route from checkins and create controller api to retrive the data