Okay, so today I’m gonna walk you through my little side project: mercury storm prediction. It was a fun one, a bit messy, but hey, that’s how you learn, right?
It all started when I was just casually browsing some space news – you know, as you do – and stumbled upon an article about space weather and its impact on satellites. Got me thinking, “Could I actually predict something like that, even on a super basic level?” Mercury was kind of the obvious choice, its closer to the sun so it has more storms.
First thing’s first: data. I spent like, forever, searching for publicly available data on solar wind activity. Finally found some from NASA’s space weather API. It wasn’t the cleanest data, dates were all over the place, a lot of missing values, but hey, it was free! I downloaded a bunch of CSV files, which took a while cause the data wasn’t structured.
Next step was wrangling this data into something usable. I fired up Python with Pandas, which, let’s be honest, saved my life. I spent a solid evening just cleaning the data: filling in missing values (used some simple averages), converting dates to a consistent format, and generally making sure everything was in the right place. Messy, tedious work, but super important. I used Jupyter Notebooks for this, cause its easier to see the data.
Now, for the “prediction” part. I knew I wasn’t going to build some crazy sophisticated model. I settled on a simple time series analysis, using a basic ARIMA model from the `statsmodels` library. I know, not exactly cutting-edge, but it was a good starting point, so I used it.
Getting the ARIMA model to work was…challenging. Figuring out the right parameters (p, d, q) for the model was mostly trial and error. I plotted the data, looked at the autocorrelation and partial autocorrelation functions, and just kinda guessed. Lots of “fit the model, see if it looks right, tweak the parameters, repeat” kind of thing. I think I spent a few hours just tweaking stuff
After some tinkering, I finally got the model to produce some vaguely reasonable-looking predictions. I then compared those predictions to actual readings that were taken, and the model had a 65% accuracy, which I guess it good enough considering my budget.
To visualize it all, I used Matplotlib to create some basic plots showing the historical data, the model’s predictions, and the confidence intervals. It wasn’t pretty, but it got the job done. I probably could have used some better charts but those are for later.
So, yeah, that’s my mercury storm prediction project in a nutshell. It was a fun little exercise, and I learned a ton about data cleaning, time series analysis, and the joys of working with real-world, messy data. I am probably gonna make it better later.