Skip to content

ehernandezvilla/uber-estimate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Uber Price Estimation Project (Is possible than the API library is not longer working - deprecated)

Table of Contents

  1. Introduction
  2. Installation
  3. Usage
  4. Code Structure
  5. References

Introduction

This project aims to estimate Uber prices using Uber's API and store the data in a MySQL database. The code fetches price estimates for a specific route and stores various metrics like distance, duration, low and high estimates, and more into a MySQL database.

Installation

Requirements

  • Python 3.x
  • MySQL
  • Uber API Token

Steps

  1. Clone the repository
    git clone https://github.com/your-repo/uber-estimate.git
  2. Install the required Python packages
    pip install -r requirements.txt
  3. Set up MySQL database and replace the credentials in the code.

Usage

Run the main script to start fetching and storing Uber price estimates.

python main.py

Code Structure

  • main.py: The main script that runs the price estimation and database storage.
  • config.py: Contains configuration variables like MySQL credentials and Uber API token.

Functions

  • get_uber_estimate(): Fetches the Uber price estimates
  • convert_to_dataframe(): Converts the JSON response to a Pandas DataFrame.
  • calculate_metrics(): Calculates various metrics like average price, duration, etc.
  • insert_into_db(): Inserts the calculated metrics into the MySQL database.

References

About

Uber-estimator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages