Skip to content

Commit

Permalink
Order genres data by film order etc
Browse files Browse the repository at this point in the history
  • Loading branch information
erictleung committed Nov 17, 2024
1 parent cebc6f2 commit 3d2c428
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions data-raw/get_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,14 @@ subgenres <-
filter(!value %in% genres$value) %>%
select(film, category, value)

# Put genres and subgenre categories into a single table
genres <- bind_rows(genres, subgenres)
# Put genres and subgenre categories into a single table and polish
genres <-
genres %>%
bind_rows(subgenres) %>%
left_join(pixar_films %>% select(number, film), by = "film") %>%
arrange(number, category, value) %>%
select(-number) %>%
distinct()


# Clean box office information --------------------------------------------
Expand All @@ -435,7 +441,7 @@ box_office <-
boxoffice %>%
clean_names() %>%
filter(film != "Film") %>%
select(-ref) %>% # 2024-11-10 Rename of column from ref_s -> ref
select(-c(ref, year)) %>% # 2024-11-10 Rename of column from ref_s -> ref
rename(
box_office_us_canada = box_office_gross,
box_office_other = box_office_gross_2,
Expand Down

0 comments on commit 3d2c428

Please sign in to comment.