Have a happy (European) holiday!

Published: 2016-12-16

As I write this in mid-December 2016 the US dollar is strong relative to major European currencies (see charts below). This means that for US citizens contemplating a holiday vacation, Europe is an attractive destination. A little chilly, yes, but affordable.

The real point of this post, though, is to consider how to present time series where there are a lot of gaps. The daily currency time series I am using are obtained from the Federal Reserve Bank of St. Louis (FRED). They omit data for weekends, holidays, and also some days that, so far as I can tell, are nothing special.

Lots of missing data

The result is that a large proportion of the daily data are missing. To be precise, 29% of days are missing from the daily time series for the Euro and Pound time series.

When almost a third of the data are missing from a time series the common practice of drawing a line graph may conceal as much as it reveals. The viewer may be misled into the impression that the data are continuous whereas, in fact, they are intermittent. Having pondered how best to present such time series data I have concluded that bar charts are appropriate.

Variable bar thickness

Given that a time series tends to have a lot of data points, the bars are necessarily thin. As the number of bars decreases when zooming in, and increases when zooming out, the thickness of the bars is adjusted.

On my setup this works well in Firefox but is messed up by Chrome. If readers have similar or different experiences with Chrome, or other browsers, please post a comment on GitHub.

Coding note

Downloading, cleaning, and transforming the data are easily managed in R. To display the data in a browser, and to enable user interaction therewith, D3 is indispensable. Attractive fonts are supplied by Google Fonts.

You can view the code and data on Github.