Skip to content

NYC Taxi Data Analysis πŸš–πŸ“Š This repo contains a Jupyter Notebook analyzing NYC taxi trip data using NumPy. It covers speed analysis, fare trends, and payment methods. The dataset (`nyc_taxis.csv`) includerip distances, fares, and timestamps. Clone, install dependencies, and run the notebook to explore insights.

Notifications You must be signed in to change notification settings

pachehitesh/Airport-Cabs-Data-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NYC Taxi Data Analysis πŸš–πŸ“Š

# NYC Taxi Data Analysis πŸš–πŸ“Š

This repository contains a Jupyter Notebook that analyzes NYC taxi trip data using NumPy. The dataset (`nyc_taxis.csv`) contains information about taxi rides, including trip distance, fare amount, and payment methods.

## πŸ“Œ Features & Analysis
- **Load Data:** Import and preprocess NYC taxi trip data.
- **Speed Calculation:** Compute average speed of taxi rides.
- **Ride Count in February:** Filter and count rides that happened in February.
- **Expensive Rides:** Count rides with fare amounts greater than $50.
- **Credit Card Transactions:** Count rides paid via credit cards.

## πŸ“‚ Files
- `analysis.ipynb` - Jupyter Notebook with all the analysis.
- `nyc_taxis.csv` - The dataset containing taxi ride details.

## πŸ› οΈ Installation & Usage
1. Clone the repository:
   ```sh
   git clone https://github.com/your-username/nyc-taxi-analysis.git
  1. Navigate to the project directory:
    cd nyc-taxi-analysis
  2. Install dependencies:
    pip install numpy jupyter
  3. Run the Jupyter Notebook:
    jupyter notebook

πŸ–₯️ Code Overview

Load Data

import numpy as np
taxi = np.genfromtxt('nyc_taxis.csv', delimiter=',', skip_header=True)

Calculate Average Speed

speed = taxi[:, 7] / (taxi[:, 8] / 3600)
mean_speed = speed.mean()
print(mean_speed)

Filter Rides in February

rides_feb = taxi[taxi[:, 1] == 2, 1]
print(rides_feb.shape[0])

Count Expensive Rides

expensive_rides = taxi[taxi[:, -3] > 50, -3].shape[0]
print(expensive_rides)

Count Credit Card Payments

credit_card_rides = taxi[taxi[:, 6] == 2, 6].shape[0]
print(credit_card_rides)

πŸ“Š Data Insights

  • The average taxi speed is approximately 32.24 mph.
  • There were 13,333 rides in February.
  • 16 rides had fares exceeding $50.
  • 11,832 rides were paid using credit cards.

🀝 Contributing

Feel free to fork this repo and contribute by improving analysis or adding visualizations!

πŸ“œ License

This project is open-source and available under the MIT License.


This README provides:
βœ… Clear description 
βœ… Code snippets  
βœ… Setup guide  
βœ… Insights from analysis  

About

NYC Taxi Data Analysis πŸš–πŸ“Š This repo contains a Jupyter Notebook analyzing NYC taxi trip data using NumPy. It covers speed analysis, fare trends, and payment methods. The dataset (`nyc_taxis.csv`) includerip distances, fares, and timestamps. Clone, install dependencies, and run the notebook to explore insights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published