Course Title: Econ 106 Computer programming for economcis
Instructor: Christopher Llones
Exercise: Netflix Dataset Analysis in R
Due Date: 4 March 2026

Objective

This exercise will assess your ability to apply R programming skills specifically using the dplyr package and the pipe operator (%>%) to explore and analyze a real-world dataset. You will work with the Netflix Movies & TV Shows dataset to answer questions using code.

Instructions

  • Use R and the dplyr package to answer each question.

  • Submit your R script file (.R) with your code and outputs.

  • Use the pipe operator (%>%) for all data manipulations.

  • You may use additional packages like tidyr or stringr if needed.

  • Ensure your code is clean, commented, and reproducible.

TipDataset and files
  1. Access the dataset and R script template from the econ106-exercise-2 folder.

  2. Submit your completed R script file (.R) by the due date and upload using this link: Submission Link.

  3. You may temporarily save your script here.

Questions

Part 1: Data exploration

  1. How many rows and columns are in the dataset?

  2. List all unique types of content (e.g., Movie, TV Show).

  3. How many titles were released in 2020?

Part 2: filtering and summarising

  1. Filter the dataset to show only TV Shows released in India. How many are there?

  2. Find the top 5 most common ratings.

  3. Which year had the most titles added to Netflix?

Part 3: grouping and aggregation

  1. Group the data by type and count how many entries each type has.

  2. Group the data by release_year and summarize the number of titles released per year.

  3. Which country has produced the most content on Netflix?

Advanced Filtering

  1. Filter the dataset to show all Movies with a duration longer than 100 minutes.

  2. Find all titles directed by ‘Steven Spielberg’.

  3. List all titles with the genre containing ‘Documentary’.