Discuss the below:
Task:
You are performing some analysis on a basketball league, and would like to know the relationship between how far a team has to travel from home and how often it wins.
You have the following two files, which are dos-pipe (|) delimited containing data with row headers:
Team File: Fields are TeamID, TeamName, TeamArenaAddress
Win File: Fields are TeamID, Year, Wins
Assume that in a given year, every team plays every other team twice, once at its own arena, and once at the other team's arena.
Q: Create a dataset that with the following fields: TeamName, TotalDistanceTraveled. The field TotalDistanceTraveled should measure the distance the given team travels in a single year, in kilometers. This dataset should be ordered from the team which travels the most to the team which travels the least. Geocoding and distance calculations should be performed via code, and not done manually.
TeamID|Year|Wins
101|2014|12
325|2014|11
353|2014|14
431|2014|8
321|2014|7
332|2014|14
432|2014|15
121|2014|10
542|2014|16
345|2014|6
654|2014|9
546|2014|10
999|2014|132
101|2013|13
325|2013|10
353|2013|15
431|2013|7
321|2013|8
332|2013|13
432|2013|16
121|2013|9
542|2013|17
345|2013|5
654|2013|10
546|2013|9
999|2013|132
TeamID|TeamName|TeamArenaAddress
101|Arizona Wildcats|1 National Championiship Drive, Tucson, AZ 85721
325|Arizona State Sun Devils|600 E Veterans Way, Tempe, AZ 85281
353|UC Berkeley Golden Bears|115 Haas Pavilion, Berkeley, CA 94720
431|UCLA Bruins|301 Westwood Plaza, Los Angeles, CA 90095
321|Colorado Buffaloes|950 Regent Dr, Boulder, CO 80305
332|Oregon Ducks|1776 E 13th Ave, Eugene, OR 97403
432|Oregon State Beavers|660 SW 26th St, Corvallis, OR 97331
121|USC Trojans|3400 S Figueroa St, Los Angeles, CA 90089
542|Stanford Cardinals|655 Campus Dr, Stanford, CA 94305
345|Utah Utes|1825 S Campus Dr, Salt Lake City, UT 84112
654|Washington Huskies|3870 Montlake Blvd NE, Seattle, WA 98105
546|Washington State Cougars|1190 Bishop Boulevard, Pullman, WA 99163
999|All Teams|