Import data

# excel file
data <- read_excel("data/myData.xlsx")
## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900

## Warning in read_fun(path = path, sheet_i = sheet, limits = limits, shim =
## shim, : NA inserted for an unsupported date prior to 1900
data
## # A tibble: 892 × 10
##    driverId driverRef   number code  foren…¹ surname dob                 natio…²
##       <dbl> <chr>       <chr>  <chr> <chr>   <chr>   <dttm>              <chr>  
##  1       26 speed       "\\N"  "SPE" Scott   Speed   1983-01-24 00:00:00 Americ…
##  2      121 andretti    "\\N"  "\\N" Michael Andret… 1962-10-05 00:00:00 Americ…
##  3      158 cheever     "\\N"  "\\N" Eddie   Cheever 1958-01-10 00:00:00 Americ…
##  4      193 sullivan    "\\N"  "\\N" Danny   Sulliv… 1950-03-09 00:00:00 Americ…
##  5      207 mario_andr… "\\N"  "\\N" Mario   Andret… 1940-02-28 00:00:00 Americ…
##  6      214 cogan       "\\N"  "\\N" Kevin   Cogan   1956-03-31 00:00:00 Americ…
##  7      239 lunger      "\\N"  "\\N" Brett   Lunger  1945-11-14 00:00:00 Americ…
##  8      240 ongais      "\\N"  "\\N" Danny   Ongais  1942-05-21 00:00:00 Americ…
##  9      249 rahal       "\\N"  "\\N" Bobby   Rahal   1953-01-10 00:00:00 Americ…
## 10      288 donohue     "\\N"  "\\N" Mark    Donohue 1937-03-18 00:00:00 Americ…
## # … with 882 more rows, 2 more variables: url <chr>, Column1 <chr>, and
## #   abbreviated variable names ¹​forename, ²​nationality

Plot Nationalities

data %>%
    
    ggplot(aes(nationality)) +
    geom_bar()