Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

HW #2

Homework Submission Instructions:

●  Submit a Python code notebook that includes all of your answers and code.

●  If you are working in a team, it is acceptable for all team members to submit identical notebooks.

  In the first cell of your notebook, list the names of all team members.

●  You have the option to work alone or in a team. Students are allowed to switch teams if they choose to do so.

Note: It is important to follow these instructions carefully to ensure that your submission is accepted and that you receive proper credit for your work.

Impact of COVID on Air Passenger Demand

Evaluating the impact of COVID on air passenger demand is important for several

reasons:

● Business Planning: Understanding the impact of COVID on air passenger demand   can help airlines make informed business decisions, such as adjusting their capacity, pricing, and route planning strategies, to respond to the changing market conditions.

● Industry Recovery: Assessing the impact of COVID on air passenger demand can      help the industry understand the extent of the disruption caused by the pandemic and the extent to which it has recovered. This information can be used to inform recovery and growth strategies, as well as government policies aimed at supporting the air       transport industry.

● Market Analysis: Evaluating the impact of COVID on air passenger demand can    provide valuable insights into consumer behavior and the broader economic impact of the pandemic. This information can be used to inform investment decisions and inform the development of new products and services.

● Public Health: Assessing the impact of COVID on air passenger demand can help   public health authorities understand the extent to which air travel has contributed to the spread of the virus and inform policies aimed at controlling the spread of the     disease.

Evaluating the impact of COVID on air passenger demand is important for understanding the impact of the pandemic on the air transport industry and for making informed business decisions that can help the industry recover and grow in the post-pandemic era.

Objective:

The objective of this assignment is to evaluate the impact of COVID on the domestic air transport industry and determine if the industry has recovered.

Data:

The data for this assignment will be obtained from the U.S. DOT’s Bureau of                     Transportation Statistics (BTS) website                                                                                    (https://www.transtats.bts.gov/Data_Elements.aspx?Data=1 ). The data will be limited to the domestic air passenger demand data in this assignment.

Data Preparation:

1. Write code to scrape the data from the BTS website.

Note: If you are unsure of how to proceed, instructions can be found in the appendix at the end of this document.

2. Clean and prepare the data for analysis, including removing commas separating   thousands, removing rows that represent annual totals, and removing data starting April 2022.

3. Create two new columns (features): Trend and Time whose values are consecutive integers 1,2, … .

Data Understanding:

4. Plot the monthly domestic air passenger data and interpret the patterns in the data.    Use 12 different colors to represent the 12 different months and add a vertical line to indicate the beginning of the COVID period (COVID period = March 2020 - March 2022).

5. Describe the patterns in the data.

Modeling:

6. Using pre-COVID data (before March 2020), build a regression model that captures the linear trend and monthly seasonality.

7. Create a graph of the pre-COVID data and overlay the fitted/predicted values.

8. Does the graph indicate that your model accurately fits the data?

9. Is the performance of your model adequate? Evaluate its adequacy by analyzing and interpreting the residuals graph and the ACF plot.

10.    Based on the acf and pacf graphs, create features for the model based on the lags of air passenger demand.

11.    Using pre-COVID data (before March 2020), build a regression model that     captures the linear trend, monthly seasonality, and the cyclical component. If you believe your model requires improvement, feel free to make any necessary

adjustments.

12.    Create a graph of the pre-COVID data and overlay the fitted/predicted values.

13.    Does the graph indicate that your model accurately fits the data?

14.    Is the performance of your model adequate? Evaluate its adequacy by analyzing and interpreting the residuals graph and the ACF plot.

15.    Using the final model, evaluate the impact of COVID on the domestic air passenger demand in terms of numbers of passengers and as a percentage.

Has the industry recovered?:

16.    Determine if the domestic air industry has recovered by creating and interpreting a graph of all available monthly domestic air passenger demand data from October       2002 to November 2022 and overlaying the model's fitted/predicted values for the     pre-COVID period, as well as forecasts for the COVID and post-COVID periods.      Briefly explain your conclusion based on the graph.

Grading Rubric:

Data preparation (30%)

Data understanding (20%)

Modeling (40%)

Has the industry recovered? (10%)

Appendix:

The data can be scraped using pandas read_hmlt function:

Website: https://www.transtats.bts.gov/Data_Elements.aspx

If you are using google colab and if it the error message pops up you may need to run

Two extra lines of code before read  html:

import ssl

ssl._create_default_https_context = ssl._create_unverified_context