The Open Movie Database (OMDb) is an API that can be used to collect information on various movies. Whether you are looking for ratings or basic information, you can find it here. https://www.omdbapi.com My use for this assignemnt is to find the ratings for my favorite childhood show, Power Rangers S.P.D.
Setting Up the Code
You must library all of your packages first.
# Load packageslibrary(tidyverse) # All the tidy things
Warning: package 'readr' was built under R version 4.5.2
Warning: package 'forcats' was built under R version 4.5.2
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.6
✔ forcats 1.0.1 ✔ stringr 1.5.1
✔ ggplot2 3.5.2 ✔ tibble 3.3.0
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.1.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(jsonlite) # Converting json data into data frames
Attaching package: 'jsonlite'
The following object is masked from 'package:purrr':
flatten
library(magrittr) # Extracting items from list objects using piping grammar
Attaching package: 'magrittr'
The following object is masked from 'package:purrr':
set_names
The following object is masked from 'package:tidyr':
extract
library(httr) # Interacting with HTTP verbs
Then get your url set up for the specific movie or show you want to learn more about.