Skip to content

Web API of NYC taxi fare predictor. Usage is described in README.md

Notifications You must be signed in to change notification settings

Guli-Y/NYCtaxifarePredictorAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API for New York City Taxi Fare Prediction

  • example:

If we want to know the taxi fare amount for a trip that starts at 2021-1-2 20:35:00 from location A (latitude=40.733, longitude=-73.987) and ends at location B (latitude=40.758, longitude=-73.991):

trips = [{

      'pickup_datetime': '2021-1-2 20:35:00 UTC',

      'pickup_longitude': -73.987,

      'pickup_latitude': 40.733,

      'dropoff_longitude': -73.991,

      'dropoff_latitude': 40.758

      }]

api_url = 'https://nyc-taxi-fare-predictor-api.herokuapp.com/'

result = requests.get(api_url+"predict_fare", json=trips).json()

output: {'predictions': [11.555]}

note: trips can be a list of dictionaries, each dictionary representing a single trip.

About

Web API of NYC taxi fare predictor. Usage is described in README.md

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published