Coder Social home page Coder Social logo

yeniherdiyeni / delayed-flights Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tsmith5151/spark-delayed-flights

0.0 1.0 0.0 2.51 MB

Exploring and predicting the probability of flights being delayed at airports across the United States given prior flight records. Apache Spark is used in processing the dataset.

Jupyter Notebook 100.00%

delayed-flights's Introduction

Delayed-Flights

Overview

  • This workbook will explore flight data and predict delayed flights at airports located throughout United States based on previous flight records. The dataset consists of information such as flight arrival and departure times. Additionally, the .dat file for plotting the geographical location of airports in the U.S. can be found here. Python 2.7.11 and the Jupyter Ipython Notebook is utilized to explore, analyze, and visualize the results. This dataset examines flights from 2008, which is roughly 7 million flights! We will worki in the Apache Spark Ecosystem for general data processing and analysis. The .csv file containing the flight data and the airport attributes are imported as separate tables in a local PostgresSQL database for querying.

Software and Libraries

  • Python 2.7.11
  • matplotlib.pyplot
  • iPython Notebook
  • Basemap 1.0.7

Spark

  • Apache Spark is an open source general engine for Big Data processing that is 100X faster than Hadoop MapReduce in memory or 10X faster when running on disk. It provides APIs in Python, Scala, R, and Java. The Spark Ecosystem consists of Spark SQL, Spark Streaming, MLib (machine learning), and GraphX. These libraries can be seamlessly combined in the same application. Spark can run on Hadoop, standalone, or in the cloud; it can also access data sources such as HDFS, Cassandra, and Hive.

  • To install Apache Spark, go here and install the latest version (Spark 1.6.1)

  • Open a terminal and cd into the home directory (cd ~ )

  • Unzip the .tgz file.

tar -zxvf spark-1.6.1-bin-hadoop2.6.tgz
  • If unzipped in Downloads folder, move to home directory
mv spark-1.6.1-bin-hadoop2.6 /Users/name
  • Next open .bash_profile
nano .bash_profile
  • Add the following alias:
export SPARK_PATH=~/spark-1.6.1-bin-hadoop2.6
export PYSPARK_DRIVER_PYTHON = "jupyter"
export PYSPARK_DRIVER_PYTHON_OPTS = "notebook"
alias snotebook = '$SPARK_PATH/bin/pyspark --master local[2]'
  • Save and exit .bash_profile; Update by:
source .bash_profile
  • Note: --master local[2] is referenced to the number of processors that assigned

Exploring the Data:

  • The figure below displays the aiports with more than 70,000 flights recorded in the dataset in 2008. Airports with larger markers represent a higher magnitude of the total number of flights. Darker the marker fill, the higher the probabiity is for increased delayed times when departing from the respected airports. We can see from the geographical plot below that out of the queried airports in the United States, places like DFW, LAX, or ATL tend to have heavier delays and based on past experiences, our data is behaving as expected. As a note, viewing the code inside the flights.ipynb allows the user to zoom further, eliminating some of the overlap of airports observed belows, specifically on the East coast.

alt tab

Machine Learning

  • Prediction model will be added soon (5/6/16)

delayed-flights's People

Contributors

tsmith5151 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.