Assignment 4
Before diving into the programming problems, study the data file. The Bird Strikes Data File is a compressed CSV that contains dates and related data on birds strikes to aircraft. Each row is a bird strike incident. You may use base R or tidyverse functions to solve this assignment.
- (0 Points) Load the data into an appropriate data object of your choice (data frame or tibble). Note that the data file is compressed so you need to determine and appropriate way to uncompress the file as you read it (do not uncompress the file in your operating system). See the resources below to view an article that explains various ways to read compressed files.
- (30 Points) Write a function called strikesByYear() that returns a dataframe containing for each year the number of bird strike incidents.
- (30 Points) Write a function called leastStrikesInaYear() that returns the year which had the least bird strike incidents.
- (40 Points) Write a function called strikesByType() that returns the number of birds strike incidents per type of wildlife (excluding unkown) in a dataframe. Store the return result in a dataframe called Strikes.
Submission Details
- Your submission must contain two files: the .Rmd notebook and a knitted PDF or HTML (from the notebook). Name your .Rmd R Notebook, DA5020.A4.LastName.Rmd and your PDF/HTML DA5020.A4.LastName.{pdf,html}, where LastName is *your* last name.
- The .Rmd file must be fully commented and properly "chunked" R code and detailed explanations. Make sure that it is easy to recognize which question you answer and that your code runs from beginning to end (because that is how we will test it.) Code that doesn't execute, stops, throws errors will receive -- naturally -- receive no points. If the graders have to "debug" your code or spend any effort getting it to run, substantial points will be deducted.
- Not submitting a knitted PDF or HTML will result in reduction of 30 points.
- Not submitting the .Rmd file (or both) will result in a score of 0.