Coder Social home page Coder Social logo

road_trip's Introduction

Data

This is a simple dataset of North American (though mostly U.S.) major roads.

city_gps.txt contains one line per city, with three fields per line, delimited by spaces. The first field is the city, followed by the latitude, followed by the longitude.

segments.txt has one line per road segment connecting two cities. The space delimited fields are:

  • first city
  • second city
  • length (in miles)
  • speed limit (in miles per hour)
  • name of highway

All roads in segments.txt are bidirectional, i.e. none are one-way roads, so that it's possible to travel from the first city to the second city at the same distance at speed as from the second city to the first city.

Program

Run

python3 ./route.py [start-city] [end-city] [cost-function]

cost function is one of:

segments tries to find a route with the fewest number of road segments (i.e. edges of the graph).
distance tries to find a route with the shortest total distance.
time finds the fastest route, for a car that always travelsfive miles per hour above the speed limit.

road_trip's People

Contributors

rebecca-my avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.