Evolutionary dynamics of influenza virus across spatiotemporal scales