Giter Site home page Giter Site logo

rides_processing_and_analysis's Introduction

Analyzing the effect of weather on ridership

Types of dependencies:

  • Number and distance of rides by weather conditions
  • Number and distance of rides per day, hour, weekday

Datasets

Processing

Before processing make sure that you have following files at locations:

  • folder ./data exists
  • empty folder ./data/processing
  • empty folder ./data/reduced
  • fodler ./data/weather has extracted files from downloaded ZIP from here
  • folder ./data/yellow_tripdata_2014-01 has extracted file from

The processing of one month of rides includes following steps:

  1. prepare_weather - combine raw files in a single dataset (~3s)
  2. mapping_taxi_rides - mapping of data to groups by: hour, day, weekday, and joining with weather (~1525s, ~25m), from 2.1Gb to 6.8Gb
  3. reducing_taxi_rides - aggregates summary values and merging into less files (~159s, ~2.7m), from 6.8Gb to 123Kb
  4. plot_analysis - draw charts showing correlation between time, rides, distance and weather (~2s)

Under ./src you can find Python project which perform the same processing, utilizing multithreading. Before starting it over, make sure folders have the state as decribed above, and the varibale folder_data set to full absolute path to data folder.

Some techniques in the solution

  • slicing of a big file to smaller in memory optimized appraoch (not loading the whole huge file to memory)
  • reducing files to aggregated ones for analysis
  • grouping of panda dataframe by multiple columns
  • applying different aggregation functions during the same grouping
  • filling gaps in pandas with interpolation

Logic Overview

rides_processing_and_analysis's People

Contributors

xtrmstep avatar

Watchers

James Cloos avatar  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.