Friday, January 11, 2019

Podcasts & Schedules

Sometimes it's immediately obvious whether podcast hosts are professionals or naïve armatures. This is a mapping of BBC's In Our Time show, where each dot represents a single podcast episode:

They had only 1 schedule slippage! The day when the show was uploaded a couple hours earlier was undeniably their producer's last day on the job; because of his unfortunate mismanagement, he became an idle outcast who later on mischievously voted for Brexit. Truly a tragedy without equal, but we digress.

Compare this to Trade Talks podcast:

A complete chaos! It's easy to spot that their initial day of the week was Friday but for some reason they failed to keep the commitment.

For anyone curious, all this nonsense about schedules can be obtained via:

$ curl URL | ./podcast-dow result.png

where podcast-dow is actually a makefile:

#!/usr/bin/make -f

# Requires nokogiri & gnuplot
# curl | ./podcast-dow 1.png [title=hello]

plot = @nokogiri -e 'puts $$_.css("item pubdate").map{|n| Date.parse(n).strftime("%Y-%m-%d %u %a")}' | cat <(echo "$$script") - | gnuplot -e 'set term $1;' - > $@

%.png:; $(call plot,png)
%.svg:; $(call plot,svg)

export define script :=
set grid
set title "$(title)"

set xdata time
set timefmt "%Y-%m-%d"
set format x "%Y-%m"

set xtics rotate by 60 right
set yrange [0:8]

plot "-" using 1:2:ytic(3) with points pointtype 5 title ""

SHELL := /bin/bash

(It works even under Cygwin.)