<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/gender-diversity-in-the-film-industry/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://www.mango-solutions.com/blog/gender-diversity-in-the-film-industry"> RBlog – Mango Solutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>The year 2017 has completely turned the film industry upside down. The allegations of harassment and sexual assault against Harvey Weinstein have raised the issue of sexism and misogyny in this industry to the eyes of the general public. In addition, it has helped raise awareness of the <strong>poor gender diversity and under-representation of women in Hollywood</strong>. One of the main problems posed by the low presence of women behind the camera is that this is then reflected in the fictional characters on screen: lots of movies portray women in an incomplete, stereotyped and biased way.</p>
<p>This post focuses on some key <strong>behind-the-camera roles</strong> to measure the evolution of gender diversity in the last decade – from 2007 until 2017. The roles I studied were: <strong>directors</strong>, <strong>writers</strong>, <strong>producers</strong>, <strong>sound teams</strong>, <strong>music teams</strong>, <strong>art teams</strong>, <strong>makeup teams</strong> and <strong>costume teams</strong>.</p>
<p>The whole code to reproduce the following results is available on <a rel="nofollow" href="https://github.com/MangoTheCat/Gender-diversity-film-industry" target="_blank"><code>GitHub</code></a>.</p>
</div>
<div>
<h3>Data frame creation – Web scraping</h3>
<p>What I needed first was a list which gathered the names connected to film job roles for 50 movies. For each year between 2007 and 2017, I gathered the information about the 50 most profitable movies of the year from the <strong>IMDb website</strong>.</p>
<p>As a first step, I built data frames which contained the titles of these movies, their gross profit and their IMDb crew links – which shows the names and roles of the whole movie crew. The following code is aimed at building the corresponding data frame for the 50 most profitable movies of 2017.</p>
<pre><code><span># IMDB TOP US GROSSING 2017: 50 MORE PROFITABLE MOVIES OF 2017 -------------</span>

url &lt;- <span>&quot;https://www.imdb.com/search/title?release_date=2017-01-01,2017-12-31&amp;sort=boxoffice_gross_us,desc&quot;</span>
page &lt;- read_html(url)

