diff --git a/content/posts/display-tempest-weather-static-site/index.md b/content/posts/display-tempest-weather-static-site/index.md index 62107db..1a49f1d 100644 --- a/content/posts/display-tempest-weather-static-site/index.md +++ b/content/posts/display-tempest-weather-static-site/index.md @@ -1,17 +1,10 @@ --- -<<<<<<< HEAD -title: "Displaying Data from Tempest Weather Station on a Static Site" -======= title: "Displaying Data from a Tempest Weather Station on a Static Site" ->>>>>>> main date: "2024-02-11T20:48:49Z" # lastmod: 2024-02-10 description: "Using a GitHub Actions workflow to retrieve data from an authenticated API, posting results to a publicly-accessible pastebin, and displaying them on a static web site." featured: false -<<<<<<< HEAD -======= thumbnail: "finished-product.png" ->>>>>>> main toc: true comments: true categories: Backstage @@ -21,11 +14,7 @@ tags: - meta - serverless --- -<<<<<<< HEAD -As I covered briefly [in a recent Scribble](https://scribbles.jbowdre.lol/post/near-realtime-weather-on-profile-lol-ku4yq-zr), I was inspired by the way [Kris's omg.lol page](https://kris.omg.lol/) displays realtime data from his [Weatherflow Tempest weather station](https://shop.weatherflow.com/products/tempest). I thought that was really neat and wanted to do the same on [my omg.lol page](https://jbowdre.lol) with data from my own Tempest, but I wanted to do it without including my station ID or API token directly in the client-side JavaScript. -======= As I covered briefly [in a recent Scribble](https://scribbles.jbowdre.lol/post/near-realtime-weather-on-profile-lol-ku4yq-zr), I was inspired by the way [Kris's omg.lol page](https://kris.omg.lol/) displays realtime data from his [Weatherflow Tempest weather station](https://shop.weatherflow.com/products/tempest). I thought that was really neat and wanted to do the same on [my omg.lol page](https://jbowdre.lol) with data from my own Tempest, but I wanted to find a way to do it without needing to include an authenticated API call in the client-side JavaScript. ->>>>>>> main I realized I could use a GitHub Actions workflow to retrieve the data from the authenticated Tempest API, post it somewhere publicly accessible, and then have the client-side code fetch the data from there without needing any authentication. After a few days of tinkering, I came up with a presentation I'm happy with. @@ -619,17 +608,10 @@ For testing this, I can manually alter[^alter] the contents of the pastebin to e ![Local test page reflecting "57°f (13.9°c), feels 67°f (19.4°c)" and "no rain today"](local-test-conditional.png) The final touch will be to change the icons depending on the values of certain fields: -<<<<<<< HEAD -- The conditions icon will vary from to , roughly corresponding to the `icon` value from the Tempest API. -- The temperature icon will range from to depending on the temperature. -- The precipitation icon will be for no precipitation, and progress through and for a bit more rain, and cap out at for lots of rain[^rain]. -- The pressure icon should change based on the trend: , , and . -======= - The conditions icon will vary from to , roughly corresponding to the `icon` value from the Tempest API. - The temperature icon will range from to depending on the temperature. - The precipitation icon will be for no precipitation, and progress through and for a bit more rain, and cap out at for lots of rain[^rain]. - The pressure icon should change based on the trend: , , and . ->>>>>>> main [^rain]: Okay, admittedly this progression isn't perfect, but it's the best I could come up with within the free FA icon set.