Using ggplot2 to recreate 2012 Best Cities Results

April 18, 2013
By

(This article was originally published at Adventures in Analytics and Visualization, and syndicated at StatsBlogs.)

Data from: http://images.businessweek.com/slideshows/2012-09-26/americas-50-best-cities
This time, I used ggplot2 to recreate the graphs created previously using Tableau. After all, R and ggplot2 are open source and free. Yes, I could leave a space between bars for different cities, but I wanted to be as close as possible to the tableau graphs previously generated. Yes, these are bar graphs for different cities, in contrast to area graphs generated by tableau. I tried area graphs with ggplot2 and although it was relatively simple to create them with "Rank of city" as a continuous var, it was much simpler to use bar graphs if I had to display the names of city on the axes (instead of just ranks).
First set of vars


Second set of vars

Third set of vars






Please comment on the article here: Adventures in Analytics and Visualization

Tags: , ,


Subscribe

Email:

  Subscribe