Python Project BUSI 300: Information Technology Include all questions and their answers in your Python script using print statements. The dataset for this project contains the following airline safety...

Need my Python assignment completed.


Python Project BUSI 300: Information Technology Include all questions and their answers in your Python script using print statements. The dataset for this project contains the following airline safety data for several airlines: airlineNames Airline (asterisk indicates that regional subsidiaries are included) SeatsKMperWk Available seat kilometers flown every week Incidents8599 Total number of incidents, 1985–1999 FatalAcci8599 Total number of fatal accidents, 1985–1999 Fatalities8599 Total number of fatalities, 1985–1999 Incidents0014 Total number of incidents, 2000–2014 FatalAcci0014 Total number of fatal accidents, 2000–2014 Fatalities0014 Total number of fatalities, 2000–2014 Part 1 Type the following Python script into Jupyter Notebook to import the data to your computer. Next, type the code that is in the picture below. You will need to correct the print command. a. Examine your output and then explain what MaxF=np.max(Fatalities0014) does. b. Examine your output and then explain what i=np.flatnonzero(Fatalities0014==MaxF)does. c. Using the output from the corrected above code, answer the following: Which airline has the highest number of fatalities between 2000 and 2014. Copy the web link after pd.read_csv to your internet browser to view the data in Excel. Using it, from 2000 to 2014, how many airlines were had the maximum fatalities and how many had the minimum fatalities? d. Copy and paste the Python script that you used to answer c. Alter this to code to compute MaxF and MinF for the period 1985 to 1999. Using the output from the altered code, answer the following: Which airline had the highest number of fatalities between 1985 and 1999. Referring to the data in the downloaded Excel file, from 1985 to 1999, how many airlines were had the maximum fatalities and how many had the minimum fatalities? e. Examine your output and then explain what df=pd.DataFrame(i) does. f. Examine your output and then explain what N=df.shape[0] does. g. Using the information in the Excel file, what was the best airline in both periods? Keep in mind that big airlines will generally have more issues than small airlines because smaller airlines have fewer passengers and fly fewer miles. Part 2 Write a Python script that creates the 2 figures below. An example of the script for the plots is given in the picture below. When typing this script in Jupyter Notebook, replace each # in the picture of the script with a variable name or number that is appropriate for each scenario. Figure 1 will look similar to the scatterplots we did in the Python tutorials. • x = Incidents8599 • y = Incidents0014 • Note: SeatsKMperWk sizes of the dots Figure 2 will look similar to the scatterplots we did in the Python tutorials. • x = Fatalities8599 • y = Fatalities0014 • Note: SeatsKMperWk sizes of the dots After you correct the code in the box above, run the script to generate the 2 plots. a. In the statement that defines m in your code divide SeatsKMperWk by 5000000. Rerun the script. Explain why the first set of plots had no dots, but the second does. b. In the statement that defines m in your code divide SeatsKMperWk by 10000000. Rerun the script. What happened to the dots? c. In the statement that defines m in your code divide SeatsKMperWk by 20000000. Rerun the script. What happened to the dots? d. Change alpha=1 to alpha=0.7. What happened to the dots? e. Change alpha=1 to alpha=0.5. What happened to the dots? f. Change alpha=1 to alpha=0.3. What happened to the dots? g. After you decide which pair of Figures 1 and 2 tell the best story, include only those two figures in your final output. Part 3 Write Python script to calculate the range (range = maximum value – minimum value), mean, and standard deviation of each of the quantitative variables in the data. Use the example script in the picture below. It prints and calculates the range of the first variable in the data. • After you write the second print command in this picture, you will have to copy and paste it 6 times in Jupyter Notebook. After that, change SeatsKMperWk in each successive line to the names of the other variables. The output should give seven ranges, one for each of the variables. In each print statement, you will need to change the 0 in headers[0] to 1, 2, 3, 4, 5, 6, or 7. • Repeat (a) for the seven means. • Repeat (a) for the seven standard deviations. • Use the Python output above to answer the following questions. Again, include all questions and their answers in your Python script using print statements. Write Python script to calculate the correlations of the three variables in Figure 1 and the three variables in Figure 2. Use the example script in the picture below. “CpIfI” in the script is short for “Correlation of past Incidents and future Incidents.” You will need to copy and modify this line of code five more times. You will have to do the same to the third line of code in this picture. a. Use Figure 1, the three correlations you computed for the variables in the graph, and this marketing article to answer the following: Characterize the correlation between the number of incidents in the early period and the later period, the number of incidents in the early period and airline size, and the number of incidents in the later period and airline size. b. Use Figure 2, the three correlations you computed for the variables in the graph, and this marketing article to answer the following: Characterize the correlation between the number of fatalities in the early period and the later period, the number of fatalities in the early period and airline size, and the number of fatalities in the later period and airline size. c. Together, what do the decreases in mean incidents and the standard deviation of incidents imply? d. Together, what do the decreases in mean fatalities and the standard deviation of fatalities imply? e. Using the figures, the means, & the standard deviations, explain how air travel has changed. Here is an example of how you put the questions in this project in Python output: After you code the questions and your answers to those questions into your script using print statements, save the file in Anaconda Jupyter Notebook as you did for the Python tutorials. Submit the HTML file to the Canvas dropbox. I need to see your script and your output in the HTML file that you submit to Canvas. https://link.springer.com/article/10.1057/jt.2009.5 https://link.springer.com/article/10.1057/jt.2009.5 https://link.springer.com/article/10.1057/jt.2009.5 https://link.springer.com/article/10.1057/jt.2009.5
Mar 13, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here