I have pivot dataframe with information on what territory many travelers are on their journey to around the world. My pivot df looks something like this:
Name Anna Robert James
Date
2018-10-01 Bulgaria Spain Croatia
2018-10-02 Portugal NaN Portugal
2018-10-03 Spain USA Spain
2018-10-04 USA USA Spain
2018-10-05 USA Canada USA
There are 100 columns (100 travelers) and 300 days.
Based on such data, how can I explore which routes are the most popular? It can be seen at first glance that all of them came to the USA from Spain. Robert also flew to the USA from Spain only that his flight lasted 2 days. Two of the three presented travelers came to Spain from Portugal so this is also a popular route.
Is there any way to show popular routes using ML algorithms? I will be extremely grateful for any tips.
EDIT: We can assume that the route has 2 nodes, so based on this df Spain-USA is a popular route