Created
May 2, 2018 18:50
-
-
Save luisdelatorre012/3789686f1ae97bdd01e020030d63013f to your computer and use it in GitHub Desktop.
Cities Gateways distance example data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cities_data = '{"City":{"0":"Laurel","1":"El Paso","2":"Laredo","3":"Milwaukee"},"Latitude":{"0":39.1050682068,"1":31.7591590881,"2":27.5309200287,"3":44.6417884827},"Longitude":{"0":-76.8656692505,"1":-106.487487793,"2":-99.5022277832,"3":-89.7367401123}}' | |
cities_df = pd.read_json(cities_data) | |
gateways_data = '{"Gateway":{"0":"LAX","1":"MIA","2":"ATL","3":"ORD","4":"DFW","5":"JFK","6":"IAH"},"Latitude":{"0":34.0534896851,"1":25.774810791,"2":33.7483100891,"3":41.8842506409,"4":32.7781486511,"5":40.6445388794,"6":29.7605800629},"Longitude":{"0":-118.2453231812,"1":-80.1977310181,"2":-84.3911132812,"3":-87.6324462891,"4":-96.7954025269,"5":-73.7953567505,"6":-95.369682312}}' | |
gateways_df = pd.read_json(gateways_data) | |
# which is the closest gateway to each city? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment