Non-uniform and color-blind-unfriendly categorical colors and disproportionate arc sizes are definitely three substantial issues in that series of visualizations. We can rectify all of them with two new packages of mine: waffle & adobecolor. The former provides a good alternative to pie charts (no charts at all are a good alternative to pie charts) and the latter makes it possible to share color palettes without passing long strings of hex-encoded colors.
Using XScope I encoded a color-blind-friendly palette from Brian Connelly and saved the palette off as an Adobe Color file (
ACO). I then took the values from the charts and mapped each party to a particular color. Then, I made ordered and proportional waffle charts using the the values and aligned colors. The results are below:
# install.packages("waffle") # devtools::install_github("hrbrmstr/swatches") library(waffle) library(swatches) national_unity <- c(`Zionist Union (27)`=27, `Likud (27)`=27, `Kulanu (10)`=10, `Shas (7)`=7, `UTJ (6)`=6) right_wing <- c(`Likud (27)`=27, `Kulanu (10)`=10, `Bayit Yehudi (8)`=8, `Shas (7)`=7, `UTJ (6)`=6, `Yisrael Beytenu (5)`=5) herzog_led <- c(`Zionist Union (27)`=27, `Kulanu (10)`=10, `Shas (7)`=7, `UTJ (6)`=6, `Meretz (5)`=5) party_colors <- rev(read_aco("http://rud.is/dl/israel.aco")) zion <- party_colors likud <- party_colors kulanu <- party_colors shas <- party_colors utj <- party_colors visrael <- party_colors meretz <- party_colors bayit <- party_colors nw <- waffle(national_unity, rows=5, colors=c(zion, likud, kulanu, shas, utj), title="\nNational unity government") + theme(plot.title=element_text(size=12, face="bold")) rw <- waffle(right_wing, rows=5, colors=c(likud, kulanu, bayit, shas, utj, visrael), title="\nRight Wing", pad=3) + theme(plot.title=element_text(size=12, face="bold")) hw <- waffle(herzog_led, rows=5, colors=c(zion, kulanu, shas, utj, meretz), title="\nHerzog led", pad=5) + theme(plot.title=element_text(size=12, face="bold")) iron(nw, rw, hw)
If I knew my audience did not have color processing issues, I’d use a better palette. Regardless, these results are far better than the careless pies presented in the original story. The squares represent the same quantities in each chart and the colors also map to the parties.
Honestly, though, you could get a better idea with simple, un-tweaked base graphics bar charts:
par(mfrow=c(3,1)) barplot(national_unity, col=c(zion, likud, kulanu, shas, utj), main="National unity government") barplot(right_wing, col=c(likud, kulanu, bayit, shas, utj, visrael), main="Right Wing") barplot(herzog_led, col=c(zion, kulanu, shas, utj, meretz), main="Herzog led")
Please consider your readers and the message you’re trying to convey when developing visualizations, especially when you have as large an audience as the Jerusalem Post.