OCCRA
Go to Post Mentors can either hide the experience of failure or support the right of a student in gaining that experience. - dcbrown [more]
Home
Go Back   Chief Delphi > CD-Media > Photos
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

photos

papers

everything



Average Travel Distance for FRC Teams to US

By: lbl1731
New: 09-20-2018 10:30 AM
Updated: 09-20-2018 11:03 AM
Views: 1487 times


Average Travel Distance for FRC Teams to US

This is an interactive viz that shows the average travel distance for FRC teams to all the counties in the US. I thought it would be interesting to see where the championship would be if the only consideration was average travel distance. Distances were calculated as the crow flies for simplicity. I also looked at just USA teams, just the Detroit and Houston Teams, and just the international teams.

Credit to 1418 and https://github.com/FIRSTMap/firstmap.github.io for the lat/long of each team.

Tableau viz: https://public.tableau.com/views/Ave...es&publish=yes

Recent Viewers

Discussion

view entire thread

Reply

09-20-2018 11:46 AM

Richard Wallace


Unread Re: pic: Average Travel Distance for FRC Teams to US

So, the center of the FRC world is Kalamazoo? Who knew?

I mean, besides 2767?



09-20-2018 12:18 PM

mman1506


Unread Re: pic: Average Travel Distance for FRC Teams to US

What about if you limited it just to teams who attended champs last year? Maybe it would make Michigan teams pull things a little less (though on second thought maybe not?)



09-20-2018 01:25 PM

SenorZ


Unread Re: pic: Average Travel Distance for FRC Teams to US

When I click on South Teams it seams to center on Colorado...



09-20-2018 02:43 PM

lbl1731


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by mman1506 View Post
What about if you limited it just to teams who attended champs last year? Maybe it would make Michigan teams pull things a little less (though on second thought maybe not?)
I added three new sheets that do as you suggested, didn't make much of a notable difference.

Quote:
Originally Posted by SenorZ View Post
When I click on South Teams it seams to center on Colorado...
Correct, so for all the teams who go to the southern championship, they are traveling an average of 2036 mi (Harris County TX) as opposed to the minimum average distance possible which is somewhere in Colorado (~1900 mi).



09-20-2018 05:26 PM

MikLast


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by SenorZ View Post
When I click on South Teams it seams to center on Colorado...
Denver champs? Ill sign up real quick for that.



09-20-2018 09:23 PM

Donut


Unread Re: pic: Average Travel Distance for FRC Teams to US

Interesting that the South Champs has such a small automatic mileage spread on the color scale. It looks like there is a pretty wide swath of the West and South that can be chosen for South Champs with very minimal travel mileage impact.



09-20-2018 10:25 PM

GeeTwo


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Donut View Post
Interesting that the South Champs has such a small automatic mileage spread on the color scale. It looks like there is a pretty wide swath of the West and South that can be chosen for South Champs with very minimal travel mileage impact.
I wonder how deep you would have to put south champs to minimize the straight-line distances.



09-21-2018 08:44 AM

SenorZ


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by MikLast View Post
Denver champs? Ill sign up real quick for that.
Haha. Me too.
I guess my conceptual issue was I was thinking of distance from counties, with counties being weighed evenly... not by teams that actually exist in those counties. Explains why Alaska didn't pull South Champs into Oregon.



09-21-2018 07:04 PM

Joe Ross


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Donut View Post
Interesting that the South Champs has such a small automatic mileage spread on the color scale. It looks like there is a pretty wide swath of the West and South that can be chosen for South Champs with very minimal travel mileage impact.
This is probably because of the large international presence at South Champs. A South Champs (USA only) would probably be more relevant).



09-23-2018 03:19 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Yikes, what happened to Oglala Lakota County (Shannon County) in SD? Were county seats used as an endpoint to calculate distance? This is the only explanation I can think of (Oglala Lakota County is the only county in the US (that I know of) to have its county seat outside of the county).

Is it possible to recalculate the distances as Manhattan distance? Then average the Euclidean and Manhattan? I have a feeling that will give a much closer representation of real-world travel distances. (Whether or not it is actually useful is another matter entirely.)

If I had the free time I would dive into this: https://stackoverflow.com/questions/...s-driving-time Select maybe 2 dozen candidate cities vs the team subset and let it go to town (no pun intended). Pick the city with the lowest residuals, boom. (It might hic-up where no road network is present (i.e. Hawaii)).

