Pick one numerical attribute, partition the data into groups, compute min/max/mean/median/std of each group, create visualization of these groups/numbers.

Pick one string attribute, compute the frequencies of text data, visualize these frequencies with appropriate bins.

Use Python, Numpy, and Matplotlib

Description for each attribute:

1 Year original data between 1987 2008 (the collected data is only from 2008)
2 Month month of the year (1-12)
3 DayofMonth day of the month (1-31)
4 DayOfWeek 1 (Monday) - 7 (Sunday)
5 DepTime the actual departure time (expressed as local time in the format hh:mm)
6 CRSDepTime scheduled departure time (expressed as local time in the format hh:mm)
7 ArrTime actual arrival time (expressed as local time in the format hh:mm)
8 CRSArrTime scheduled arrival time (expressed as local time in the format hh:mm)
9 UniqueCarrier unique carrier code
10 FlightNum flight number
11 TailNum plane tail number
12 ActualElapsedTime elapsed time of the flight expressed in minutes
13 CRSElapsedTime scheduled elapsed time of the flight expressed in minutes
14 AirTime flight time expressed in minutes
15 ArrDelay the difference expressed in minutes between scheduled and actual arrival time (in case of early arrivals there are showed negative numbers)
16 DepDelay the difference in minutes between scheduled and actual departure time (in case of early departures there are showed negative numbers)
17 Origin origin IATA airport code
18 Dest destination IATA airport code
19 Distance the length of the path of the flight expressed in miles
20 TaxiIn taxi in time expressed in minutes
21 TaxiOut taxi out time expressed in minutes
22 Cancelled indicator of the canceled flights (0- No, 1- Yes)
23 CancellationCode reason for cancellation (A = carrier, B = weather, C = NAS, D = security)
24 Diverted indicates if the flight was diverted (1 - Yes, 0 – No)
25 CarrierDelay carrier delay expressed in minutes
26 WeatherDelay expressed in minutes
27 NASDelay National Air System Delay expressed in minutes
28 SecurityDelay expressed in minutes
29 LateAircraftDelay expressed in minutes

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#graph of the days with most delays
# from numpy import *
import numpy as np
#data = np.genfromtxt("overmiliondata.csv", dtype=float, delimiter=',', names=True)
#data = np.genfromtxt("overmiliondata.csv", delimiter=',', names=True)

data = np.genfromtxt("overmiliondata.csv",, delimiter=',', names=True)
#data = np.genfromtxt("o.csv",, delimiter=',', names=True)
#data = np.genfromtxt("m.csv",, delimiter=',', names=True)
# makes NA -1

#d = np.loadtxt('overmiliondata.csv',delimiter=',',dtype = np.float_,)
#d = np.loadtxt('overmiliondata.csv', delimiter=',', dtype = str)

#print data['Year'].mean()
# data_delayed contains data only for delayed flights
data_delayed = data[data['ArrDelay']>0]
#DayOfWeek 1 (Monday) - 7 (Sunday)
mondays_index = data_delayed['DayOfWeek'] == 1
tuesdays_index = data_delayed['DayOfWeek'] == 2
wednesdays_index = data_delayed['DayOfWeek'] == 3
thursdays_index = data_delayed['DayOfWeek'] == 4
fridays_index = data_delayed['DayOfWeek'] == 5
saturdays_index = data_delayed['DayOfWeek'] == 6
sundays_index = data_delayed['DayOfWeek'] == 7

mondays = data_delayed[mondays_index]['ArrDelay']
tuesdays = data_delayed[tuesdays_index]['ArrDelay']...

By purchasing this solution you'll be able to access the following files:
Solution.csv and

for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats