Skip to content

basarabam/ggflags

 
 

Repository files navigation

ggflags

flag geom for ggplot2

library(ggflags)
## Loading required package: ggplot2

## Loading required package: grid
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 with some added missing flags historical flagse (yu, dr-de

(note: proof of principle only)

About

flag geom for ggplot2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%