Also a quick cartographic tip to the OP (not trying to be mean), since you are dealing with difference and not a variance (i.e. positive only values) you should be using a monochromatic color scheme. The current color you are using is really only commonly applicable to +/- situations, such as standard deviation. The point I am trying to make is the eye is drawn to the ring of low saturation hues, and not to the point of your map: the geographic center of a distribution.
While the map is easy enough to read, the color scheme adds complexity where there doesn't need to be any.



09-23-2018 03:40 PM

ngreen


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Skyehawk View Post
Yikes, what happened to Oglala Lakota County (Shannon County) in SD?



It would be interesting to optimize on multiple sites (an arbitrary number from n=2-100) minimizing distance from the closest site for all the teams.

And also interesting to redo that calculating driving distances (e.g. Google Maps API).

You could also add a constraint about how many teams can go to the site, so you wouldn't have a bunch be at a single site.



09-23-2018 03:55 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by ngreen View Post
It would be interesting to optimize on multiple sites (an arbitrary number from n=2-100) minimizing distance from the closest site for all the teams.

And also interesting to redo that calculating driving distances (e.g. Google Maps API).

You could also add a constraint about how many teams can go to the site, so you wouldn't have a bunch be at a single site.
I may or may not have decided I need to play with this right now...



09-23-2018 04:44 PM

Mark Wasserman


Unread Re: pic: Average Travel Distance for FRC Teams to US

Belle Fourche, South Dakota

All they need is a big building, a bunch of motels, and a big parking lot, but it's the fairest.



09-23-2018 08:57 PM

GeeTwo


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Mark Wasserman View Post
Belle Fourche, South Dakota

All they need is a big building, a bunch of motels, and a big parking lot, but it's the fairest.
From a realistic standpoint of actual travel distance, proximity to a major international airport is key, ESPECIALLY for south champs. By major, I mean one where international flights come in from many directions.



09-24-2018 12:29 AM

Citrus Dad


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Donut View Post
Interesting that the South Champs has such a small automatic mileage spread on the color scale. It looks like there is a pretty wide swath of the West and South that can be chosen for South Champs with very minimal travel mileage impact.
Yes, it looks like the South Champs could be in California just as easily as Houston with little impact on travel distance. Los Angeles is 2,041 miles versus 2,028 for Harris County.



09-24-2018 08:17 AM

lbl1731


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Skyehawk View Post
Yikes, what happened to Oglala Lakota County (Shannon County) in SD? Were county seats used as an endpoint to calculate distance? This is the only explanation I can think of (Oglala Lakota County is the only county in the US (that I know of) to have its county seat outside of the county).

Is it possible to recalculate the distances as Manhattan distance? Then average the Euclidean and Manhattan? I have a feeling that will give a much closer representation of real-world travel distances. (Whether or not it is actually useful is another matter entirely.)

If I had the free time I would dive into this: https://stackoverflow.com/questions/...s-driving-time Select maybe 2 dozen candidate cities vs the team subset and let it go to town (no pun intended). Pick the city with the lowest residuals, boom. (It might hic-up where no road network is present (i.e. Hawaii)).

Also a quick cartographic tip to the OP (not trying to be mean), since you are dealing with difference and not a variance (i.e. positive only values) you should be using a monochromatic color scheme. The current color you are using is really only commonly applicable to +/- situations, such as standard deviation. The point I am trying to make is the eye is drawn to the ring of low saturation hues, and not to the point of your map: the geographic center of a distribution.
While the map is easy enough to read, the color scheme adds complexity where there doesn't need to be any.
The endpoints for the counties were the coordinates to the approximate center of the county, taken from here. But I'm not really sure why Oglala county is not showing up.

This map would definitely be more interesting if each distance was calculated using the Google Maps API, and I looked into it, but it was a bit over my head. Someone else can give it a shot though! Thanks for the note about the color scheme, that makes a lot of sense. The single color gradient looks much better.



09-25-2018 11:58 AM

RaceCar627


Unread Re: pic: Average Travel Distance for FRC Teams to US

Time to have worlds entirely within 2767's lab.



09-25-2018 12:07 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by lbl1731 View Post
The endpoints for the counties were the coordinates to the approximate center of the county, taken from here. But I'm not really sure why Oglala county is not showing up.

