Weather broadcast graphics and alerts automation
Feb 2022 - Oct 2024 · Delivered · 12 separate engagements with the same client
Developer, graphics engine, API integration and scheduling
A long-running automation system for a weather channel operator that composites broadcast graphics, plots live forecast data and posts alerts on a schedule.
- Python
- Pillow
- ffmpeg
- Requests
- PyInstaller
- Automation
Overview
A long-running automation system for a weather channel operator, built in stages across two and a half years and twelve separate engagements with the same client.
The problem
The operator needed broadcast graphics generated automatically on a schedule, with nobody opening a design tool. The output had to look produced rather than generated, and it had to keep running without supervision.
What I built
Image compositing that layers imagery from multiple sources into one finished graphic, live forecast and current-conditions data pulled from a weather API and plotted onto it, a full text styling system, aggregation of repeated readings, forward forecasting onto separate graphics, video export, and an alerting system that generates headlines and posts them to social platforms on a schedule.
Complexities tackled
It has to run unattended for years, not demo once. Everything is driven by JSON configuration, so new locations, layouts and schedules need no code changes at all. Several instances run concurrently for different locations. The client changes what he needs far more often than he can wait for a developer.
Disk is finite and nobody notices until it is not. A generator producing images on a schedule will fill a disk eventually. The output buffer keeps a fixed number of recent files and rotates the oldest out, which sounds trivial and is the difference between a system that survives a year and one that stops on a Sunday.
Typography is the product. Weather graphics live or die on whether the numbers read at a glance. That is why the styling system covers font, size, weight, italics, underline, glow, outline, colour and alignment, with values rendered together with their units and labels. “Make the wind speed slightly bolder” should never require a developer.
Aggregation, not just display. Several readings for the same measure have to sum into one figure rather than printing three numbers next to each other, and forecasts have to render a configurable number of hours ahead onto their own graphics.
Somebody else’s API decides your uptime. The system depends on an external weather API on a schedule, so partial responses, rate limits and outages are ordinary conditions rather than edge cases.
Stack
Python, Pillow for compositing, ffmpeg for video export, weather API integration, JSON-driven configuration, scheduled execution.
Client feedback
Verbatim from the public review left on the completed contract. Clients are not named because the contract record does not carry names.
Great work, once again. Program turned out better than expected. Great visualization tools in python with custom styling. Can’t wait for the next project (actually ongoing!) have used him several times and plan to hire again!!! HIGHLY RECOMMEND !!
Working on something similar?
Tell me what you are building and what is in the way. I will tell you honestly whether I am the right person for it.
Last updated: