BLACK FRIDAY EXTRA SAVINGS EVENT - EXTENDED
START FREE

Unable to create overlayed histogram or Kernel Density Plot

Screen Link: https://app.dataquest.io/m/410/guided-project%3A-investigating-fandango-movie-ratings/5/comparing-distribution-shapes-for-2015-and-2016

My Code:

library(readr)
library(tidyverse)
library(stringr)

fandango_score_comparison <- read_csv("fandango_score_comparison.csv")
movie_ratings_16_17 <- read_csv("movie_ratings_16_17.csv")

previous_set <- fandango_score_comparison %>%
                mutate(year = str_sub(FILM, start=-5, end =-2)) %>%
                filter(year == "2015")

pre_set <- previous_set %>%
                     select(Film = FILM, year, Stars =Fandango_Stars)%>%
                     mutate(year = as.numeric(year))

after_set <- movie_ratings_16_17 %>%
                  select(movie,year,fandango) %>%
                filter(year == "2016")

post_set<- after_set %>%
          select(Film = movie, year, Stars = fandango) %>%
          mutate(year = as.numeric(year))

combined_df <- bind_rows(pre_set,post_set)
ggplot(data = combined_df, aes(x = Stars, color=year)) + geom_density()

What I expected to happen:
Kernel Density Plot (KDP_ would be displayed with two plots, one for the year 2015 and the other for the year 2016

What actually happened:
A single Kernel Density Plot shows up with stars for both 2015 and 2016 observations. I am unable to create two KDF overlayed by combining two data sets and applying color = year.

Replace this line with the output/error

The KDP with the current code is: