Skip to content

Commit

Permalink
Merge branch 'master' into print-html-table-inline
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone authored Jun 6, 2024
2 parents 4edc49d + 135dcdd commit 216c642
Show file tree
Hide file tree
Showing 35 changed files with 2,095 additions and 29 deletions.
72 changes: 63 additions & 9 deletions R/datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,60 @@
#'
"peeps"


#' Feature films in competition at the Cannes Film Festival
#'
#' @description
#'
#' Each entry in the `films` is a feature film that appeared in the official
#' selection during a festival year (starting in 1946 and active to the present
#' day). The `year` column refers to the year of the festival and this figure
#' doesn't always coincide with the release year of the film. The film's title
#' reflects the most common title of the film in English, where the
#' `original_title` column provides the title of the film in its spoken language
#' (transliterated to Roman letters where necessary).
#'
#' @format A tibble with 1,851 rows and 8 variables:
#' \describe{
#' \item{year}{The year of the festival in which the film was in competition.}
#' \item{title,original_title}{The `title` field provides the film title used
#' for English-speaking audiences. The `original_title` field is populated when
#' `title` differs greatly from the non-English original.}
#' \item{director}{The director or set of co-directors for the film. Multiple
#' directors are separated by a comma.}
#' \item{languages}{The languages spoken in the film in the order of appearance.
#' This consists of a ISO 639 language codes (primarily as two-letter codes,
#' but using three-letter codes where necessary).}
#' \item{countries_of_origin}{The country or countries of origin for the
#' production. Here, 2-letter ISO 3166-1 country codes (set in uppercase) are
#' used.}
#' \item{run_time}{The run time of the film in hours and minutes. This is given
#' as a string in the format '<x>h <y>m'.}
#' \item{imdb_url}{The URL of the film's information page in the Internet Movie
#' Database (IMDB).}
#' }
#'
#' @section Examples:
#'
#' Here is a glimpse at the data available in `films`.
#'
#' ```{r}
#' dplyr::glimpse(films)
#' ```
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-9
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_films.png")`
#' }}
#'
#' @section Dataset Introduced:
#' *In Development*
#'
"films"

#' The stations of the Paris Metro
#'
#' @description
Expand Down Expand Up @@ -612,7 +666,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-9
#' DATA-10
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_metro.png")`
Expand Down Expand Up @@ -658,7 +712,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-10
#' DATA-11
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_gibraltar.png")`
Expand Down Expand Up @@ -707,7 +761,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-11
#' DATA-12
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_constants.png")`
Expand Down Expand Up @@ -800,7 +854,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-12
#' DATA-13
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_illness.png")`
Expand Down Expand Up @@ -904,7 +958,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-13
#' DATA-14
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_reactions.png")`
Expand Down Expand Up @@ -963,7 +1017,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-14
#' DATA-15
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_photolysis.png")`
Expand Down Expand Up @@ -1024,7 +1078,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-15
#' DATA-16
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_nuclides.png")`
Expand Down Expand Up @@ -1094,7 +1148,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-16
#' DATA-17
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_rx_adsl.png")`
Expand Down Expand Up @@ -1167,7 +1221,7 @@
#'
#' @family datasets
#' @section Dataset ID and Badge:
#' DATA-17
#' DATA-18
#'
#' \if{html}{\out{
#' `r data_get_image_tag(file = "dataset_rx_addv.png")`
Expand Down
1 change: 1 addition & 0 deletions R/utils_examples.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ write_gt_examples_qmd_files <- function(
"exibble",
"towny",
"peeps",
"films",
"metro",
"gibraltar",
"constants",
Expand Down
17 changes: 17 additions & 0 deletions data-raw/09-films.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
library(tidyverse)

films <-
readr::read_csv(
file = "data-raw/films.csv",
col_types =
cols(
year = col_integer(),
title = col_character(),
original_title = col_character(),
director = col_character(),
languages = col_character(),
countries_of_origin = col_character(),
run_time = col_character(),
imdb_url = col_character()
)
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1,852 changes: 1,852 additions & 0 deletions data-raw/films.csv

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions data-raw/zz_process_datasets.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ source("data-raw/05-pizzaplace.R")
source("data-raw/06-exibble.R")
source("data-raw/07-towny.R")
source("data-raw/08-peeps.R")
source("data-raw/09-metro.R")
source("data-raw/10-gibraltar.R")
source("data-raw/11-constants.R")
source("data-raw/12-illness.R")
source("data-raw/13-reactions.R")
source("data-raw/14-photolysis.R")
source("data-raw/15-nuclides.R")
source("data-raw/16-gt_clinical.R")
source("data-raw/09-films.R")
source("data-raw/10-metro.R")
source("data-raw/11-gibraltar.R")
source("data-raw/12-constants.R")
source("data-raw/13-illness.R")
source("data-raw/14-reactions.R")
source("data-raw/15-photolysis.R")
source("data-raw/16-nuclides.R")
source("data-raw/17-gt_clinical.R")

# Create external datasets
usethis::use_data(
countrypops, sza, gtcars, sp500,
pizzaplace, exibble, towny, peeps, metro,
gibraltar, constants, illness, reactions,
photolysis, nuclides, rx_adsl, rx_addv,
pizzaplace, exibble, towny, peeps, films,
metro, gibraltar, constants, illness,
reactions, photolysis, nuclides,
rx_adsl, rx_addv,
internal = FALSE, overwrite = TRUE
)
Binary file added data/films.rda
Binary file not shown.
Binary file added images/dataset_films.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions images/dataset_films.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion man/constants.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/countrypops.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/exibble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

94 changes: 94 additions & 0 deletions man/films.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/gibraltar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/gtcars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/illness.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/metro.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 216c642

Please sign in to comment.