Closed HunterRatliff1 closed 1 year ago
I'm having the same issue, but it seems to be a Mapbox API limit.
Maximum 25 input coordinates per request
If you need more than that, maybe you can use DBSCAN to cluster origins or destinations points so that you meet the API limits as explained here.
Thanks for the heads up and detailed reprex! This is now fixed.
I'm a huge fan of your work, and I'm very impressed with how well all of your packages run!
I ran into a small bug with the
mb_matrix
function. It only seems to occur whencoord_size
is over 25, but neither origins nor destinations sizes are >25 individually. There doesn't seem to be any issues when coord_size is less than 25 and it behaves perfectly if eitherorigin_size
ordest_size
is >25. A reproducible example is below:Reprex
Set up an example data from North Texas
This is just a wrapper function to demonstrate how the
mapboxapi::mb_matrix
function behaves with differing numbers of origins & destinationsThese are some examples of cases that don't work. From my (non-reproducible) analysis, all the cases I've ran into issues with were conditions where coord_size > 25 (but neither origins nor destinations sizes were >25 alone). I'm happy to share my data (save you from expensive API calls while troubleshooting).
For what it's worth, nothing changes if you set
allow_large_matrix = TRUE
. Separately, thank you so much for adding the allow_large_matrix feature; it's much appreciated!As mentioned above, the other situations work beautifully
Created on 2023-09-02 with reprex v2.0.2