Unusual graph- modified wind rose perhaps?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Unusual graph- modified wind rose perhaps?

John Kane-2

In a OpenOffice.org forum someone was asking if the spreadsheet could graph this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html 

I didn't think it could. :)  

I don't think I've ever seen exactly this layout. Does anyone know if there is anything in R that does a graph like this or that can be adapted to do it.

Unfortunately my Spanish is non-existent so I am not sure how effective the graph is in achieving whatever it's suppposed to do.  A dot chart might be as effective but it is a flashy graphic.

Thanks

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unusual graph- modified wind rose perhaps?

Thierry Onkelinx
Dear John,

You can get pretty close with ggplot2.

Best regards,

Thierry

library(ggplot2)
dataset <- data.frame(Name = LETTERS[1:26])
dataset$Score <- runif(nrow(dataset))
dataset$Category <- cut(dataset$Score, breaks = c(-Inf, 0.33, 0.66, Inf), labels = c("Bad", "Neutral", "Good"))
dataset$Name <- factor(dataset$Name, levels = dataset$Name[order(dataset$Score)])
dataset$Location <- as.numeric(dataset$Name)

ggplot(dataset, aes(x = Name, y = Score, fill = Category)) + geom_bar() + coord_polar()


#with some extra tweeking
dataset <- rbind(dataset,
        data.frame(
                Location = c(max(dataset$Location) + seq_len(max(dataset$Location) / 2), min(dataset$Location) - seq_len(max(dataset$Location) / 2)),
                Name = "",
                Score = 0,
                Category = "Good"
        )
)
ggplot(dataset, aes(x = Location, y = Score, fill = Category)) + geom_bar(stat = "identity") + coord_polar(start = pi, direction = -1) + scale_fill_manual(value = c(Good = "green", Neutral = "grey", Bad = "red")) + theme_bw() + scale_x_continuous("", breaks = dataset$Location, labels = dataset$Name)

----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium

tel. + 32 54/436 185
[hidden email]
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey


> -----Oorspronkelijk bericht-----
> Van: [hidden email] [mailto:[hidden email]]
> Namens John Kane
> Verzonden: maandag 4 juli 2011 13:22
> Aan: [hidden email]
> Onderwerp: [R] Unusual graph- modified wind rose perhaps?
>
>
> In a OpenOffice.org forum someone was asking if the spreadsheet could graph
> this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
>
> I didn't think it could. :)
>
> I don't think I've ever seen exactly this layout. Does anyone know if there is
> anything in R that does a graph like this or that can be adapted to do it.
>
> Unfortunately my Spanish is non-existent so I am not sure how effective the
> graph is in achieving whatever it's suppposed to do.  A dot chart might be as
> effective but it is a flashy graphic.
>
> Thanks
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unusual graph- modified wind rose perhaps?

Jim Lemon
In reply to this post by John Kane-2
On 07/04/2011 09:21 PM, John Kane wrote:
>
> In a OpenOffice.org forum someone was asking if the spreadsheet could graph this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
>
> I didn't think it could. :)
>
> I don't think I've ever seen exactly this layout. Does anyone know if there is anything in R that does a graph like this or that can be adapted to do it.
>
> Unfortunately my Spanish is non-existent so I am not sure how effective the graph is in achieving whatever it's suppposed to do.  A dot chart might be as effective but it is a flashy graphic.
>
Hi John,
It's a bit like the function I am working on after the request by
Patrick Jemison (radial.pie), and I thought the interactive fill when
you sweep the pointer over it is pretty neat. I don't think I'll go that
far. I'll let you know when I've got a working function.

Jim

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unusual graph- modified wind rose perhaps?

John Kane-2
In reply to this post by Thierry Onkelinx
Very pretty Thierry,

I was wondering if ggplot2 could do something like it but my knowledge of ggplot2 is far to little to attempt it myself.  

I'm going to really have to spend some time on that code.

Thanks

--- On Mon, 7/4/11, ONKELINX, Thierry <[hidden email]> wrote:

> From: ONKELINX, Thierry <[hidden email]>
> Subject: RE: [R] Unusual graph-  modified wind rose perhaps?
> To: "John Kane" <[hidden email]>, "[hidden email]" <[hidden email]>
> Received: Monday, July 4, 2011, 8:14 AM
> Dear John,
>
> You can get pretty close with ggplot2.
>
> Best regards,
>
> Thierry
>
> library(ggplot2)
> dataset <- data.frame(Name = LETTERS[1:26])
> dataset$Score <- runif(nrow(dataset))
> dataset$Category <- cut(dataset$Score, breaks = c(-Inf,
> 0.33, 0.66, Inf), labels = c("Bad", "Neutral", "Good"))
> dataset$Name <- factor(dataset$Name, levels =
> dataset$Name[order(dataset$Score)])
> dataset$Location <- as.numeric(dataset$Name)
>
> ggplot(dataset, aes(x = Name, y = Score, fill = Category))
> + geom_bar() + coord_polar()
>
>
> #with some extra tweeking
> dataset <- rbind(dataset,
>     data.frame(
>         Location =
> c(max(dataset$Location) + seq_len(max(dataset$Location) /
> 2), min(dataset$Location) - seq_len(max(dataset$Location) /
> 2)),
>         Name = "",
>         Score = 0,
>         Category = "Good"
>     )
> )
> ggplot(dataset, aes(x = Location, y = Score, fill =
> Category)) + geom_bar(stat = "identity") + coord_polar(start
> = pi, direction = -1) + scale_fill_manual(value = c(Good =
> "green", Neutral = "grey", Bad = "red")) + theme_bw() +
> scale_x_continuous("", breaks = dataset$Location, labels =
> dataset$Name)
>
> ----------------------------------------------------------------------------
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek
> team Biometrie & Kwaliteitszorg
> Gaverstraat 4
> 9500 Geraardsbergen
> Belgium
>
> Research Institute for Nature and Forest
> team Biometrics & Quality Assurance
> Gaverstraat 4
> 9500 Geraardsbergen
> Belgium
>
> tel. + 32 54/436 185
> [hidden email]
> www.inbo.be
>
> To call in the statistician after the experiment is done
> may be no more than asking him to perform a post-mortem
> examination: he may be able to say what the experiment died
> of.
> ~ Sir Ronald Aylmer Fisher
>
> The plural of anecdote is not data.
> ~ Roger Brinner
>
> The combination of some data and an aching desire for an
> answer does not ensure that a reasonable answer can be
> extracted from a given body of data.
> ~ John Tukey
>  
>
> > -----Oorspronkelijk bericht-----
> > Van: [hidden email]
> [mailto:[hidden email]]
> > Namens John Kane
> > Verzonden: maandag 4 juli 2011 13:22
> > Aan: [hidden email]
> > Onderwerp: [R] Unusual graph- modified wind rose
> perhaps?
> >
> >
> > In a OpenOffice.org forum someone was asking if the
> spreadsheet could graph
> > this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
> >
> > I didn't think it could. :)
> >
> > I don't think I've ever seen exactly this layout. Does
> anyone know if there is
> > anything in R that does a graph like this or that can
> be adapted to do it.
> >
> > Unfortunately my Spanish is non-existent so I am not
> sure how effective the
> > graph is in achieving whatever it's suppposed to
> do.  A dot chart might be as
> > effective but it is a flashy graphic.
> >
> > Thanks
> >
> > ______________________________________________
> > [hidden email]
> mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> reproducible code.
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unusual graph- modified wind rose perhaps?

Michael Dewey
In reply to this post by John Kane-2
At 12:21 04/07/2011, John Kane wrote:

>In a OpenOffice.org forum someone was asking if the spreadsheet
>could graph this
>http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
>
>I didn't think it could. :)
>
>I don't think I've ever seen exactly this layout. Does anyone know
>if there is anything in R that does a graph like this or that can be
>adapted to do it.
>
>Unfortunately my Spanish is non-existent so I am not sure how
>effective the graph is in achieving whatever it's suppposed to
>do.  A dot chart might be as effective but it is a flashy graphic.

Well nobody seems to have taken up the challenge John, so here goes.

In summary the graphics show the properties of brands of full-fat
milk sold in Spain. Some of them are supermarket own brands and
others general branded products. By clicking on the rectangular
buttons across the top you can select which criterion to look at and
when you do there is usually an explanatory text shown upper-left in
the plot. By default you get overall quality rating.

Good features of the graphic seem to me to be that the brands are
always in the same order so if you buy your milk from (say) the
Eroski supermarket chain you can track it easily through the
different criteria. Another good feature for me is the fact that the
underlying values do not clutter up the visual presentation but can
be retrieved by hovering over the sector

Several of the criteria are inherently continuous but have been
categorised which seems to me a shame.

Overall for a newspaper graphic it seemed of good quality to me but YMMV.


>Thanks

Michael Dewey
[hidden email]
http://www.aghmed.fsnet.co.uk/home.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Unusual graph- modified wind rose perhaps?

John Kane-2
Thanks Michael.

It looked like a decent display but it's nice to know what is going on.  I has figured out something to do with milk but that was my total knowledge..



--- On Wed, 7/6/11, Michael Dewey <[hidden email]> wrote:

> From: Michael Dewey <[hidden email]>
> Subject: Re: [R] Unusual graph-  modified wind rose perhaps?
> To: "John Kane" <[hidden email]>, [hidden email]
> Received: Wednesday, July 6, 2011, 3:25 PM
> At 12:21 04/07/2011, John Kane
> wrote:
>
> > In a OpenOffice.org forum someone was asking if the
> spreadsheet could graph this http://www.elmundo.es/elmundosalud/documentos/2011/06/leche.html
> >
> > I didn't think it could. :)
> >
> > I don't think I've ever seen exactly this layout. Does
> anyone know if there is anything in R that does a graph like
> this or that can be adapted to do it.
> >
> > Unfortunately my Spanish is non-existent so I am not
> sure how effective the graph is in achieving whatever it's
> suppposed to do.  A dot chart might be as effective but
> it is a flashy graphic.
>
> Well nobody seems to have taken up the challenge John, so
> here goes.
>
> In summary the graphics show the properties of brands of
> full-fat milk sold in Spain. Some of them are supermarket
> own brands and others general branded products. By clicking
> on the rectangular buttons across the top you can select
> which criterion to look at and when you do there is usually
> an explanatory text shown upper-left in the plot. By default
> you get overall quality rating.
>
> Good features of the graphic seem to me to be that the
> brands are always in the same order so if you buy your milk
> from (say) the Eroski supermarket chain you can track it
> easily through the different criteria. Another good feature
> for me is the fact that the underlying values do not clutter
> up the visual presentation but can be retrieved by hovering
> over the sector
>
> Several of the criteria are inherently continuous but have
> been categorised which seems to me a shame.
>
> Overall for a newspaper graphic it seemed of good quality
> to me but YMMV.
>
>
> > Thanks
>
> Michael Dewey
> [hidden email]
> http://www.aghmed.fsnet.co.uk/home.html
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.