Starwars

starwars
code
analysis
Author

Your Name

Published

October 30, 2023

Let’s analyze the starwars data:

starwars <- read_csv("https://bcdanl.github.io/data/starwars.csv")
rmarkdown::paged_table(starwars) 

Variable Description for starwars data.frame

The following describes the variables in the starwars data.frame.

  • films List of films the character appeared in

  • name Name of the character

  • species Name of species

  • height Height (cm)

  • mass Weight (kg)

  • hair_color, skin_color, eye_color Hair, skin, and eye colors

  • birth_year Year born (BBY = Before Battle of Yavin)

  • sex The biological sex of the character, namely male, female, hermaphroditic, or none (as in the case for Droids).

  • gender The gender role or gender identity of the character as determined by their personality or the way they were programmed (as in the case for Droids).

  • homeworld Name of homeworld

Human vs. Droid

ggplot(data = 
         starwars %>% 
         filter(species %in% c("Human", "Droid"))) +
  geom_boxplot(aes(x = species, y = mass, 
                   fill = species),
               show.legend = FALSE)