Giter Club home page Giter Club logo

cs581-database-management's Introduction

CS581 Database Management Systems

Team 3 - Keshav Malpani, Prateek Shekhar Akhauri, Kruneet Patel, Maithreyi Rajagopalan

This project evaluates ride-sharing algorithms on spatio-temporal data. The raw data in this case represents nearly 10 million trips in New York City, which cuts down to 188.6 thousand after cleaning the dataset. A maximum of 4 passengers would be allowed per trip and a maximum of two trips will be combined. Only the static trips are considered.

The ojective of this project is to compare the merged trips with the individual trips to:

  1. determine the total distance by ridesharing
  2. estimate the total number of trips saved
  3. Study the impact of social scoring on the merging.

Download original data from: http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml

Initial Data Set-up

  1. Data Clean-up A clean up script datacleanup.py is run on the original data to filter out trips originating around JFK This is the first script to be run.

  2. OSRM OSRM is set up on a linux machine using the docker machine and is up and running, accepting requests.

  3. Data Preprocessing datapreprocess.py finds distances from a single point source (A possible terminal at JFK) to the original destinations. OSRM is used to find the trip distance and duration taken to reach the destination. This is the second script to be run on the cleaned data. This creates a dump csv file to load the database with the needed data.

  4. Data Preprocessing - Walking osrm_nearest.py calculates a possible list of drop-off points that are available that meet the walking threshold per trip and appends it to the CSV from Step 3.

  5. Database - MySQL tripdetails.sql - Creates the tripdetails table and needed indexes to hold data. dumpdata.sql - This script loads the table with data created from step 4. These scripts are executed in the order mentioned below.

Please ensure that all the data files are on the same directory containing the script.

To use the 'algorithm.py' file, use the following parameters: Before running algorithm.py, ensure that OSRM route server is running and ready to accept requests.

algorithm.py -walk 1 -w 0 -d 8 -hr 0 -hd 23 -o 5_1.txt

-walk 1 or 0 to control walking - default 1

-w 0 - 5 . 0 if you want hourly; 1 if u want for 1st week; 2 if you want first 2 weeks...

-s - 1 or 0 to control social score - default 1

-ss Floating values to control social score weightage - default 0.15 (15%). Please use -s as 1.

-p 3 5 7 default 3

-d - if you choose hourly by giving week as 0, then 1 - 31 corresponding to the day. Please select w as 0.

-hr - begin hour (0-23)

-hd - delta hours (1-23). So you can give 0 1 for 12-1; 8 2 for 8-10 and 0 23 for the whole day.

-o output file to dump results You can use -h to see usage.

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.