https://github.com/ellisp/ggflags
flag geom for ggplot2
https://github.com/ellisp/ggflags
Last synced: about 5 hours 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-02T09:27:55.000Z (about 1 year ago)
- Last Synced: 2025-06-10T09:08:03.529Z (about 1 month ago)
- Language: R
- Size: 3.87 MB
- Stars: 19
- Watchers: 1
- Forks: 20
- 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

(note: proof of principle only)