Question: Python3 Sunspots Data Solar storms can damage satellites. When will the next damaging solar storms occur? Major solar storms are usually associated with peaks in
Python3


Sunspots Data Solar storms can damage satellites. When will the next damaging solar storms occur? Major solar storms are usually associated with peaks in sunspot activity, and sunspot activity is periodic. The next expected peak in sunspot activity is the next likely time for damaging solar storms. Sunspot data has been collected regularly for over 300 years, and the raw data is available on the Web. Early data collection was monthly, but after World War Il daily data collection began, and that is the data we will use. Unfortunately, raw data is noisy so to do a reasonable prediction the data needs to be "smoothed" (explained below). The standard sunspot smoothing is based on monthly averages. Your program will output 2 files, one is the monthly sunspots totaled. The other will be the smoothed sunspots per month. Smoothing functions can be used to eliminate noise Sunspots.csv datafile You are provided an input file called sunspots.csv. This is a comma separated value file. The first value is the year, then the month, then day. The 4th value is a decimal form of the year, which we don't need. The 5th value is the number of sunspots observed. A-1 indicates no observation and will be assumed as zero for our purposes, there may also be non-numeric characters in the field, which can also be counted as zero. (elegantly handle the exceptions) The 6th column will not be used. You can use the .csv module for reading through the file Example 1818,01,01,1818.004, ?,1 1818,01,02,1818.007, ?,1 1818,01,03,1818.010, ?,1 1818,01,04,1818.012, ?,1 1818,01,05, 1818.015, ?,1 1818,01,06, 1818.018, ?,1 1818,01,07,1818.021, ?,1 1818,01,08,1818.023, 39,1 1818,01,09, 1818.026, ?,1 1818,01,10,1818.029, ?,1 1818,01,11,1818.031, ?,1 1818,01,12,1818.034, ?,1 Sunspots Data Solar storms can damage satellites. When will the next damaging solar storms occur? Major solar storms are usually associated with peaks in sunspot activity, and sunspot activity is periodic. The next expected peak in sunspot activity is the next likely time for damaging solar storms. Sunspot data has been collected regularly for over 300 years, and the raw data is available on the Web. Early data collection was monthly, but after World War Il daily data collection began, and that is the data we will use. Unfortunately, raw data is noisy so to do a reasonable prediction the data needs to be "smoothed" (explained below). The standard sunspot smoothing is based on monthly averages. Your program will output 2 files, one is the monthly sunspots totaled. The other will be the smoothed sunspots per month. Smoothing functions can be used to eliminate noise Sunspots.csv datafile You are provided an input file called sunspots.csv. This is a comma separated value file. The first value is the year, then the month, then day. The 4th value is a decimal form of the year, which we don't need. The 5th value is the number of sunspots observed. A-1 indicates no observation and will be assumed as zero for our purposes, there may also be non-numeric characters in the field, which can also be counted as zero. (elegantly handle the exceptions) The 6th column will not be used. You can use the .csv module for reading through the file Example 1818,01,01,1818.004, ?,1 1818,01,02,1818.007, ?,1 1818,01,03,1818.010, ?,1 1818,01,04,1818.012, ?,1 1818,01,05, 1818.015, ?,1 1818,01,06, 1818.018, ?,1 1818,01,07,1818.021, ?,1 1818,01,08,1818.023, 39,1 1818,01,09, 1818.026, ?,1 1818,01,10,1818.029, ?,1 1818,01,11,1818.031, ?,1 1818,01,12,1818.034, ?,1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
