Clicking on images redirect you to data

I’m trying to create similar dashboard to this in which clicking on the flag redirect you to the data.
My questions are the following( I’m using jupyter ) :

1/ Do I need to create a seperate python file for each flag?
2/ If so, how to link it with the main ode?