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
- Host: GitHub
- URL: https://github.com/ellisp/ggflags
- Owner: ellisp
- License: gpl-3.0
- Created: 2017-01-13T19:36:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-02T09:27:55.000Z (8 months ago)
- Last Synced: 2024-07-28T15:36:31.057Z (7 months ago)
- Language: R
- Size: 3.87 MB
- Stars: 18
- Watchers: 2
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- awesome-r-dataviz - ggflags - flag geom for ggplot2. (ggplot / Miscellaneous)
README
---
output:
md_document:
variant: markdown_github
---
## ggflagsflag 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)