Weathered Chimo

By chimo on (updated on )

So I haven't been on here for a while, huh?

For the most part, I haven't touched this whole "*.chromic.org" environment since my last post in September. I don't think this post is indicative of a "return to a regular schedule".

So what am I doing here then? I found a draft post I'd started almost a year ago, around the time I was messing with weather data and wrote the Weathered Radio post. I figured I'd get it done and, who knows, maybe I'm wrong and I'll start posting more. So let's cut the crap and get to it, shall we?

This post is very specific to the Environment and Climate Change Canada (ECCC)'s data, so might not be very interesting or relevant to many people, but as always, these posts are mostly about reminding me how my own stuff works.

The recurring theme on this blog is about self-hosting the data that I'm using. Unfortunately, I can't really go out and setup weather stations all over the place, so next best thing is to consume external data in a way that reduces the number of third-parties/tracking/etc.

In short, I have a small PHP script that takes a pair of latitude/longitude coordinates, finds the closest ECCC weather station and returns the current temperature.

This in itself isn't very interesting, but the process of collecting the weather station data was a fun exercise (an exercise that wouldn't have been necessary if they'd just provide an API... but hey, whatever.) It was also the first time (or one of the few times) using PostGIS, so that was also fun.

Most of the work is done via the import_sites.php script. It parses ECCC's "siteList" XML file, then fetches and parses each weather station's XML file to extract its location. It then inserts the weather station's information into the postgres database.

That's pretty much it. Pretty simple, turns out.

Recent articles from blogs I follow

The Scunthorpe Problem

I was talking with a friend recently about an email of theirs running afoul (🐔) of another aggressive filter system, because they dared to to talk with someone called Dickson. I know right, they’re the absolute worst. For those unfamiliar, this is the The…

via Rubenerd November 21, 2024

In which Neil is surprised by the lack of an HDMI cable

Some modern technology decisions baffle me. Today, I was sitting in a meeting room. In the room was my friend, with her laptop. Her laptop has an HDMI port. Also in the room was a screen, onto which my friend wished to display her laptop’s desktop. The screen …

via Neil's blog November 19, 2024

Helm: JSON schema generation

Helm charts support the inclusion of a values.schema.json file to validate values.yaml. Documentation: https://helm.sh/docs/topics/charts/#schema-files A JSON schema is akin to defining the structure of and type-annotating a JSON file. It helps to “shift lef…

via not just serendipity November 14, 2024