Posts Tagged ‘ graphics ’

Example 7.25: compare draws with distribution

March 5, 2010
By
Example 7.25: compare draws with distribution

In example 7.24, we demonstrated a Metropolis-Hastings algorithm for generating observations from awkward distributions. In such settings it is desirable to assess the quality of draws by comparing them with the target distribution.Recall that the dis...

Read more »

Analyzing Google’s Winter Olympics Search Traffic with R

March 2, 2010
By
Analyzing Google’s Winter Olympics Search Traffic with R

The Official Google Blog today includes an analysis of Google's search traffic related to the recently-concluded Winter Olympics, correlating various high-profile events with searches from particular countries. For example, traffic from the United States shows the expected diurnal cycle but with promintent peaks for the opening ceremony and the hockey matches featuring the USA team: It's not specifically stated...

Read more »

How to make a mosaic plot in R

February 16, 2010
By
How to make a mosaic plot in R

Mosaic plots (aka treemaps) are a great way to visualize hierarchical data. A collection of rectangles represents all the elements to be visualized (customers, news items, blog posts), with the size and color of the rectangles coding attribute. But what makes this chart unique is the arrangement of the elements: where there is hierarchy (customer segments, news topics, post...

Read more »

Mapping the Massachusetts election upset with R, ctd

February 4, 2010
By
Mapping the Massachusetts election upset with R, ctd

Last week we looked at an analysis done in R by the good folks at Offensive Politics, looking at the political climate surrounding the recent Senate election in Massachusetts. There were some very insightful comments (thanks, Revolutions readers!) about the design of the charts, especially in the choice of color schemes used (the originals didn't use a neutral white...

Read more »

Advanced graphics in R

February 3, 2010
By

A lot of attention recently has gone to the more modern (and, dare I say, sexier) graphics systems in R, ggplot2 and lattice. But there's a lot of power in the base graphics system built into core R, especially when you want control over every aspect of how the graph is laid out. Ryan Rosario has put together some...

Read more »

Crayola crayon colors, 1949-present

January 29, 2010
By
Crayola crayon colors, 1949-present

Here's an example I featured in my list of 7 Awesome Things about R (awesome thing #3: graphics and data visualization). The Learning R blog features a reproduction of a graphic that recently appeared on Flowing Data. It shows the colors in a box of Crayola crayons: before 1949 there were only 8, but over the years additional colors...

Read more »

How to combine Google maps and data in R

January 27, 2010
By
How to combine Google maps and data in R

Every good artist needs a canvas, and when it comes to displaying geographic data placing those data in context -- on a map -- makes all the difference. A new package for R from Markus Loecher, RgoogleMaps, allows you to download a street or satellite map from Google simply by specifying the bounding latitude/longitude coordinates. (You need to sign...

Read more »

How to make a heat map in R

January 21, 2010
By
How to make a heat map in R

FlowingData has just posted a nice step-by-step tutorial on how to make a heat-map in R, like this one on attributes of NBA scorers: If you want to take the concept a step further with time-series data, you can also create calendar heat-maps in R. For example, you can track the level of activity in a forum, or the...

Read more »

New features in ggplot2 version 0.85

January 18, 2010
By

Hadley Wickham recently updated the ggplot2 package for R to version 0.8.5. In addition to bugfixes and performance improvements, this version introduces some handy new features. Among them: the ability to display mathematical equations as text, automatic legends for color scales, and user-configurable axis labels and legend titles. The Learning R blog runs through the new features with worked...

Read more »

A tale of two visualizations (because it’s Friday)

January 15, 2010
By
A tale of two visualizations (because it’s Friday)

GEEK FIGHT!!! says JD Long on Twitter as the New York Times publishes a widely-reposted interactive graphic about Netflix rental data, and the Wall Street Journal also gets into the interactive-viz game with a graphic on bank bonuses. If it's a fight, it's a knockout in the first round, if you ask me. There's no surprise why the Netflix...

Read more »