This map would definitely be more interesting if each distance was calculated using the Google Maps API, and I looked into it, but it was a bit over my head. Someone else can give it a shot though! Thanks for the note about the color scheme, that makes a lot of sense. The single color gradient looks much better.
So the problem with google is you will end up paying for more than n accesses of the api per day. It's not stupid expensive, but still I don't have $100 to test all teams vs 24 unique cities (even if I used a geographically weighted subset of a few hundred teams). The key thing is travel duration. This *might* be possible through open street maps as well. I can toss the kinda-sorta-working python script on github if anyone is interested.

I might also be able to use arcmap's network features. But the google approach seemed way easier at the time (untill I found out about the cap).

Another interesting result may be: instead of modeling distance as a linear relationship, model it as a nth degree polynomial. This way you could fit drivetime cost based on time of day leaving (i.e. preferance to not arriving to a hotel at 5am) I can elaborate more if anyone is interested.



09-25-2018 12:57 PM

Cory Walters


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by RaceCar627 View Post
Time to have worlds entirely within 2767's lab.
If we do, would we need to ship our robot still?



09-25-2018 01:29 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by lbl1731 View Post
...

This map would definitely be more interesting if each distance was calculated using the Google Maps API, and I looked into it, but it was a bit over my head. ...
I have the open street map calculation working in python (all 7 6 lines ). Can you point me to your team location coordinates dataset?

Quote:
Originally Posted by Cory Walters View Post
If we do, would we need to ship our robot still?
Yes. Tuck it in, read it a bedtime story, ship it out.



09-25-2018 01:48 PM

lbl1731


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Skyehawk View Post
I have the open street map calculation working in python (all 7 6 lines ). Can you point me to your team location coordinates dataset?
This is the data I used.



09-25-2018 02:39 PM

Andrew Schreiber


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by GeeTwo View Post
From a realistic standpoint of actual travel distance, proximity to a major international airport is key, ESPECIALLY for south champs. By major, I mean one where international flights come in from many directions.
Not just proximity. Airport <-> Airport round trip costs are very odd. Some airports are extremely expensive some dirt cheap. The FAA publishes data for this but it's not the easiest thing to work with.

You also need to factor in hotel costs in the region, public transit, and costs of food. The best source for this I've found is government per diem data (they publish hotel costs and 'per diem' amounts for major areas (which fortunately includes most FRC events).

Fair warning, this way lies madness. I have some code that'll compute the cheapest events for teams to attend by airline fare, I haven't factored in per diem and hotel costs yet. But suffice to say it's NOT simple. Most of the code exists at https://github.com/schreiaj/TBA-Data...udy/schema.sql Consider yourself warned - most of those queries are NOT going to run quickly and some of the data files are in the multiple gb range.



09-26-2018 07:57 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Andrew Schreiber View Post
Not just proximity. Airport <-> Airport round trip costs are very odd. Some airports are extremely expensive some dirt cheap. The FAA publishes data for this but it's not the easiest thing to work with.

You also need to factor in hotel costs in the region, public transit, and costs of food. The best source for this I've found is government per diem data (they publish hotel costs and 'per diem' amounts for major areas (which fortunately includes most FRC events).

Fair warning, this way lies madness. I have some code that'll compute the cheapest events for teams to attend by airline fare, I haven't factored in per diem and hotel costs yet. But suffice to say it's NOT simple. Most of the code exists at https://github.com/schreiaj/TBA-Data...udy/schema.sql Consider yourself warned - most of those queries are NOT going to run quickly and some of the data files are in the multiple gb range.
Well I am not looking to do my master's thesis on sports/Frc/travel logistics geography, but I now know who I need to contact to get started if that does happen

To restate the scope of what we are looking at here:
  1. We are trying to find road travel time with a distance matrix API (OSM at the moment).
  2. A suitable set of candidate cities is then selected (which could be determined by the process you outlined above (or via dead reckon and have a nominal list vs an ordinal one)).
  3. Road travel times can then be computed for a subset of teams (how you determine that is highly dependent on end goal). The results of the calculation will be team travel times for each team in that subset.
  4. Then you could find the location with the lowest deviation of travel times for all teams, the best fit based on optimizing for maximum number of teams with a low travel time (i.e. <= 6hr), etc.

What does this all gain us? A data set that you could make a nice map with.



09-26-2018 08:42 PM

Andrew Schreiber


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Skyehawk View Post
Well I am not looking to do my master's thesis on sports/Frc/travel logistics geography, but I now know who I need to contact to get started if that does happen

