Import your data
## install.packages("tidytuesdayR")
(readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-01-09/nhl_player_births.csv'))
## Rows: 8474 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): first_name, last_name, birth_city, birth_country, birth_state_prov...
## dbl (3): player_id, birth_year, birth_month
## date (1): birth_date
##
## ℹ 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.
## # A tibble: 8,474 × 9
## player_id first_name last_name birth_date birth_city birth_country
## <dbl> <chr> <chr> <date> <chr> <chr>
## 1 8467867 Bryan Adams 1977-03-20 Fort St. James CAN
## 2 8445176 Donald Audette 1969-09-23 Laval CAN
## 3 8460014 Eric Bertrand 1975-04-16 St-Ephrem CAN
## 4 8460510 Jason Botterill 1976-05-19 Edmonton CAN
## 5 8459596 Andrew Brunette 1973-08-24 Sudbury CAN
## 6 8445733 Kelly Buchberger 1966-12-02 Langenburg CAN
## 7 8460573 Hnat Domenichelli 1976-02-17 Edmonton CAN
## 8 8459450 Shean Donovan 1975-01-22 Timmins CAN
## 9 8446675 Nelson Emerson 1967-08-17 Hamilton CAN
## 10 8446823 Ray Ferraro 1964-08-23 Trail CAN
## # ℹ 8,464 more rows
## # ℹ 3 more variables: birth_state_province <chr>, birth_year <dbl>,
## # birth_month <dbl>
readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2024/2024-01-09/canada_births_1991_2022.csv')
## Rows: 384 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (3): year, month, births
##
## ℹ 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.
## # A tibble: 384 × 3
## year month births
## <dbl> <dbl> <dbl>
## 1 1991 1 32213
## 2 1991 2 30345
## 3 1991 3 34869
## 4 1991 4 35398
## 5 1991 5 36371
## 6 1991 6 34378
## 7 1991 7 35436
## 8 1991 8 34421
## 9 1991 9 34410
## 10 1991 10 33092
## # ℹ 374 more rows
Pivoting
long to wide form
wide to long form
Separating and Uniting
Separate a column
Unite two columns
Missing Values