# File: weatherPlotter.py # # Plots minimum and maximum weather data. # Assumes CSV input has the following columns: # - NAME (e.g., "MINNEAPOLIS ST. PAUL INTERNATIONAL AIRPORT") # - DATE (e.g., "1/19/2023") # - PRCP (e.g., "0.16) <- string representing a float # - SNOW (e.g., "3.5") <- string representing a float # - TMAX (e.g., "32") <- string representing an int # - TMIN (e.g., "27") <- string representing an int # # Author: TODO # # Collaboration statement: TODO # # Inputs: CSV file import matplotlib.pyplot as plt def parseData(filename): """ Opens the CSV file with name filename for reading, and reads in the data. filename: string returns: five lists: - one of dates (strings) - one of precipitation (floats) - one of snow (floats) - one of minimum temps (ints) - one of maximum temps (ints) """ dates = [] precip = [] snow = [] minTemps = [] maxTemps = [] # TODO: Part 2a # your code here return dates, precip, snow, minTemps, maxTemps def plotTempData(minTemps, maxTemps): """ Plots both the minimum and maximum temperature for each day in the same plot. """ # TODO: Part 2b pass # replace with your code def main(): filename = "weatherData.csv" dates, precip, snow, mins, maxes = parseData(filename) plotTempData(mins, maxes) # TODO: Part 2c pass # replace with a call to another plotting function if __name__ == "__main__": main()