title: How to filter the data and plot a column chart using the facet wrap in r?
body: <p><a href="https://www.kaggle.com/shivamb/netflix-shows-and-movies-exploratory-analysis/notebook" rel="nofollow noreferrer">https://www.kaggle.com/shivamb/netflix-shows-and-movies-exploratory-analysis/notebook</a> contains the data set. (File size is 2.1 MB) </p>
  
  <p>I am looking the achieve the following things the data set - 
  Identify the top 25 leading actors from the countries of United States, United Kingdom and India. </p>
  
  <p>The code that I worked out is as follows,</p>
  
  <pre><code>library(tidyverse)
  net_flix &lt;- read.csv("netflix_titles_nov_2019.csv")
  
  net_flix %&gt;% 
      separate_rows(country, sep = ",")%&gt;% 
      filter(country == "India"| country == "United States"| country == "United Kingdom")%&gt;%
      separate_rows(cast, sep = ",")%&gt;%
      count(cast)%&gt;%
      slice_max(n, n = 25)%&gt;%
      ggplot(aes(y = fct_reorder(cast, n), x = n))+
      geom_col()
  </code></pre>
  
  <p>The resultant output is as follows,</p>
  
  <p><a href="https://i.stack.imgur.com/cG9UE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cG9UE.png" alt="enter image description here"></a></p>
  
  <p>The expected output is as follows,(only the top part of the chart) </p>
  
  <p><a href="https://i.stack.imgur.com/4VRbR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4VRbR.png" alt="enter image description here"></a></p>
  
  <p>The attempt is made after reviewing the suggested question <code>https://stackoverflow.com/questions/55864054/filtering-the-data-using-pickerinput-and-plotting-based-on-the-filtered-data-i</code></p>