Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Design a solution and implement the solution in Python to solve the problem described below.
Historical data for solar radiation and wind speeds is available (along with other sensor information) in the files that you have been given. Data is logged at intervals of 10 minutes. Each file contains a year’s worth of data for multiple sensors. Data for each date-time recording are on separate rows. Within each row, the value for each sensor is separated by a comma. The sensor codes are shown below.
You have a client who is interested in a program which can give the following answers. You should provide a suitable menu with an exit option in your main program. When designing the output, imagine yourself as the user of the program. You want the user interaction to be user friendly on the command line. Do not use GUI interaction.
1. The maximum wind speed for a specified month and year. (print on screen only)
2. Average wind speed for each month of a specified year. (print on screen only)
3. Total solar radiation in kWh/m2 for each month of a specified year. (print on screen only)
4. Average wind speed km/h and total solar radiation in kWh/m2 for each month of a specified year. (write to a file called “WindandSolar.csv”)
Format: Year,Month,Wind Speed,Solar Radiation
Example format is:
1905 January,5.5,196.4 February,4.5,200.3 …
Year is specified on the first line and the subsequent lines list the month and the average wind speed and the total solar radiation for each month. The values are comma separated.
If data is not available for any month, do not output the month for menu item 4. If the entire year’s data is not available, output just the year but no monthly data. For menu items 1 – 3, output a suitable message indicating what data is not available.
5. Given a Date in the form dd/mm/yyyy, show the times for the highest solar radiation for that Date. Output to screen using this sample format: (There will be one or more time values that are output.)
Time:
10::40
11:30
6. Exit the program.
The date, month and/or year are specified by the user. Your program asks for these on the command line and the user types in the required values and presses the “Enter” key.
Processing:
Your program must first load the data from multiple files. After loading the data, a menu is displayed to the user.