Spreadsheet with auto-updating data from web APIs

Hi there. I’m a complete beginner to using LibreOffice Calc and generally a beginner to using spreadsheet programs in general. I want to create an auto-updating spreadsheet that will log weather data.

So ideally, I should have a number of cities and have the following information in different columns:
[CITY NAME] - Average high temperature - Amount of rainfall - Amount of snowfall
Each would be updated daily. Namely, it would input data from a web API call to a website like OpenWeather or OpenMeteo. For the average high temperature, it would find out what the high temperature is for the city per given day, and average it with the value already there. For the amount of rainfall and snowfall, it can simply be additive and just make a gross sum.

And lastly, I would want to be able to sort the data by each of these columns (i.e. click on snowfall and it would order the cities from most snowfall to least, click on high temperature and have it order the cities from highest temperatures to lowest, etc… it’s fine if I need to do something a bit more complex than just clicking as long as I can view the data organized by columns)

Here’s an example of current data for one day that I’d want to update and be able to add more cities to as well as keep updating daily. My computer is in Japanese but the information is in English, so don’t mind that:

Can this be done in LibreOffice Calc? If not, can you suggest a better program to use? Thanks!

seems to be almost off the shelf with google sheets :

with calc, you’d most certainly need to fine tune with macros …

or maybe revive this outdated attempt :