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.

Legislative debates on foreign policy

We focus in particular on foreign aid policy. While development agencies largely control individual project decision, national legislatures (the U.S. Congress, the British Parliament, etc.) generally have considerable influence over broad policy outlines. Our goal is to identify the arguments for or against foreign aid that shape legislative outcomes, and to uncover patterns over time and across donor states in the salience of particular arguments. These patterns, in turn, can be used to improve our understanding of aid policy decision-making.

Photo: David Iliff - European Parliament, 2014. (CC BY-SA 3.0)