Closed Aaaaa501 closed 1 year ago
This would likely rely on the weather API that is used, and hopefully, some type of open-source, free-to-use API can be used (easier, less of a headache, etc.). Just found this open-source weather API, but if that doesn't work, the National Weather Service should work instead (however, this only returns Chicago data, so may be inaccurate at times).
There is also openweathermap which has a very generous free tier for educational purposes. I had actually looked at making a weather card about 4 years ago using it.
There are a lot of free apis, but the main problem I see is that because the school to my knowledge uses a subnet mask, it might be rate limited if we call it each time the website is opened. It might be better if we can cache the data, either on a backend or another website where we can upload the data and call it more frequently.
Here's an idea: We can set up a Github Action to run daily and fetch the weather in Lincolnshire, and create a new commit with something like a weather.json
file that contains the API's response. Then we just serve the weather.json file statically, which will resolve our issue of rate limits, API key security, and of needing to build a backend.
yeah I like that. We already have a hook that rebuilds the project every day - that's how the events tab stays updated. We could just add the weather script into the utils folder and throw it into a json file.
A card with current day's weather and maybe links to a page with more detailed weather