  Congestion emerges when high demand peaks put transportation systems under
stress. Understanding the interplay between the spatial organization of demand,
the route choices of citizens, and the underlying infrastructures is thus
crucial to locate congestion hotspots and mitigate the delay. Here we develop a
model where links are responsible for the processing of vehicles that can be
solved analytically before and after the onset of congestion providing insights
into the global and local congestion. We apply our method to synthetic and real
transportation networks observing a strong agreement between the analytical
solutions and the monte carlo simulations, and a reasonable agreement with the
travel times observed in 12 cities under congested phase. Our framework can
incorporate any type of routing extracted from real trajectory data to provide
a more detailed description of congestion phenomena and could be used to
dynamically adapt the capacity of road segments according to the flow of
vehicles or reduce congestion through hotspot pricing.
