No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
5 changed files with
24 additions and
32 deletions
-
R/geom-chicklet.R
-
README.Rmd
-
README.md
-
man/GeomChicklet.Rd
-
man/geom_chicklet.Rd
|
|
@ -85,9 +85,7 @@ draw_key_rrect <- function(data, params, size, ...) { # nocov start |
|
|
|
) |
|
|
|
} # nocov end |
|
|
|
|
|
|
|
#' ggchicklet-ggplot2-ggproto |
|
|
|
#' @format NULL |
|
|
|
#' @usage NULL |
|
|
|
#' @rdname geom_chicklet |
|
|
|
#' @export |
|
|
|
GeomChicklet <- ggproto( # nocov start |
|
|
|
"GeomChicklet", GeomRrect, |
|
|
|
|
|
@ -29,20 +29,14 @@ rectangle segmented column charts (i.e. "chicklets"). |
|
|
|
|
|
|
|
The following functions are implemented: |
|
|
|
|
|
|
|
```{r ingredients, results='asis', echo=FALSE, cache=FALSE} |
|
|
|
hrbrpkghelpr::describe_ingredients() |
|
|
|
``` |
|
|
|
|
|
|
|
## Installation |
|
|
|
|
|
|
|
```{r install-ex, eval=FALSE} |
|
|
|
install.packages("ggchicklet", repos = "https://cinc.rud.is") |
|
|
|
# or |
|
|
|
devtools::install_git("https://git.rud.is/hrbrmstr/ggchicklet.git") |
|
|
|
# or |
|
|
|
devtools::install_git("https://git.sr.ht/~hrbrmstr/ggchicklet") |
|
|
|
# or |
|
|
|
devtools::install_gitlab("hrbrmstr/ggchicklet") |
|
|
|
# or |
|
|
|
devtools::install_bitbucket("hrbrmstr/ggchicklet") |
|
|
|
# or (if you must) |
|
|
|
devtools::install_github("hrbrmstr/ggchicklet") |
|
|
|
```{r install-ex, results='asis', echo = FALSE} |
|
|
|
hrbrpkghelpr::install_block() |
|
|
|
``` |
|
|
|
|
|
|
|
## Usage |
|
|
|
|
|
@ -19,19 +19,23 @@ segmented column charts (i.e. “chicklets”). |
|
|
|
|
|
|
|
The following functions are implemented: |
|
|
|
|
|
|
|
- `debates2019`: June 2019 U.S. Democratic Debate Candidate/Topic |
|
|
|
Times |
|
|
|
- `geom_chicklet`: Chicklet (rounded segmented column) charts |
|
|
|
|
|
|
|
## Installation |
|
|
|
|
|
|
|
``` r |
|
|
|
install.packages("ggchicklet", repos = "https://cinc.rud.is") |
|
|
|
# or |
|
|
|
# or |
|
|
|
devtools::install_git("https://git.rud.is/hrbrmstr/ggchicklet.git") |
|
|
|
# or |
|
|
|
# or |
|
|
|
devtools::install_git("https://git.sr.ht/~hrbrmstr/ggchicklet") |
|
|
|
# or |
|
|
|
devtools::install_gitlab("hrbrmstr/ggchicklet") |
|
|
|
# or |
|
|
|
devtools::install_bitbucket("hrbrmstr/ggchicklet") |
|
|
|
# or (if you must) |
|
|
|
# or |
|
|
|
devtools::install_github("hrbrmstr/ggchicklet") |
|
|
|
``` |
|
|
|
|
|
|
@ -99,10 +103,10 @@ debates2019 %>% |
|
|
|
|
|
|
|
## ggchicklet Metrics |
|
|
|
|
|
|
|
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | |
|
|
|
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | |
|
|
|
| R | 9 | 0.82 | 123 | 0.51 | 27 | 0.37 | 105 | 0.54 | |
|
|
|
| Rmd | 2 | 0.18 | 116 | 0.49 | 46 | 0.63 | 90 | 0.46 | |
|
|
|
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | |
|
|
|
| :--- | -------: | --: | --: | ---: | ----------: | ---: | -------: | ---: | |
|
|
|
| R | 8 | 0.8 | 119 | 0.52 | 27 | 0.36 | 105 | 0.55 | |
|
|
|
| Rmd | 2 | 0.2 | 112 | 0.48 | 47 | 0.64 | 87 | 0.45 | |
|
|
|
|
|
|
|
## Code of Conduct |
|
|
|
|
|
|
|
|
|
@ -1,10 +0,0 @@ |
|
|
|
% Generated by roxygen2: do not edit by hand |
|
|
|
% Please edit documentation in R/geom-chicklet.R |
|
|
|
\docType{data} |
|
|
|
\name{GeomChicklet} |
|
|
|
\alias{GeomChicklet} |
|
|
|
\title{ggchicklet-ggplot2-ggproto} |
|
|
|
\description{ |
|
|
|
ggchicklet-ggplot2-ggproto |
|
|
|
} |
|
|
|
\keyword{datasets} |
|
|
@ -1,13 +1,18 @@ |
|
|
|
% Generated by roxygen2: do not edit by hand |
|
|
|
% Please edit documentation in R/geom-chicklet.R |
|
|
|
\docType{data} |
|
|
|
\name{geom_chicklet} |
|
|
|
\alias{geom_chicklet} |
|
|
|
\alias{GeomChicklet} |
|
|
|
\title{Chicklet (rounded segmented column) charts} |
|
|
|
\format{An object of class \code{GeomChicklet} (inherits from \code{GeomRrect}, \code{Geom}, \code{ggproto}, \code{gg}) of length 7.} |
|
|
|
\usage{ |
|
|
|
geom_chicklet(mapping = NULL, data = NULL, |
|
|
|
position = ggplot2::position_stack(reverse = TRUE), |
|
|
|
radius = grid::unit(3, "pt"), ..., width = NULL, na.rm = FALSE, |
|
|
|
show.legend = NA, inherit.aes = TRUE) |
|
|
|
|
|
|
|
GeomChicklet |
|
|
|
} |
|
|
|
\arguments{ |
|
|
|
\item{mapping}{Set of aesthetic mappings created by \code{\link[=aes]{aes()}} or |
|
|
@ -117,3 +122,4 @@ ggplot(debates2019) + |
|
|
|
theme(panel.grid.major.y = element_blank()) + |
|
|
|
theme(legend.position = "bottom") |
|
|
|
} |
|
|
|
\keyword{datasets} |
|
|
|