Giter Site home page Giter Site logo

day-14-pyspark-big-data-analytics-2's Introduction

Airline Customer Analysis

This repository contains the analysis of airline customer behavior and loyalty program engagement. The analysis uses datasets including calendar data, customer flight activity, and customer loyalty history. The goal is to derive insights and visualize trends to improve customer engagement and business strategies.

Table of Contents

Installation

To run the analysis, you need to have Python and the following libraries installed:

pip install pyspark plotly

Data Preparation

Ensure you have the following CSV files in a directory named data:

  • calendar.csv
  • customer_flight_activity.csv
  • customer_loyalty_history.csv

Usage

Run the script analysis.py to perform the analysis:

python analysis.py

The script will generate visualizations and save the results in the analysis_results directory.

Analysis

Total Flights per Year

total_flights_per_year

  • Description: Analyzes the total number of flights booked per year.
  • Graph: A line plot showing the trend of total flights over the years.
  • Insights:
    • Steady increase in the total number of flights from 2017 to 2018.
    • Indicates a growing customer base or increased travel frequency.
  • File: total_flights_per_year.png

Average Distance Traveled per Loyalty Card Type

avg_distance_per_card

  • Description: Calculates the average distance traveled by customers based on their loyalty card type.
  • Graph: A bar chart displaying the average distance for each loyalty card type.
  • Insights:
    • Aurora cardholders travel the most on average.
    • Small differences between the average distances for each card type.
  • File: avg_distance_per_card.png

Monthly Flight Activity Over Time by Loyalty Card Type

monthly_flight_activity_by_loyalty_card

  • Description: Analyzes monthly flight activity for different loyalty card types over time.
  • Graph: A line plot showing the monthly flight activity for Aurora, Nova, and Star cardholders.
  • Insights:
    • Star cardholders have the highest flight activity.
    • All card types show peaks around mid-2017 and mid-2018, with dips towards the end of each year.
  • File: monthly_flight_activity_by_loyalty_card.png

Recommendations

  • Engagement Strategies:

    • Star Cardholders: Maintain loyalty through exclusive benefits and rewards.
    • Nova Cardholders: Offer targeted promotions during low activity periods.
    • Aurora Cardholders: Continue efforts to engage and increase their flight activity.
  • Seasonal Promotions:

    • Introduce mid-year promotions to capitalize on peak travel periods.
    • Implement end-of-year campaigns to mitigate the dip in flight activity.
  • Further Analysis:

    • Conduct deeper analysis to understand factors influencing travel patterns.

day-14-pyspark-big-data-analytics-2's People

Contributors

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