solarspots

Philippe Back
June 19, 2015

Solar spots, what's that?

This application shows the average number of solar sun spots over time as they are appearing on the surface of the sun per month.

It also tries to fit models on the data to:

  • identify the overall trend
  • see how well a cyclical fit matches

The metric is the SSN which stands for Solar Spots Number.

See the Solar Science website for details.

The data

The data is not the data from the datasets library, but an up to date version in TXT format.

The data covers the period from 1749 to 2015. There is data for every month.

sunspots <- read.table('data/spot_num.txt',header=TRUE)
summary(sunspots$SSN)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00   15.70   42.40   52.09   76.50  253.80 

The solar cycle

We need a way to fit that cyclic data. The solar cycle is said to be 11 years. We have a data point per month, so for the fit, we need to introduce \( sin(2 \pi \omega t) \) and \( cos(2 \pi \omega t) \).

\( \omega = 1 / (12 * 11) \) with \( t \) evolving along the sequence of the data.

plot of chunk unnamed-chunk-2

The fit

plot of chunk unnamed-chunk-3

The straight line shows a linear fit and gives the trend over the selected period. The other fit shows a cyclical pattern combined with a 3rd order polynomial.

The application

The application is on ShinyApps.io

The code is on GitHub