# weatherPlotterExtension.py # # Plots monthly 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 from weatherPlotter import parseData def buildDictionaryByMonth(dates, temps): """ Returns a dictionary mapping month number (January is 1, etc.) to a list of temperatures for that month. """ return None # TODO def plotMonthlyData(minTempsDict, maxTempsDict): """ Plots both the minimum, average, and maximum of each of the minimum temperatures maximum temperatures for each month. """ pass # TODO def main(): filename = "weatherData.csv" dates, mins, maxes = parseData(filename) monthToMinTempsMap = buildDictionaryByMonth(dates, mins) monthToMaxTempsMap = buildDictionaryByMonth(dates, maxes) plotMonthlyData(monthToMinTempsMap, monthToMaxTempsMap) if __name__ == "__main__": main()