Skip to content

CompTools/PS2-cool-codes

Repository files navigation

Problem Set 2

Group project

This is a group project. You should work in groups of 2 to 4 (not alone and not more than 4). If this is a problem, please let me know ahead of time.

Please enter the names of the group members here:

  1. Giselle Rojas
  2. Nathalie Alomar
  3. Jonathan Gitzendanner

Due date

It is my hope that is can be turned in on Friday, May 22nd, but I will take it until May 26th at the latest.

The dataset

I have provided a dataset that you will use for this. The dataset and it's description are on the cluster as well as in github.

  • The dataset is at: /ufrc/bsc4452/share/Class_Files/data/flights.May2017-Apr2018.csv
  • The metadata (description of the data) is at: /ufrc/bsc4452/share/Class_Files/data/flights_metadata.md

Instructions

The goal of this project is to write a Bash script that does the following:

  1. Counts the number of flights that were delayed more than 15 minutes into or out of Gainesville, FL (airport code GNV) during the timeframe covered by the dataset. (2 points) 804

Grading: 2pts

  1. Produce a table (text is fine) with the data to fill in this table (13 points):
GNV to: Total flights Total flights delayed (>15min) Total flights delayed due to Weather
ATL 1476 262 1229
CLT 476 90 1
MIA 205 33 0

Grading note: Your grep worked, but you had a logic flaw in the if statements. 0.00 is ontime, but blank is also ontime--your script counted blanks as late. Also seems like you did different things to answer the question for each city.

  1. Within a function, print a list of all unique airport codes contained in the dataset. (3 points) grep [A-Z] /ufrc/bsc4452/share/Class_Files/data/flights.May2017-Apr2018.csv | cut -f 3 -d "," | sort | uniq

Grading: 3pts

  1. Within a function list the cities in Florida that have airports in the dataset. (2 points) grep FL.*FL.*FL.*FL /ufrc/bsc4452/share/Class_Files/data/flights.May2017-Apr2018.csv | cut -f 4,5 -d "," | sort | uniq

Grading: 2pts. Your grep is kind of complex and misses West Palm Beach

Bonus question: Asks for user input (see chapter 28) to enter either a airport code or city, state name and then calculates the number of flights as in question 1. (5 points extra credit)

To submit

You should submit your answer as one or more scripts in a git repository. Submit the link in Canvas.

You should start in Canvas, creating your group and then create the same group in github.

Be sure to edit this README.md file with the names of the group members.

Grading

For questions, 1, 3 and 4, I will mostly be looking for the right answer.

Your score on 1,3,4 (I'll fill this in when I grade):

For question 2, you will receive points for:

Rubric item Points Your score
Using github 1 point 1
Having at least one commit from each member of the team 2 points 2
Using meaningful commit messages 2 points 2-in the future, use something more than "updated X". What was changed??
Using functions correctly 2 points 0--no functions
Using comments in code 2 points 2--no comments but fairly clear
Using spacing to make code readable 2 points 2
Getting the correct answer 2 points 1.5
Total for question 2 13 points 11.5

Extra credit: no extra credit

Total points: 18.5/20

About

PS2-cool-codes created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages