library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6      ✔ purrr   0.3.4 
## ✔ tibble  3.1.8      ✔ dplyr   1.0.10
## ✔ tidyr   1.2.1      ✔ stringr 1.4.1 
## ✔ readr   2.1.2      ✔ forcats 0.5.2 
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
starwars_raw <- read_csv('https://vincentarelbundock.github.io/Rdatasets/csv/dplyr/starwars.csv')
## New names:
## Rows: 87 Columns: 12
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (8): name, hair_color, skin_color, eye_color, sex, gender, homeworld, sp... dbl
## (4): ...1, height, mass, birth_year
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...1`

Graph 1: Bar chart of genders, with a title, x-axis, y-axis labels.

ggplot(starwars_raw) +
  geom_bar(aes(x = gender)) +
  ggtitle("Bar chart of genders")

Graph 2: Scatterplot of mass vs height, colored according to birth year

ggplot(starwars_raw) +
  geom_point(aes(x = mass, y = height, color = birth_year))
## Warning: Removed 28 rows containing missing values (geom_point).