To restate the scope of what we are looking at here:
  1. We are trying to find road travel time with a distance matrix API (OSM at the moment).
  2. A suitable set of candidate cities is then selected (which could be determined by the process you outlined above (or via dead reckon and have a nominal list vs an ordinal one)).
  3. Road travel times can then be computed for a subset of teams (how you determine that is highly dependent on end goal). The results of the calculation will be team travel times for each team in that subset.
  4. Then you could find the location with the lowest deviation of travel times for all teams, the best fit based on optimizing for maximum number of teams with a low travel time (i.e. <= 6hr), etc.

What does this all gain us? A data set that you could make a nice map with.

Lol, look, I had some free time last year and needed an excuse to keep my pSQL skills sharp.

Have you tried the Mapbox Matrix API? https://www.mapbox.com/api-documenta...rieve-a-matrix I remember looking at it for this problem a bit ago, never went anywhere with it. 50k/mo elements for free, $0.50 for every 1k/mo after... I think it uses OSM data under the hood?



09-26-2018 08:48 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Andrew Schreiber View Post
Lol, look, I had some free time last year and needed an excuse to keep my pSQL skills sharp.

Have you tried the Mapbox Matrix API? https://www.mapbox.com/api-documenta...rieve-a-matrix I remember looking at it for this problem a bit ago, never went anywhere with it. 50k/mo elements for free, $0.50 for every 1k/mo after... I think it uses OSM data under the hood?
No, no I haven't, however it looks awfully similar to what I am making calls to in Open Street Map, so it wouldn't surprise me if they had identical lower level OSM API calls. I just got the OSM calls working yesterday, I haven't run through any sizable subset of coordinates.



09-26-2018 10:02 PM

GeeTwo


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by lbl1731 View Post
This is the data I used.
This data set is mostly a result of putting the locations in TBA up against the geonames.org place name databases. There are also a significant number of teams with lat/lon provided to firstmap by a team member or a local contact. Where both of these failed, I did individual queries against google maps to find the coordinates of the specific school or other organization and stored this in a file called geo_cache. If you're interested in understanding or improving the scraper logic, it's all at https://github.com/FIRSTMap/FIRSTMap-scraper.



09-26-2018 11:16 PM

RaceCar627


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by Cory Walters View Post
If we do, would we need to ship our robot still?
yes.



10-09-2018 08:57 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

I finally found a few minutes during our meeting time today to get the automatic OSM API calls working. Now I only need to log all the output, plot, interpolate, and map.

Considering I could be making well over 60,000 calls to the OSM API, how long do you think it will take before they throttle the absolute s**t out of me?



10-09-2018 09:52 PM

ngreen


Unread Re: pic: Average Travel Distance for FRC Teams to US

Don't know if this is the applicable usage policy: https://operations.osmfoundation.org...ies/nominatim/

But assuming it is, basically limit yourself to less than 1 request per second.

For 60k request = 16 hours.



10-09-2018 10:06 PM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Quote:
Originally Posted by ngreen View Post
Don't know if this is the applicable usage policy: https://operations.osmfoundation.org...ies/nominatim/

But assuming it is, basically limit yourself to less than 1 request per second.

