While it is not clear if anyone cares to go on looking at the percentage change of brewery counts over time (crickets!) I am not ready to give it up. At least not yet, but this is likely the last word on the matter for a while. It is good to follow through on what you start and I certainly want to be a good influence on my future nephews/nieces. Additionally, there is the self-serving reason of being able to reuse this visualization work in future posts and that’s some non-negligible motivation. That’s right little nephews, be lazy-efficient. Create, refine, and reuse: don’t be a sisyphean programmer.1

The other motivation is to work with D3 more (hey look, The New York Times uses it!). Most of the visualizations I create on the job are either in other programs or static (or on local servers, which is effectively the same thing where this site is concerned).2 I need to expand my toolkit for this site.

“The lessons you are meant to learn are in your work.” -Art & Fear, David Bayles & Ted Orland

I am going to show several variations of the visualization below, both to fill up space (lazy-effective) and to walk through the data transformations. Ask yourself which are easier to read or more importantly, which are most effective in getting across the information of the underlying numbers.

Data Source: Beer Institute

First off, if you can read this it means you either didn’t bang your head hard enough against the screen or you haven’t read the previous posts. The chart above, in one form or another, has made a cameo in three successive pieces. It’s included hear for context. A closer chart of what I was hoping to present is below.

Data Source: Beer Institute

Shout out to the internets in general and to the coding resources specifically,3 but I needed more time to get this in the shape I was hoping for. However, my new commitment to “ship” something keeps me from holding back.

“The show doesn’t go on because it’s ready; it goes on because it’s 11:30.” -Lorne Michaels

Excuses aside, let’s focus on the positives and take-aways:

  1. Though nothing spectacular, in the first vis we have an interactive element when hovering our mouse over the bars. We can build on this!
  2. Though ugly, the second vis succeeds in highlighting the percentage change for each year. Kudos.
  3. D3 is frustrating in the beginning; console.log() is your friend.

Items For Future Consideration

  • Implement “better” plot elements: title, legend, axis labels, etc.
  • Use hover tool-tips to provide additional, granular, information, eg. place mouse on bar, get year and brewery count.
  • Once again, split by macro/micro breweries. Though that was not the focus here it is worth mentioned again.
  • Create a plot similar to this (sadly no Public License).



Notes

1 … Or whatever you’ll be doing in the future; which, if things continue along certain trends, may be whatever the robots leave for us; that may be ditch digging, in which case you won’t be able to avoid being a bit sisyphean; the upside is you probably won’t be a “sisyphean” word-using sissy.
2 No need to bore the less data interested reader: Python (matplotlib, seaborn, bokeh) & R (ggplot, Shiny), mostly.
3 Special mention to Mike Bostock and the resources he’s provided under Public License. His lifted code is obvious here. Also to Nick Such’s post regarding use of <iframe> and <div id="example">, both implemented in this post.