Question: Contents 1 Task 1 2 Optional Features (**) 2 3 Artefacts 2 4 Intended Learning Outcomes 3 1 Task Download the following data file from
Contents 1 Task 1 2 Optional Features (**) 2 3 Artefacts 2 4 Intended Learning Outcomes 3 1 Task Download the following data file from our unit site (Learning Resources Data): nycflights13_weather.csv.gz It gives the hourly meteorological data for three airports in New York: LGA, JFK, and EWR for the whole year of 2013. Columns are: origin weather station: LGA, JFK, or EWR, year, month, day, hour time of recording, temp, dewp temperature and dewpoint in degrees Fahrenheit, humid relative humidity, wind_dir, wind_speed, wind_gust wind direction (in degrees), speed and gust speed (in mph), precip precipitation, in inches, pressure sea level pressure in millibars, visib visibility in miles, time_hour date and hour (based on the year, month, day, hour fields) formatted as YYYY-mm-dd HH:MM:SS (actually, YYYY-mm-dd HH:00:00). However, due to a bugin the dataset, the data are shifted by 1 hour. Create a single Jupyter/IPython notebook (see the Artefacts section below for all the requirements), where you perform what follows. 1. Convert all columns so that they use metric (International System of Units, SI) or derived units: temp and dewp to Celsius, precip to millimetres, visib to kilometres, as well as wind_speed and wind_gust to km/h. Replace the data in-place (overwrite existing columns with new ones). 1 2. Convert the time_hour column (in-place) to the datetime64 type and then subtract one hour so that data match the information stored in the month, day, and hour fields. 3. Compute daily mean temperatures (360+ average temperatures for each day separately) for the JFK airport with missing hourly temperature measurements ignored (removed) whatsoever (e.g., mean of [10, NaN, 20] is simply 15). 4. Present the daily mean temperatures (360+ data points) in a single plot. The x-axis labels should be human-readable and intuitive (e.g., month names). 5. Find the five hottest days. 6. Compute the daily mean temperatures also for the EWR and LGA airports. 7. Draw the daily mean temperatures for the 3 airports in the same plot (three curves of different colours). Add a readable legend.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
