Posts Tagged ‘ graphs ’

Le Monde puzzle [48]

December 1, 2010
By
Le Monde puzzle [48]

This week(end), the Le Monde puzzle can be (re)written as follows (even though it is presented as a graph problem): Given a square 327×327 symmetric matrix A, where each non-diagonal entry is in {1,2,3,4,5} and , does there exist a triplet (i,j,k) such that Solving this problem in R is very easy. We can create

Read more »

Random graphs with fixed numbers of neighbours

November 24, 2010
By
Random graphs with fixed numbers of neighbours

In connection with Le Monde puzzle #46, I eventually managed to write an R program that generates graphs with a given number n of nodes and a given number k of edges leaving each of those nodes. (My early attempt was simply too myopic to achieve any level of success when n was larger than

Read more »

Which chart is better?

August 10, 2010
By
Which chart is better?

CHART CRITICS, GRAPHICS CURMUDGEONS, COME ONE COME ALL Once upon a time there was this graph (graph 1). Andrew Gelman went all graphics curmudgeon on it, calling it an “ugly, sloppy bit of data graphics“, so it became this graph (graph 2). Now the question is, which is better: graph 2 or graph 3? Please

Read more »

Setting graph margins in R using the par() function and lots of cow milk

June 30, 2010
By
Setting graph margins in R using the par() function and lots of cow milk

It is fairly straightforward to set the margins of a graph in R by calling the par() function with the mar (for margin!) argument. For example, par(mar=c(5.1,4.1,4.1,2.1) sets the bottom, left, top and right margins respectively of the plot region in number of lines of text. Another way is by specifying the margins in inches

Read more »

Response to Flowingdata Challenge: Graphing obesity trends

April 29, 2010
By
Response to Flowingdata Challenge: Graphing obesity trends

Nathan at Flowingata put up another interesting challenge today to improve the following graphic showing obesity trends in America. Here’s my attempt: I transposed the data so that the cohorts are on the X axis and each separate line represents an age group. So each line shows the percentage of obese people in a particular

Read more »

The “Future of Open Source” Survey – an R user’s thoughts and conclusions

March 23, 2010
By
The “Future of Open Source” Survey – an R user’s thoughts and conclusions

Over a month ago, David Smith published a call for people to participate in the “Future of Open Source” Survey. 550 people (and me) took the survey, and today I got an e-mail with the news that the 2010 survey results are analysed and where published in the “Future.Of.Open.Source blog” In the following (38 slides) presentation: I would like...

Read more »

Responding to the Flowingdata GDP Graph Challenge

February 25, 2010
By
Responding to the Flowingdata GDP Graph Challenge

Nathan Yau of Flowingdata put up a challenge earlier today to improve upon a graph showing government spending as a percentage of GDP, published in the Economist. The underlying data wasn’t available. So I put on my graph-to-numbers glasses on and pulled out some data. Here it is in case you want to have a

Read more »