Skip to content

Commit

Permalink
Add changelog; ammend README
Browse files Browse the repository at this point in the history
  • Loading branch information
James Goldie committed Sep 29, 2023
1 parent ef36c4a commit 8fcef92
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ inst/png/
inst/svg/
inst/cairo/

README.html
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ggflags 0.0.3

- Adds Rémi Thériault as an author and contributor!
- Package now complies with R CMD CHECK, paving the way for possible CRAN submission in the future!
- The package will also promptly be available on https://jimjam-slam.r-universe.dev

# 0.0.2

- Fork from ellisp/ggflags
- Switches from the use of rectangular PNG flags in ellisp/ggflags to circular SVG flags. This makes them much better for plotting at high resolution, and especially for use in bubble plots.
16 changes: 15 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,22 @@ knitr::opts_chunk$set(

## ggflags: Plot flags of the world in ggplot2

A flag geom for ggplot2
A flag geom for ggplot2. Uses circular SVG flags.

# Install

Install from R-Universe:

```r
install.packages("ggflags", repos = c(
"https://jimjam-slam.r-universe.dev",
"https://cloud.r-project.org"))
```

# Use

```{r demo, warning=FALSE}
library(ggplot2)
library(ggflags)
set.seed(1234)
Expand All @@ -26,6 +39,7 @@ d <- data.frame(
country = sample(c("ar", "fr", "nz", "gb", "es", "ca", "lv", "qa"), 50, TRUE),
stringsAsFactors = FALSE
)
ggplot(d, aes(x = x, y = y, country = country, size = x)) +
geom_flag() +
scale_country() +
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

## ggflags
## ggflags: Plot flags of the world in ggplot2

flag geom for ggplot2
A flag geom for ggplot2. Uses circular SVG flags.

# Install

Install from R-Universe:

``` r
install.packages("ggflags", repos = c(
"https://jimjam-slam.r-universe.dev",
"https://cloud.r-project.org"))
```

# Use

``` r
library(ggplot2)
library(ggflags)
#> Loading required package: ggplot2

set.seed(1234)
d <- data.frame(
x = rnorm(50), y = rnorm(50),
country = sample(c("ar", "fr", "nz", "gb", "es", "ca", "lv", "qa"), 50, TRUE),
stringsAsFactors = FALSE
)

ggplot(d, aes(x = x, y = y, country = country, size = x)) +
geom_flag() +
scale_country() +
Expand Down
Binary file modified man/figures/README-demo-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8fcef92

Please sign in to comment.