# weatherPlotter.py # # Plots minimum and maximum weather data. # Assumes CSV input has the following columns: # - NAME (e.g., "OWATONNA MN US") # - DATE (e.g., "1/10/2019") # - PRCP (e.g., "0.03") <- string representing a float # - SNOW (e.g., "8") <- string representing an int # - TMAX (e.g., "32") <- string representing an int # - TMIN (e.g., "13") <- string representing an int 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: three lists: - one of dates (strings) - one of minimum temps (ints) - one of maximum temps (ints) """ dates = [] minTemps = [] maxTemps = [] # TODO: Problem 2a # your code here return dates, minTemps, maxTemps def plotData(dates, minTemps, maxTemps): """ Plots both the minimum and maximum temperature for each day in the same plot. """ # TODO: Problem 2b pass # replace with your code def main(): filename = "weatherData.csv" dates, mins, maxes = parseData(filename) plotData(dates, mins, maxes) if __name__ == "__main__": main()