<span># Movies details</span>
movie_nodes &lt;- html_nodes(page, <span>'.lister-item-header a'</span>) 
movie_link &lt;- sapply(html_attrs(movie_nodes),`[[`,<span>'href'</span>)
movie_link &lt;- paste0(<span>&quot;http://www.imdb.com&quot;</span>, movie_link)
movie_crewlink &lt;- gsub(<span>&quot;[?]&quot;</span>, <span>&quot;fullcredits?&quot;</span>, movie_link) <span>#Full crew links</span>
movie_name &lt;- html_text(movie_nodes)
movie_year &lt;- rep(<span>2017</span>, <span>50</span>)
movie_gross &lt;- html_nodes(page, <span>'.sort-num_votes-visible span:nth-child(5)'</span>) %>%
  html_text()

<span># CREATE DATAFRAME: TOP 2017 ----------------------------------------------</span>

top_2017 &lt;- data.frame(movie_name, movie_year, movie_gross, movie_crewlink, stringsAsFactors = <span>FALSE</span>)</code></pre>
<p>Let’s have a look at the <code>top_2017</code> data frame:</p>
<pre><code>##                                movie_name movie_year movie_gross
## 1 Star Wars: Episode VIII - The Last Jedi       2017    $620.18M
## 2                    Beauty and the Beast       2017    $504.01M
## 3                            Wonder Woman       2017    $412.56M
## 4          Jumanji: Welcome to the Jungle       2017    $404.26M
## 5         Guardians of the Galaxy: Vol. 2       2017    $389.81M
## 6                   Spider-Man Homecoming       2017    $334.20M
##                                                   movie_crewlink
## 1 http://www.imdb.com/title/tt2527336/fullcredits?ref_=adv_li_tt
## 2 http://www.imdb.com/title/tt2771200/fullcredits?ref_=adv_li_tt
## 3 http://www.imdb.com/title/tt0451279/fullcredits?ref_=adv_li_tt
## 4 http://www.imdb.com/title/tt2283362/fullcredits?ref_=adv_li_tt
## 5 http://www.imdb.com/title/tt3896198/fullcredits?ref_=adv_li_tt
## 6 http://www.imdb.com/title/tt2250912/fullcredits?ref_=adv_li_tt</code></pre>
<p>I adapted the previous code in order to build equivalent data frames for the past 10 years. I then had 11 data frames: <code>top2017</code>, <code>top2016</code>, …, <code>top2007</code>, which gathered the names, years, gross profit and crew links of the 50 most profitable movies of each year.</p>
<p>I combined these 11 data frames into one data frame called <code>top_movies</code>.</p>
</div>
<div>
<h3>List creation – Web scraping</h3>
<p>After that, I had a data frame with 550 rows, and I next needed to build a list which gathered:</p>
<ul>
<li>the years from 2007 to 2017</li>
<li>for each year, the names of the top 50 grossing movies corresponding</li>
<li>for each movie, the names of the people whose job was included in one of the categories I listed above (director, writer, costume teams)</li>
</ul>
<p>In order to build this list, I navigated through all the IMDb full crew web pages stored in our <code>top_movies</code> data frame, and did some <strong>web scraping </strong>again to gather the information listed above.</p>
<pre><code>movies_list &lt;- list()

<span>for</span> (r <span>in</span> seq_len(nrow(top_movies))) {
  
  <span># FOCUS ON EACH MOVIE -----------------------------------------------------------------</span>
  movie_name &lt;- top_movies[r, <span>&quot;movie_name&quot;</span>]
  movie_year &lt;- as.character(top_movies[r, <span>&quot;movie_year&quot;</span>])
  page &lt;- read_html(as.character(top_movies[r, <span>&quot;movie_crewlink&quot;</span>]))
  
  <span># GATHER THE CREW NAMES FOR THIS MOVIE ------------------------------------------------</span>
  movie_allcrew &lt;- html_nodes(page, <span>'.name , .dataHeaderWithBorder'</span>) %>%
    html_text()
  movie_allcrew &lt;- gsub(<span>&quot;[\n]&quot;</span>, <span>&quot;&quot;</span>, movie_allcrew) %>%
    trimws() <span>#Remove white spaces </span>
  
  <span># SPLIT THE CREW NAMES BY CATEGORY ----------------------------------------------------</span>
  movie_categories &lt;- html_nodes(page, <span>'.dataHeaderWithBorder'</span>) %>%
    html_text()
  movie_categories &lt;- gsub(<span>&quot;[\n]&quot;</span>, <span>&quot;&quot;</span>, movie_categories) %>%
    trimws() <span>#Remove white spaces</span>
    
  <span>## MUSIC DEPARTMENT -------------------------------------------------------------------</span>
  movie_music &lt;- c()
  <span>for</span> (i <span>in</span> <span>1</span>:(length(movie_allcrew)-<span>1</span>)){
    <span>if</span> (grepl(<span>&quot;Music by&quot;</span>, movie_allcrew[i])){
      j &lt;- <span>1</span>
      <span>while</span> (! grepl(movie_allcrew[i], movie_categories[j])){
        j &lt;- j+<span>1</span>
      }
      k &lt;- i+<span>1</span>
      <span>while</span> (! grepl(movie_categories[j+<span>1</span>], movie_allcrew[k])){
        movie_music &lt;- c(movie_music, movie_allcrew[k])
        k &lt;- k+<span>1</span>
      }
    }
  }
  <span>for</span> (i <span>in</span> <span>1</span>:(length(movie_allcrew)-<span>1</span>)){
    <span>if</span> (grepl(<span>&quot;Music Department&quot;</span>, movie_allcrew[i])){
      j &lt;- <span>1</span>
      <span>while</span> (! grepl(movie_allcrew[i], movie_categories[j])){
        j &lt;- j+<span>1</span>
      }
      k &lt;- i+<span>1</span>
      <span>while</span> (! grepl(movie_categories[j+<span>1</span>], movie_allcrew[k])){
        movie_music &lt;- c(movie_music, movie_allcrew[k])
        k &lt;- k+<span>1</span>
      }
    }
  }
  <span>if</span> (length(movie_music) == <span>0</span>){
    movie_music &lt;- c(<span>&quot;&quot;</span>)
  }
    
  <span>## IDEM FOR OTHER CATEGORIES ---------------------------------------------------------</span>
    
  <span>## MOVIE_INFO CONTAINS THE MOVIE CREW NAMES ORDERED BY CATEGORY ----------------------</span>
  movie_info &lt;- list()
  movie_info$directors &lt;- movie_directors
  movie_info$writers &lt;- movie_writers
  movie_info$producers &lt;- movie_producers
  movie_info$sound &lt;- movie_sound
  movie_info$music &lt;- movie_music
  movie_info$art &lt;- movie_art
  movie_info$makeup &lt;- movie_makeup
  movie_info$costume &lt;- movie_costume
    
  <span>## MOVIES_LIST GATHERS THE INFORMATION FOR EVERY YEAR AND EVERY MOVIE ----------------</span>
  movies_list[[movie_year]][[movie_name]] &lt;- movie_info

}</code></pre>
<p>Here are some of the names I collected:</p>
<pre><code>## - Star Wars VIII 2017, Director:
## Rian Johnson</code></pre>
<pre><code>## - Sweeney Todd 2007, Costume team:
## Colleen Atwood, Natasha Bailey, Sean Barrett, Emma Brown, Charlotte Child, Charlie Copson, Steve Gell, Liberty Kelly, Colleen Kelsall, Linda Lashley, Rachel Lilley, Cavita Luchmun, Ann Maskrey, Ciara McArdle, Sarah Moore, Jacqueline Mulligan, Adam Roach, Sunny Rowley, Jessica Scott-Reed, Marcia Smith, Sophia Spink, Nancy Thompson, Suzi Turnbull, Dominic Young, Deborah Ambrosino, David Bethell, Mariana Bujoi, Mauricio Carneiro, Sacha Chandisingh, Lisa Robinson</code></pre>
</div>
<div>
<h3>Gender determination</h3>
<p>All of the names I needed to measure the gender diversity of were now gathered in the list <code>movies_list</code>. Then, I had to determine the gender of almost 275,000 names. This is what the R package <strong>GenderizeR</strong> does: “The genderizeR package uses genderize.io API to predict gender from first names”. At the moment, the genderize.io database contains 216286 distinct names across 79 countries and 89 languages. The data is collected from social networks from all over the world, which ensure the diversity of origins.</p>
<p>However, I am aware that determining genders based on names is not an ideal solution: some names are unisex, some people do not recognise themselves as male or female, and some transitioning transgender people still have their former name. But this solution was the only option I had, and as I worked on about 275,000 names, I assumed that the error induced by the cases listed above was not going to have a big impact on my results.</p>
<p>With this in mind, I used the <strong>GenderizeR</strong> package and applied its main function on the lists of names I gathered earlier in <code>movies_list</code>. The function <code>genderizeAPI</code> checks if the names tested are included in the genderize.io database and returns:</p>
<ul>
<li>the gender associated with the first name tested</li>
<li>the counts of this first name in database</li>
<li>the probability of gender given the first name tested.</li>
</ul>
<p>The attribute I was interested in was obviously the first one, the <strong>gender</strong> associated with the first name tested.</p>
<p>The aim was to focus on every category of jobs, and to count the number of males and females by category, film and year. With the script below, here is the information I added to each object <code>movies_list$year$film</code>:</p>
<ul>
<li>the number of male directors</li>
<li>the number of female directors</li>
<li>the number of male producers</li>
<li>the number of female producers</li>
<li>the number of males in costume team</li>
<li>the number of females in costume team</li>
</ul>
<p>The following code shows how I determined the gender of the directors’ names for every film in the <code>movie_list</code>. The code is similar for all the other categories.</p>
<pre><code><span># for each year</span>
<span>for</span> (y <span>in</span> seq_along(movies_list)){ 
  
  <span># for each movie</span>
  <span>for</span> (i <span>in</span> seq_along(movies_list[[y]])){
    
<span># Genderize directors -----------------------------------------------------</span>
    directors &lt;- movies_list[[y]][[i]]$directors
    
    <span>if</span> (directors == <span>&quot;&quot;</span>){
      directors_gender &lt;- list()
      directors_gender$male &lt;- <span>0</span>
      directors_gender$female &lt;- <span>0</span>
      movies_list[[y]][[i]]$directors_gender &lt;- directors_gender
    }
    
    <span>else</span>{
      <span># Split the firstnames and the lastnames</span>
      <span># Keep the firstnames</span>
      directors &lt;- strsplit(directors, <span>&quot; &quot;</span>)
      l &lt;- c()
      <span>for</span> (j <span>in</span> seq_along(directors)){
      l &lt;- c(l, directors[[j]][<span>1</span>])
      }
  
      directors &lt;- l
      movie_directors_male &lt;- <span>0</span>
      movie_directors_female &lt;- <span>0</span>
  
      <span># Genderize every firstname and count the number of males and females </span>
      <span>for</span> (p <span>in</span> seq_along(directors)){
        directors_gender &lt;- genderizeAPI(x = directors[p], apikey = <span>&quot;233b284134ae754d9fc56717fec4164e&quot;</span>)
        gender &lt;- directors_gender$response$gender
        <span>if</span> (length(gender)><span>0</span> &amp;&amp; gender == <span>&quot;male&quot;</span>){
          movie_directors_male &lt;- movie_directors_male + <span>1</span>
        }
        <span>if</span> (length(gender)><span>0</span> &amp;&amp; gender == <span>&quot;female&quot;</span>){
          movie_directors_female &lt;- movie_directors_female + <span>1</span>
        }
      }
  
      <span># Put the number of males and females in movies_list</span>
      directors_gender &lt;- list()
      directors_gender$male &lt;- movie_directors_male
      directors_gender$female &lt;- movie_directors_female
      movies_list[[y]][[i]]$directors_gender &lt;- directors_gender
    }  
    
<span># Idem for the 7 other categories ----------------------------------------------------- </span>

  }
}</code></pre>
<p>Here are some examples of the number of male and female names I collected:</p>
<pre><code>## - Star Wars VIII 2017 
##  Number of male directors: 1 
##  Number of female directors: 0</code></pre>
<pre><code>## - Sweeney Todd 2007 
##  Number of male in costume team: 9 
##  Number of female in costume team: 20</code></pre>
</div>
<div>
<h3>Percentages calculation</h3>
<p>Once I had all the gender information listed above, the next step was to <strong>calculate percentages by year</strong>. I then went through the whole list <code>movies_list</code> and created a data frame called <code>percentages</code> which gathered the percentages of women in each job category for each year.</p>
<p>Let’s have a look at the <code>percentages</code> data frame:</p>
<pre><code>##    year women_directors women_writers women_producers women_sound
## 1  2017        3.571429      9.386282        23.03030    14.17497
## 2  2016        3.174603      9.174312        19.04762    14.02918
## 3  2015        6.000000     12.432432        21.19914    15.69061
## 4  2014        1.785714      8.041958        23.12634    14.89028
## 5  2013        1.886792     10.769231        22.86282    13.54005
## 6  2012        5.357143     10.227273        24.06542    12.33696
## 7  2011        3.846154      9.523810        19.73392    15.08410
## 8  2010        0.000000     10.526316        17.40088    16.06700
## 9  2009        7.407407     13.157895        21.24711    15.30185
## 10 2008        7.547170      9.756098        18.67612    14.70588
## 11 2007        3.333333      9.047619        17.42243    16.13904</code></pre>
<pre><code>##    year women_music women_art women_makeup women_costume
## 1  2017    22.46998  26.87484     68.22204      69.89796
## 2  2016    25.84896  25.04481     67.54386      69.44655
## 3  2015    20.46163  24.90697     68.83117      70.83333
## 4  2014    22.86967  22.31998     67.29508      67.47430
## 5  2013    20.46482  22.45546     63.88697      69.79495
## 6  2012    21.62819  20.90395     66.95402      68.83539
## 7  2011    18.09816  20.22792     70.09482      67.44548
## 8  2010    20.90137  22.38199     65.81118      68.72082
## 9  2009    19.15734  22.14386     61.15619      70.25948
## 10 2008    19.82984  21.80974     60.87768      71.20253
## 11 2007    19.64385  20.21891     59.23310      67.36035</code></pre>
</div>
<div>
<h3>Visualisation – gender diversity in 2017</h3>
<p>I was then able to visualise these percentages. For example, here is the code I used to visualise the <strong>gender diversity in 2017</strong>.</p>
<pre><code><span># Formating our dataframe</span>
percentages_t &lt;- data.frame(t(percentages), stringsAsFactors = <span>FALSE</span>)
colnames(percentages_t) &lt;- percentages_t[<span>1</span>, ]
percentages_t &lt;- percentages_t[-<span>1</span>, ]
rownames(percentages_t) &lt;- c(<span>&quot;directors&quot;</span>, <span>&quot;writers&quot;</span>, <span>&quot;producers&quot;</span>, <span>&quot;sound&quot;</span>, <span>&quot;music&quot;</span>, <span>&quot;art&quot;</span>, <span>&quot;makeup&quot;</span>, <span>&quot;costume&quot;</span>)

<span># Ploting our barplot</span>
percentages_2017 &lt;- percentages_t$`2017`
y &lt;- as.matrix(percentages_2017)

p &lt;- ggplot(percentages_t, aes(x = rownames(percentages_t),
                               y = percentages_2017, 
                               fill = rownames(percentages_t))) + 
  geom_bar(stat = <span>&quot;identity&quot;</span>) +
  coord_flip() + <span># Horizontal bar plot</span>
  geom_text(aes(label=format(y, digits = <span>2</span>)), hjust=-<span>0.1</span>, size=<span>3.5</span>) + <span># pecentages next to bars</span>
  theme(axis.text.y=element_blank(),
        axis.ticks.y=element_blank(),
        axis.title.y=element_blank(),
        legend.title=element_blank(),
        plot.title = element_text(hjust = <span>0.5</span>)) + <span># center the title</span>
  labs(title = <span>&quot;Percentages of women in the film industry in 2017&quot;</span>) +
  guides(fill = guide_legend(reverse=<span>TRUE</span>)) + <span># reverse the order of the legend</span>
  scale_fill_manual(values = brewer.pal(<span>8</span>, <span>&quot;Spectral&quot;</span>)) <span># palette used to fill the bars and legend boxs</span></code></pre>
<p><img sizes="(max-width: 1344px) 100vw, 1344px" src="https://i1.wp.com/www.mango-solutions.com/wp-content/uploads/sites/6/2018/07/image1.png?w=450&ssl=1" alt="" class="wp-image-6044" data-recalc-dims="1"></p>
<p>As we can see, in 2017, the behind-the-camera roles of both <strong>directors and writers</strong> show the <strong>most limited women occupation</strong>: less than 10% for writers and less than 4% for directors. This is really worrying considering that these are key roles which determine the way women are portrayed in front of the camera. Some studies have already shown that the more these roles are diversified in terms of gender, the more gender diversity is shown on screen.</p>
<p>Let’s go back to our barplot. Women are also under-represented in sound teams (14%), music teams (22.5%), producer roles (23%) and art teams (27%). The only jobs which seem open to women are the <strong>stereotyped female jobs of make-up artists and costume designers</strong>, among which almost 70% of the roles are taken by women.</p>
</div>
<div>
<h3>Visualisation – gender diversity evolution through the last decade</h3>
<p>Even if the 2017 results are not exciting, I wanted to know whether there had been an improvement through the last decade. The evolution I managed to visualise is as follows.</p>
<pre><code><span># From wide to long dataframe</span>
colnames(percentages) &lt;- c(<span>&quot;year&quot;</span>, <span>&quot;directors&quot;</span>, <span>&quot;writers&quot;</span>,<span>&quot;producers&quot;</span>, <span>&quot;sound&quot;</span>,    
                           <span>&quot;music&quot;</span>, <span>&quot;art&quot;</span>, <span>&quot;makeup&quot;</span>, <span>&quot;costume&quot;</span>)
percentages_long &lt;- percentages %>%
  gather(key = category, value = percentage, -year)
percentages_long$year &lt;- ymd(percentages_long$year, truncated = <span>2L</span>) <span># year as date </span>

<span># line plot</span>
evolution_10 &lt;- ggplot(percentages_long, aes(x = year,
                                             y = percentage,
                                             group = category,
                                             colour = category)) +
  geom_line(size = <span>2</span>) +
  theme(panel.grid.minor.x = element_blank(),
        plot.title = element_text(hjust = <span>0.5</span>)) + <span># center the title</span>
  scale_x_date(date_breaks = <span>&quot;1 year&quot;</span>, date_labels = <span>&quot;%Y&quot;</span>) +
  scale_color_manual(values = brewer.pal(<span>8</span>, <span>&quot;Set1&quot;</span>)) +
  labs(title = <span>&quot;Percentages of women in the film industry from 2007 to 2017&quot;</span>,
       x = <span>&quot;&quot;</span>,
       y = <span>&quot;Percentages&quot;</span>)</code></pre>
<p><img sizes="(max-width: 1344px) 100vw, 1344px" src="https://i1.wp.com/www.mango-solutions.com/wp-content/uploads/sites/6/2018/07/image2.png?w=450&ssl=1" alt="" class="wp-image-6045" data-recalc-dims="1"></p>
<p>The first thing I noticed is that <strong>the representativeness gap between the roles of make-up artists and costume designers and the other ones has not decreased in a flagrant way since 2007</strong>.</p>
<p>In addition, the roles that women are really under-represented – directors, writers and jobs related to sound, no improvement has been achieved.</p>
<p>If we focus on directors, we do not see any trend. Figures vary depending on the year we consider. For example <strong>in 2010, we notice that there are not any female directors among the 50 most profitable movies, and for other years it never goes beyond 7.5%</strong>. What is interesting for the role of director, the best levels of female representation were reached in 2008 and 2009. After these years the number of female directors has declined and never reached more than 6%.<strong> The percentage of women directors reached in 2017 is practically the same as the percentage reached in 2007</strong>.</p>
<p>We then notice an <strong>evenness in the number of female sound teams and writers</strong>: women consistently represent around 10% of writers and 15% of sound teams in the last decade. But there is no sign of improvement.</p>
<p>Only a <strong>slight improvement</strong> of 3-5% is notable among <strong>producers, music and art teams</strong>. But nothing astonishing.</p>
</div>
<div>
<h3>Visualisation – gender diversity forecasting in 2018</h3>
<p>The last step of our study was to forecast, at a basic level, these percentages for 2018. I used the <strong>forecast</strong> package and its function <code>forecast</code>, and then applied it to the data I collected between 2007 and 2017, in order to get this prediction:</p>
<pre><code><span># Time series</span>
ts &lt;- ts(percentages, start = <span>2007</span>, end = <span>2017</span>, frequency = <span>1</span>)

<span># Auto forecast directors 2018</span>
arma_fit_director &lt;- auto.arima(ts[ ,<span>2</span>])
arma_forecast_director &lt;- forecast(arma_fit_director, h = <span>1</span>)
dir_2018 &lt;- arma_forecast_director$fitted[<span>1</span>] <span># value predicted</span>

<span># Idem for writers, producers, sound, music, art, makeup and costume</span>

<span># Create a data frame for 2018 fitted values</span>
percentages_2018 &lt;- data.frame(year = ymd(<span>2018</span>, truncated = <span>2L</span>), 
                               women_directors = dir_2018, 
                               women_writers = writ_2018, 
                               women_producers = prod_2018, 
                               women_sound = sound_2018,
                               women_music = music_2018,
                               women_art = art_2018,
                               women_makeup = makeup_2018,
                               women_costume = costu_2018, 
                               stringsAsFactors = <span>FALSE</span>)

<span># Values from 2007 to 2017 + 2018 fitted values</span>
percentages_fitted_2018 &lt;- bind_rows(percentages, percentages_2018)</code></pre>
<pre><code><span># From wide to long dataframe</span>
colnames(percentages_fitted_2018) &lt;- c(<span>&quot;year&quot;</span>, <span>&quot;directors&quot;</span>, <span>&quot;writers&quot;</span>,<span>&quot;producers&quot;</span>, <span>&quot;sound&quot;</span>,    
                                      <span>&quot;music&quot;</span>, <span>&quot;art&quot;</span>, <span>&quot;makeup&quot;</span>, <span>&quot;costume&quot;</span>)
percentages_long_f2018 &lt;- percentages_fitted_2018 %>%
  gather(key = category, value = percentage, -year)
percentages_long_f2018$year &lt;- ymd(percentages_long_f2018$year, truncated = <span>2L</span>) <span># year as date</span>

<span># Forecast plot for 2018 </span>
forecast_2018 &lt;- ggplot(percentages_long_f2018, aes(x = year,
                                                    y = percentage,
                                                    group = category,
                                                    colour = category)) +
  geom_line(size = <span>2</span>)+
  theme(panel.grid.minor.x = element_blank(),
        plot.title = element_text(hjust = <span>0.5</span>)) + <span># center the title</span>
  scale_x_date(date_breaks = <span>&quot;1 year&quot;</span>, date_labels = <span>&quot;%Y&quot;</span>) +
  scale_color_manual(values = brewer.pal(<span>8</span>, <span>&quot;Set1&quot;</span>)) +
  labs(title = <span>&quot;Percentages of women in the film industry from 2007 to 2017\n Fitted values for 2018&quot;</span>,
       x = <span>&quot;&quot;</span>,
       y = <span>&quot;Percentages&quot;</span>)</code></pre>
<p><img sizes="(max-width: 1344px) 100vw, 1344px" src="https://i2.wp.com/www.mango-solutions.com/wp-content/uploads/sites/6/2018/07/image3.png?w=450&ssl=1" alt="" class="wp-image-6046" data-recalc-dims="1"></p>
<p>The predicted values I got for 2018 are <strong>approximately the same as the ones I calculated for 2017</strong>. However, it is a basic forecast, and it <strong>does not take into consideration the upheaval</strong> which happened in the film industry in 2017. This will surely have an impact on the gender diversity in the film industry. But to what extent? Has general awareness been sufficient to truly achieve change?</p>
<p>In any case, I sincerely hope that our forecasting is wrong and that a constant improvement will be seen in the next couple of years, so that <strong>female characters on cinema screens will become be more interesting and complex.</strong></p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://www.mango-solutions.com/blog/gender-diversity-in-the-film-industry"> RBlog – Mango Solutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/uoUwED5Cqqo" height="1"></a></div>