Interpolating (hex) colour values

In visualizations, it is often desirable to be able to display gradations of colour, or to interpolate from one colour to another. When plotting data from a dataframe, we would like to be able to do this automatically from any one colour to any other colour. For instance, if we want to plot a number of distinct colours but want the transition from one to the next to be gradual. This post shows how to do this easily and neatly.

What happened to earlier blog posts?

This website was overhauled in December 2021. I will gradually be converting some of the blog posts on the old website to the new format, but this is a low priority item, so it may take a while.

The British media and Trump

Comparing the coverage of Donald Trump in 2015 in the Guardian to that in the New York Times. Where the American coverage appears more focused on specific, often personal insults/statements by Trump (slobs, pigs, sexist, stupid), the British paper’s words indicate a greater emphasis on Trump’s overall ideology (or lack thereof): fascist, xenophobic, incoherent.