I was using the OpenWeatherMap API for an automation project and I seen they also provide weather map layers, so I adapted the Mapbox Module to add these as additional layers.
The layers are not particularly interesting at farm zoom level, but perhaps could be useful with a map zoomed out to cover the greater region. Could probably make more sense eventually to create a weather page perhaps with forecast widget and the possibility to record weather data from the API and/or manual sources/sensors etc.
This is awesome @Farmer-Ed! I wonder if we should consider merging these layers into the farm_weather module (which still needs to be ported to v2). I’ve always figured that could become a more general module that provides lots of weather features.
One of the considerations with a weather module is where data is/isn’t accessible. For example, the NRCS module adds soil survey layers, but only for the United States. So making sure we think globally is always important when we create “general” modules.
FWIW I’ve also considerred merging farm_weather into farmOS core… I could see it being a few modules actually. farm_quick_weather for the precipitation quick form, maybe farm_map_weather for the OpenWeatherMap layers? (Similar to how we include OpenStreetMap layers in default farmOS)
I believe OpenWeatherMap is a global service, I know their Irish weather Data is just taken directly from the MET Éireann API which I could just as easily access, but at least using OpenWeatherMap a module should be more general. A core weather module or modules would be cool too.
I looked at the NRCS module too, obviously it unfortunately is not much use to me, there is soil data available here but adding it to a map may be a challenge, I was considering creating a custom map for my use using mapbox then bringing it into farmOS, my working with the OpenWeatherMap module is as much about experimenting with importing existing layers before I try creating my own custom ones.
They have a lot of different map layers to choose from but they all end up missing tiles on rendering, not sure if this is the “under construction” bit or just me it’s different area’s at each zoom level.
Some off the layers are just the Nordic region though and even layers with global layers revert to Nordic if the Time parameter is used to select a time over an hour in the past.
@mstenta or @Symbioquine I presume the farmOS Map only renders once per page load for performance reasons which would make sense for most Mapping and survey layers, but can a weather module periodically call the map to re-render to track weather systems? or would that require some modification of the core map module?
Of course I could always cheat and use a windy.com iframe
There is plenty of API’s that do this, but doing it well on a free tier could be another story. OpenWeatherMap has far more layers on a Premium tier but I’m not sure I’d need these features badly enough to pay.
It’s probably not going to be a major issue to be fair, most free API’s will probably be hourly or half hourly probably more frequent for some premium sources. But a more advanced use case might be forecast layers so the ability to refresh the map based on a time input may be useful without needing to refresh the entire page.