Giter Club home page Giter Club logo

mta-eda's Introduction

Exploratory Data Analysis of MTA Turnstile Data

Abstract

The goal of this project was to find the specific places in the New York City area that my client, street performer and violinist Karolina Protsenko, should perform in order to maximize the amount of foot traffic that would see her performances. I used turnstile data from the Metropolitan Transit Authority (MTA) in October - December 2021 in order to determine the stations and times of day with the most people entering and exiting. I used the Python library Plotly to visualize and communicate the results through interactive line plots and a geographic map.

Design

Karolina Protsenko is a street performer and violinist. She is interested to know where exactly she should perform in NYC such that she reaches the largest audience possible. Exploratory data analysis on MTA turnstile data would provide insights on the most populated locations, days of the week, and times of the day for Karolina to perform.

Data

The MTA dataset contains cumulative turns per turnstile for all MTA stations over the course of 91 days. Turnstile identification, station, date, time, entries, and exits are included. Most turnstiles were measured every four hours, though there were many exceptions. Entries and exits were combined in analysis, as this client is concerned with total traffic in a particular area of the city. Times were important in order to inform the client what times of day are most crowded. The most recent three months of data, October through December 2021, were included because this client is interested in performing soon, and historical data may not provide accurate predictions for today due to differing traffic patterns throughout the pandemic. I also included a dataset of pedestrian-only streets from NYC Open Data in order to map pedestrian-only streets on top of the most populated stations to visualize proximity.

Algorithms

A thorough exploratory data analysis was performed of MTA turnstile data. Cumulative turnstile entries and exits were used to calculate the total number of people entering and exiting the station in a given duration of time. Each station contains many turnstiles, so all turnstiles for a given station were combined to produce a value for the entire station. Stations were then ranked according to the total number of people entering and exiting to provide the most populated stations. The total foot traffic in the five most populated stations were plotted as a function of time over the course of a day to indicate the times of day with the most traffic.

Tools

  • DB Browser for SQLite for extracting and transforming raw data
  • SQLAlchemy for querying database into Python
  • Pandas for data manipulation, cleaning, and analysis
  • Matplotlib for plotting
  • Plotly for interactive visualizations
  • Geopy for finding latitude/longitude of street addresses
  • RISE for presenting

Communication

RISE, a Jupyter Notebook slideshow extension, was used to present slides and interactive visuals.

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.