How to find correlation between two junctions of a road
Sorry to be posting as an answer, but the comment section doesn't allow me to place preformatted text. Using your example above, is the graphic representation similar to the one below?

X=== a -10- b ---- c
     |      |      |
     |      |      |
Y=== a ---- b -20- c


So you are wondering if the 10 (Road X, junction a - b) and 20 (Road Y, junction b - c) are correlated?



Update: Thank you for confirming.
Sorry I am totally not in the traffic domain, but I will give my 2 cents given the little I know about ML in general.

I assume that you want to understand the correlation between 10 and 20 to help you build a prediction model. If you unpack the question a bit, I think perhaps we can restructure the question to.

(If you are simply looking at all the available combination of and their correlations, it will probably take forever, and it might not be as actionable unless you normalize the information into your prediction model)

Label  = number of cars

Features = date, Road, junction a, junction b, [Number of cars in nearby intersections] + other related features

If it is the case, perhaps we can try to normalize the data to the Road, junction a, b through feature engineering.

Expanding on the diagram

W z-4--a --6- b --8- c
  |    |     |      |        
  3    20    28     9 
  |    |     |      |
X-z-1- a -10-b -19- c
       |     |      |
       15    12     7 
       |     |      |
Y--10- a -14-b -20- c


For Road X, junction a - b, we have 10 as the Label

Reconsider the nearby roads as:

level 0 -- Immediate connecting segments

level 1 -- Immediate connecting segments to level 0 roads

level 2 -- Immediate connecting segments to level 1 roads (if required)

W z-1--a -1-- b --1- c
  |    |     |      |        
  1    0     0      1 
  |    |     |      |
X-z-0- a -**-b -0- c
       |     |      |
       0     0      1 
       |     |      |
Y--1-- a -1 -b --1- c



You will know best how further away you want your output to be counted. you just create the necessary number of features to accommodate that. Perhaps distance to the junction in question, etc. Whatever makes more sense for your model
You will know best the necessary granularity. To start, perhaps you can count the number of level 0 and 1, recording each with the average in your model, etc.


Example:

Road     Jun A     Jun B    L0 Connection  L0 Avg Car    L1 Connection   L1 Avg
   X         a         b                6        17.5                9    [you get the idea]



Not sure how to handle bidirectional traffic. does the order of a and b imply direction already?
Your model will probably take care of the influence of your level 0 and level 1 (and level 2, etc.) connections.


Sorry for the long-winded response; hopefully it helps brainstorm some ways to tackle your problem.