An artistic rendering of Boston's skyline using R. Code and source data are included.
Been interested in using R (or other programming languages) to make artistic renderings of data—that is, representations that might not be as informative as well-made graphs, but are pleasing to look at purely for enjoyment. Took a stab at it earlier this year when representing usage statistics of a music group (club coat check member statistics) and for Cheyne-Stokes respiration. Wanted to make an artistic rendering of Boston's city skyline, again leaning on the use of polar coordinates as it is visually more interesting that using Cartesian. The code and csv file are included below.
boston building height csv files
- # makes an artistic rendering of the boston city skyline
- # biafra ahanonu
- # updated: 2013.12.28
- # load in the data
- # randomly group the buildings
- # plot the data
- scale_fill_hue()+
- guides(fill=FALSE,group=FALSE)+
- geom_bar(stat="identity",position="dodge")+
- theme(
- axis.text.x = element_text(angle=90,hjust=1,vjust=.5,color="white"),
- panel.background=element_rect(fill="white",colour="white"),
- strip.text = element_blank(),
- strip.background = element_blank(),
- panel.grid = element_blank(),
- axis.text = element_blank(),
- axis.ticks = element_blank(),
- axis.title = element_blank()
- )+
- coord_polar()
- # decide whether to save or display plot
- # makeFootnote()
- }else{
- }
- }
- # run script
- main("buildings.height.boston.csv");