Oliver Hall

atlas channels – a guide

TV channels. It used to be so simple. Here in the UK, you had your choice of 2/3/4/5 channels (delete as appropriate for age bracket) when growing up. You knew them, they were your friends, always dependable, always on the same channel numbers. Then some bright spark invented more of them. Now, in Atlas, the number of channels we have records for is hovering around the 1300 mark, and is still heading upwards. So how on earth do you keep track of them all?

good ol’ groupings

Fortunately, someone came up with the concept of channel groups. Contrary to no-one’s expectations, they are groups of channels, and in our case come in two flavours: Platform (i.e. TV Provider—think TalkTalk, FreeView, Sky); and Region (what it says on the tin). Thanks to a comprehensive data feed from the Press Association, we have full data on not only all of the channels, but who gets which channels where. Handy, huh?

So, how does one get some of these ‘ere Atlas channels? There’s an endpoint just for you, complete with pagination and all the trimmings. However, the more observant amongst you may note that these channels are keyed by id. Yep, we’ve got IDs here. How do you go about looking up Atlas’ highly informative entry on BBC One London then (apart from memorising a table of 1300+ four-character codes)?

have a little patience…

The route to such things lies in our friends: the channel groups. By virtue of the type parameter on the channel_groups endpoint, you can obtain a list of just the Platforms that we have in Atlas. This, handily, will give you a list of Regions for each entry returned. So you simply scroll through a short list until you find your chosen Platform, then select your Region. “Why this palaver?”, you may ask. Well, thing is, every Platform (and almost every Region) is different. Some have subtly differing channel numberings, some have different selections of channels, regional variants, you name it. Simply put, there is no canonical list of channels for all Regions and Platforms.

Anyhow, you should now have obtained yourself a shiny Region ID. Treasure it well! Also, you may want to try looking it up on the channel_groups endpoint, with the channels annotation. Thusly is revealed a marvellous sight: all channels for your Region! From here, you can then look up the channel via the channels endpoint directly, or simply gather the information you need directly from the Region page.

but wait! there’s more…

We use Annotations a fair bit here at MetaBroadcast. They make it a piece of cake to grab just the data you need, without being deluged with every field present on the API. Channels and channel groups are no exception. I’ve already mentioned the type parameter and the channels annotation on the channel_groups endpoint. channels have channel_groups, related_links, parent and variations. channel_groups is pretty self explanatory—it gives the channel groups that a particular channel is in, along with the channel number it uses in that group. related_links allows you to show/hide related links on a channel.

The parent and variations annotations are a little more interesting. Atlas channels come in two varieties: Parent and (you guessed it) Variation. This is our way of modelling some of the hierarchies that exist in channel-land. For example, if you look up cbbh, you’ll get back BBC One London, our chosen channel from a while back. You might note that it has a parent—cbPF, more commonly known as BBC One. This parent channel encompasses all of the various regional variations of BBC One, such as BBC One Northern Ireland, as well as HD variants.

gettin’ historical

Last, but definitely not least, in the field of Annotations is history. This can be applied to both the channels and channel_groups endpoints, and allows you to view the future… No, seriously! We get a lot of temporal data about channels, from differing images over time, to temporary rebrandings of certain channels, and everything in between. Titles, channel numbers and images can all vary over time. As a result, we took the decision to show only the current (or if there isn’t one, nearest future) result for each field by default. However, wielding the power of the history Annotation, you can view all of the data, over all of time and space!

Basically, the channels and channel_groups endpoints are pretty nifty, and quite useful for garnering all kinds of handy information about your favourite channel. While the navigation to your chosen channel set may take a little getting used to, we believe it’s the best way to express what is a real web of interconnected information. As always, if you’ve got any questions, fire us a line or two either here, or over on Twitter.

blog comments powered by Disqus