Skip to contents

Numerous variables on species of dinosaurs collected from various resources.

Usage

dinosaurs

Format

A data frame with 20 observations on the following 4 variables.

name

Name of species.

ecosystem

Ecosystem the species lives in.

vore

Vore of species: carnivore, herbivore, or pescavore.

name_mening

Meaning of species name.

hybrid

Whether the dinosaur is a hybrid (TRUE) or not (FALSE).

time_period

When the dinosaur lived.

weight

Weight of dinosaur (TO DO: Add units).

height

Height of dinosaur (TO DO: Add units).

bite_force

Bite force of dinosaur, in newtons.

speed

Speed of dinosaur (TO DO: Add units).

Source

Various, mostly Wikipedia.

Examples


library(ggplot2)

# What dinosaurs ate
ggplot(dinosaurs, aes(x = vore, fill = vore)) +
geom_bar(show.legend = FALSE) +
  labs(
    title = "What dinosaurs ate 🦖",
    x = "Vore",
    y = "Count"
  ) +
  scale_fill_manual(values = c("firebrick1", "forestgreen", "bisque4")) +
  theme_minimal()


# Where dinosaurs lived
ggplot(dinosaurs, aes(y = ecosystem, fill = ecosystem)) +
geom_bar(show.legend = FALSE) +
  labs(
    title = "Where dinosaurs lived 🌎",
    y = "Ecosystem",
    x = "Count"
  ) +
  scale_fill_manual(values = c("chocolate3", "darkseagreen2", "deepskyblue3")) +
  theme_minimal()


# When dinosaurs lived
ggplot(dinosaurs, aes(y = ecosystem, fill = ecosystem)) +
geom_bar(show.legend = FALSE) +
  labs(
    title = "When dinosaurs lived 🗓️",
    y = "Period",
    x = "Count"
  ) +
  theme_minimal()