| plot_waffle | R Documentation |
Waffle chart in kedata style
plot_waffle(data, x, y, ndeep, title, subtitle, data_source)
data |
data frame |
x |
character of column name for x axis |
y |
character of column name for y axis |
ndeep |
number of waffle |
title |
character for plot title |
subtitle |
character for plot subtitle |
data_source |
character for footer text |
ggplot object
## Not run:
library(ggplot2)
library(dataplot)
df <- structure(list(
region = c(
"Africa", "Asia", "Latin America",
"Other", "US-born"
),
ncases = c(36L, 34L, 56L, 2L, 44L)
),
.Names = c("region", "ncases"),
row.names = c(NA, -5L), class = "data.frame"
)
plot_waffle(
data = df, x = "region", y = "ncases", ndeep = 10,
title = "Lorem Ipsum is simply dummy text",
subtitle = "Contrary to popular belief, Lorem Ipsum is not simply random text",
data_source = "www.kedata.online"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.