This homework assignment builds on the work you have done with matplotlib in module 13, and in turn will help you to complete the programming task that will serve as the final project in this course....

This homework assignment builds on the work you have done with matplotlib in module 13, and in turn will help you to complete the programming task that will serve as the final project in this course. Your task is to create a program to plot some data from a spreadsheet. 1. Using the attached CSV (energy.csv ) file on energy production as your data file, read the CSV data into a list of dictionaries. The path to the CSV should be supplied by the user as the first command-line argument. 2. Allow the user to specify which state's data they are interested in, by supplying a second command-line argument that is the state's abbreviation. For example, if the user wants to see the trend for Maryland they would run the program like this: "python3 yourprogram.py energy.csv MD". This would run the program yourprogram.py using energy.csv as the data file and plotting the data in the rows with the state abbreviation "MD". 3. The program should plot the MWH production values for wind and solar energy over time. In order to do this for the chosen state, and plotting growth in the Wind and Solar energy sectors, you will need to filter the spreadsheet's data to find the rows that match the criteria you are looking for. First, you want to focus only on rows that have "Total Electric Power Industry" in the "Type of Producer" column, ignoring any other rows. Then, you'll want to select rows that match the state you are looking for in the "State" column, and the "Energy Source" you are plotting (either "Wind" when plotting the wind line, or "Solar Thermal and Photovoltaic" when plotting the solar line. You should assemble two lists, one containing the year from the column marked "Year" and the other containing the energy produced from the column "Megawatthours"
May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here