knitr::opts_chunk$set(comment='#>')
options(warnPartialMatchArgs = FALSE)

kino

{kino} was born out of my experience checking out English original soundtrack movie options in Münster. Understandably, the trailers and descriptions are in German, but searching for their English counterparts feels unnecessarily tedious - this should be automatable! The idea is to scrape screening and German movie information from cineplex.de and rating and English movie information from imdb.com and omdb's API. Eventually, I'll build a shiny app on top of this, so anyone can use it! :)

At the moment, the package is still under construction and only works with "originals" movies in Münster.

Installation

You can install {kino} from github with:

# install the remotes package first if you don't have it already:
# install.packages("remotes")

remotes::install_github("sowla/kino")

Here's how you might use {kino}

First, select a city and checkout the available screening details:

library(kino)

my_city <- get_city(city_url = "https://www.cineplex.de/filmreihe/originals/614/muenster/")

my_screenings_details <- get_screenings(my_city)

my_screenings_details

You can also use the example_screenings_details data I've included, which is the result of running the same code on 14th March 2019.

example_screenings_details

Filter the results based on eg. site or release types:

filter_screenings(
  example_screenings_details, 
  sel_sites = "Cinema",  # Cinema & Kurbelkiste branch
  sel_release_types = c("2D OmU", "2D OV")
)

Decide which movies you're interested in and retreive some/all IMDB details:

imdb_details <- convert_movies("Der verlorene Sohn")

imdb_details

imdb_details$imdb_id

my_movie_info <- get_mov_info_en(imdb_details$imdb_id)

cat(strwrap(my_movie_info$plot), sep = "\n")  # strwrap() and cat() to format output

Note: if you use filter_movies() function, it'll give a warning message for any unavailable details.

# this will give a fatal error:
dplyr::select(my_movie_info, title, hey, runtime, plot)
cat("Error in .f(.x[[i]], ...) : object 'hey' not found")
# this returns a data frame for just the available details
filter_movies(my_movie_info, c("title", "hey", "runtime", "plot"))


sowla/kino documentation built on May 21, 2019, 4:06 a.m.