comics | R Documentation |
A data frame containing information about comic book characters from Marvel Comics and DC Comics.
comics
A data frame with 21821 observations on the following 11 variables.
Name of the character. May include: Real name, hero or villain name, alias(es) and/or which universe they live in (i.e. Earth-616 in Marvel's multiverse).
Status of the characters identity with levels Secret
, Publie
, No Dual
and Unknown
.
Character's alignment with levels Good
, Bad
, Neutral
and Reformed Criminals
.
Character's eye color.
Character's hair color.
Character's gender.
Character's classification as a gender or sexual minority.
Is the character dead or alive?
Number of comic boooks the character appears in.
Date of publication for the comic book the character first appeared in.
Publisher of the comic with levels Marvel
and DC
.
library(ggplot2)
library(dplyr)
# Good v Bad
plot_data <- comics |>
filter(align == "Good" | align == "Bad")
ggplot(plot_data, aes(x = align, fill = align)) +
geom_bar() +
facet_wrap(~publisher) +
scale_fill_manual(values = c(IMSCOL["red", "full"], IMSCOL["blue", "full"])) +
theme_minimal() +
labs(
title = "Is there a balance of power",
x = "",
y = "Number of characters",
fill = ""
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.