For 60k request = 16 hours.
Yeah I was already considering this. 16hrs to get the data is an acceptable time frame IMO. That policy is there to prevent massive data mining / Api usage without putting money back into the pot (i.e. UBER & Lyft, who are MASSIVE supporters of OSM btw.) The other option is to download the data and run your own instance of the server or run it as a network in arcmap, (I don't feel like doing this). So time limiting the data collection to run over the course of a weekend sounds like an acceptable and reasonable alternative to me.

UPDATE
I got everything working on the data collection end of things. All travel times are in seconds (by car), road distance is in meters. This particular bit of data is travel distance/time to Detroit.
Example output:
Code:
team_#  orgin_lat|orgin_lon     dest_lat|dest_lon       dist_m  time_s
1	42.6680	-83.2890	42.3314	-83.0458	51581	2366
4	34.2010	-118.4870	42.3314	-83.0458	3682272	125343
8	37.4440	-122.1500	42.3314	-83.0458	3896397	133631
11	40.8450	-74.7020	42.3314	-83.0458	924227	32496
16	36.3310	-92.3750	42.3314	-83.0458	1258964	45259
20	42.8500	-73.7850	42.3314	-83.0458	882040	31597
21	28.6270	-80.8430	42.3314	-83.0458	1835286	64403
23	41.9100	-70.6420	42.3314	-83.0458	1215556	42748
25	40.4540	-74.4820	42.3314	-83.0458	986552	35393
27	42.7240	-83.4230	42.3314	-83.0458	72091	2862
28	40.9820	-72.3070	42.3314	-83.0458	1151599	42029
31	36.0150	-95.9800	42.3314	-83.0458	1497972	51776
33	42.6580	-83.2370	42.3314	-83.0458	50319	2278
34	34.8040	-86.9710	42.3314	-83.0458	1017051	35356
41	40.6320	-74.5100	42.3314	-83.0458	963180	34363
45	40.4510	-86.1350	42.3314	-83.0458	403745	14888
48	41.2640	-80.8160	42.3314	-83.0458	347276	12611
51	42.6440	-83.2790	42.3314	-83.0458	49079	2090
56	40.5680	-74.5400	42.3314	-83.0458	963866	34332
58	43.6320	-70.2710	42.3314	-83.0458	1320087	46265
59	25.7340	-80.3590	42.3314	-83.0458	2244535	77023
60	35.1330	-113.7030	42.3314	-83.0458	3254697	111395
61	42.1760	-71.6030	42.3314	-83.0458	1112312	39283
63	42.0740	-80.1480	42.3314	-83.0458	423337	15082
66	42.2330	-83.6340	42.3314	-83.0458	60619	2341
67	42.6600	-83.6370	42.3314	-83.0458	77535	3478
68	42.8410	-83.4290	42.3314	-83.0458	79092	3502
69	42.2490	-70.9980	42.3314	-83.0458	1174207	41350
70	42.9150	-83.4840	42.3314	-83.0458	89607	4015
71	41.6100	-87.5080	42.3314	-83.0458	423047	14825
74	42.7690	-86.1160	42.3314	-83.0458	292125	10213
75	40.4770	-74.6270	42.3314	-83.0458	972033	34947
78	41.4990	-71.2990	42.3314	-83.0458	1204330	42656
79	28.1460	-82.6830	42.3314	-83.0458	1908843	66072
81	42.2990	-89.6350	42.3314	-83.0458	648167	22875
85	42.8260	-86.0100	42.3314	-83.0458	282594	9831
86	30.2410	-81.6170	42.3314	-83.0458	1636631	57881
87	40.0090	-74.7900	42.3314	-83.0458	980404	34374
88	41.9770	-70.9720	42.3314	-83.0458	1182760	41562
93	44.2420	-88.3560	42.3314	-83.0458	630423	26618
94	42.4720	-83.2940	42.3314	-83.0458	32044	1402
95	43.6720	-72.3810	42.3314	-83.0458	1096694	40462
97	42.3770	-71.1260	42.3314	-83.0458	1154991	40757
100	37.4250	-122.2960	42.3314	-83.0458	3900768	133755
101	41.9460	-87.8060	42.3314	-83.0458	475110	17384
102	40.5880	-74.6870	42.3314	-83.0458	965050	34286
103	40.5310	-75.2120	42.3314	-83.0458	920414	32944
107	42.7690	-86.1160	42.3314	-83.0458	292125	10213
108	26.1420	-80.1730	42.3314	-83.0458	2190087	75137
111	42.0640	-87.9860	42.3314	-83.0458	505450	17937
114	37.3810	-122.1260	42.3314	-83.0458	3915702	133931
115	37.3180	-122.0450	42.3314	-83.0458	3911124	133843
116	38.9840	-77.3680	42.3314	-83.0458	829312	29883
117	40.4310	-79.9210	42.3314	-83.0458	466900	16664
118	29.5170	-95.0960	42.3314	-83.0458	2139345	75214
120	41.4950	-81.6670	42.3314	-83.0458	273387	9865



10-10-2018 08:49 AM

Skyehawk


Unread Re: pic: Average Travel Distance for FRC Teams to US

Ok, I am running the full dataset for Detroit. I did my due diligence and made sure I am at most hitting the OSM server with 1 call/sec. Average calls to the API are 1 call / 3 sec. Hopefully they are OK with me doing that...

EDIT: an eighth of the way through... so far so good. I totally forgot to filter out teams that lacked an obvious road connection to Detroit (i.e. Australia, Hawaii, China), so I am wasting ~45sec per instance there.

EDIT: Over a third of the way there...

EDIT: And there goes the 2/3 mark...



view entire thread

Reply
previous
next

Tags

loading ...



All times are GMT -5. The time now is 09:35 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi