I’ve been settling into my new job nicely. A big part of it has been learning in depth about AWS in preparation for taking the AWS Certified Solutions Architect Associate exam. I’ve been doing some experimenting as part of that.
I seem to be developing an economic theme with these projects but this time we’re dealing with real life. I like to occasionally check how the yield curve is doing, but unfortunately my go to graph for this was taken down recently. The data is publicly available at the US Treasury so it was simply a matter of graphing it.
It’s easy enough to just whip something up with Python and render it with MatPlotLib like before, but I don’t want to have to run a script locally every time and only end up with a static picture. So I took to the cloud. I took my Python script, put it in a Lambda function behind an API Gateway, then made a simple HTML file with Javascript that calls the API and populates a HighCharts graph. The script will always pull the latest data so the results are always up to date.
Here’s the result: yields.paulsulli.com