84 karma · joined December 22, 2018
Based in York, UK (remote).
jacobunwin [at] fastmail [dot] com
The short code in the URL is generated at search time, and maps to a location name, lat/long, altitude etc. within a table. It’s generated off of the location name, so two people searching for the same place get the same short code.
The short code enables a forecast lookup to be a SQLite DB read, followed by a single API call for the forecast.
A more descriptive URL would have required two sequential calls - one to figure out the lat/long and/or place name, and another for the forecast. This wasn’t a huge speed problem, but I struggled to find geocoding APIs with generous free tiers or reasonable low volume pricing. It would have also made the forecast at a given URL somewhat non-deterministic, as the geocoding API could change its output or preferred result over time.
Short codes quite possibly wasn’t the right solution. It’s definitely something I’ll think more about. Thank you!
OOI, would you expect the output to include a single days weather (like the site does now), multiple, or options for both?
I’m starting to think about dedicated sub pages that cover these use cases, with a single section on the main page that links into it. A sailing based page could definitely work here!
Open-meteo has a very generous free tier, and reasonable pricing. It also lets you fetch weather from previous days, which I’ve included so you can see if it’s relatively hotter/colder etc. than yesterday.
I’ll take a look though at whether there’s anything causing fundamental slowness in the cache read / page rendering pipeline.
I agree, it’s definitely something to work on as it takes up a considerable amount of vertical space.
I found the precipitation chart challenging as you need to present both the forecasted precipitation, and the potential likelihood of the precipitation occurring. Something I’ve considered is using a horizontal graph with different shades of grey through black in each bar to represent the probability, but it would somewhat reduce accessibility.
This functionality is called ‘break back’ in a lot of enterprise modelling software. See [IBM TM1](https://www.ibm.com/docs/en/cognos-planning/10.2.1?topic=bre...) and [Anaplan](https://help.anaplan.com/breakback-1b7aa87d-aa13-49f6-8f7d-d...). They generally work in terms of scaling the inputs to match the new output though, which is a bit more basic than this approach.