The new correction now has some extra steps. Overall:
Identify problematic hex (1. weren't rooted by OTP; 2. can't access or be accessed by more than 10 other hex by bike in 90 minutes)
For each problematic hex:
Identify its level 3 neighbors. That would be 37 hex;
Filter only the neighbors that are not problematic;
Filter only the neighbors that are included in the original ttmatrix (some hex may be located outside the city, or weren't rooted in OTP because we didn't rooted hex without population/activities);
Out this result, select the 10 closest.
Now the correction has to be made for both the origin and the destination of each problematic hex (next 3 steps).
Filter the neighbors in the original ttmatrix;
Substitute the values identifying the neighbors with the value of the problematic hex;
Group by origin, dest, mode, pico and calculate the mean of the travel time;
This will result in two corrected ttmatrix, one for the origin and other for the destination. Bind them.
Bind the result of the previous steps (for all the problematic hex) with the ttmatrix of the hex that are not problematic.
h3jsr::get_kring()