Skip to content
/ tmdbR Public

R package to interact with the API from The Movie Database (TMDB) directly from R.

License

Notifications You must be signed in to change notification settings

myanesp/tmdbR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmdbR: a package to interact with and obtain data from The Movie DB using its API in R

R-CMD-check CodeFactor Project Status: Active - The project has reached a stable, usable state and is being actively developed.

What does this package do?

This package allows you to easily interact and obtain data from TMDB, through its API (you must have one!), directly from R. Also, it has custom functions that allows you to transform the data you obtain, making it more powerful and descriptive. Nonetheless, please be aware that the package is in an alpha stages so not all the features are available and some bugs may appear.

All the functions are made following strictly the reference of the API, and any term a function may need has to be equal to the terms on that page.

Features

  • Ability to get the list of the top 20 of: top rated movies/TV shows, trending movies/TV shows, daily and weekly trending media, etc.
  • Ability to get details from your media flexibly: whatever you want, you have it!
  • Ability to obtain the streaming service providers where the media can be watched (thanks to JustWatch and its partnertship with TMDB).
  • Ability to convert the genres id's into real genres. Who wants to know that 'The Godfather' is genre 18, when we know it's a drama!
  • Ability to search for movies, TV shows or people directly from your console.
  • Other information like similar movies, information about companies, cast, what's next...

Installation

if (!require("remotes")) install.packages("remotes")
remotes::install_github("myanesp/tmdbR")
# And then load into your current session
library(tmdbR)

Usage

You have to register for an account on the TMDB website, and then request your personal API.

Once you have your API token, that is your magic key in order to tinker with TMDB from R, you have to stored it in a .txt. Then, load it into your session by calling set_api_tmdb("your_file.txt"), and you are ready to go!

As we strictly follow the parameters proposed by TMDB, take a look at its documentation page to be familiar with the terms.

Examples

# return a list of the top 20 trending movies
get_trending_movies() 

# return results that matches your search
search_tmdb("friends") 

# add a new column called "genres" that has the name of the genres, instead of only having their id's.
transform_genres(trending_movies) 

# return a list of available suscriptions platforms in Spain where you can watch The Godfather
get_streaming_providers(238, "movie", "ES") 

Roadmap

Final notes

This project is not endorsed, related or funded by TMDB nor JustWatch.

About

R package to interact with the API from The Movie Database (TMDB) directly from R.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages