0

i was looking for some way to do this kind of plots in R. Ranking showing the last positions of each element ranked.

I took this example:

Argentinian Soccer Position from Newspaper La Nación

enter image description here

I don't know if Stack Overflow lets me inserting a picture, but it is something like this:

Position 2014     2010 2006 2002
1. Germany         3    2    [4]
2. Argentina         [8]   3     2
3. Brasil                3     3    [9]
4. Uruguay
5. Italy

www.lanacion.com.ar (if it asks you for logging in, just google it and enter from google)

Thank you in advance!

jazzurro
  • 23,179
  • 35
  • 66
  • 76
David_Rowie
  • 127
  • 2
  • 10
  • Sure, you could do that in ggplot. First you'll need data. Do you have data? – Gregor Thomas Feb 02 '18 at 02:09
  • `dat <- data.frame("Position" = 1:5, "Country" = c("Germany", "Argentina", "Brazil", "Uruguay", "Italy"), `2010` = c(3, 8, 1, NA, NA), `2006` = c(2, 1, 3, NA, NA), `2002` = c(4, 2, 9, NA, NA))` really curious as to how you would do that? @Gregor. Sure you can do `grid.table`, but how to get the coordinates to insert the flags? – erocoar Feb 02 '18 at 02:14
  • 1
    @erocoar Just make the flags part of the text. You've got flags in your SO profile! – Gregor Thomas Feb 02 '18 at 02:31
  • Though my original assumption was that OP just wanted to replicate the heatmap looking thing piece on the right.... I'm not sure ggplot would be the right tool to recreate the entire table. Probably some javascript and html would be much easier. – Gregor Thomas Feb 02 '18 at 02:33
  • Ah that's a great idea, I didn't even think of it @Gregor :) But I agree, it isn't something you'd really want to do with ggplot. OP, perhaps consider [this](https://stackoverflow.com/questions/25106481/add-an-image-to-a-table-like-output-in-r) – erocoar Feb 02 '18 at 15:57
  • Gregor and Erocar, thank you very much for your answers! – David_Rowie Feb 03 '18 at 16:35

0 Answers0