Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/ellisp/ggflags

flag geom for ggplot2
https://github.com/ellisp/ggflags

Last synced: 3 months ago
JSON representation

flag geom for ggplot2

Lists

README

        

---
output:
md_document:
variant: markdown_github
---
## ggflags

flag geom for ggplot2

```{r demo}
library(ggflags)

set.seed(1234)
d <- data.frame(x=rnorm(50), y=rnorm(50),
country=sample(c("ar","fr", "nz", "gb", "es", "ca"), 50, TRUE),
stringsAsFactors = FALSE)
ggplot(d, aes(x=x, y=y, country=country, size=x)) +
geom_flag() +
scale_country()
```

The flags are taken from wikipedia via https://github.com/behdad/region-flags

![](README_files/figure-markdown_github/flags.png)

(note: proof of principle only)