<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/nice-ggplot-with-sad-data-something-happens-with-women-in-science/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://allthiswasfield.blogspot.com/2018/03/nice-ggplot-with-sad-data-something.html"> long time ago...</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p></p>
<div>   </div>
<div>   Last March 8, millions of women in more than 170 countries around the world joined street protests calling for “a society free of sexist oppression, exploitation and violence”. Spanish strike was one of the <a rel="nofollow" href="http://www.bbc.com/news/world-europe-43324406?ocid=socialflow_facebook&ns_mchannel=social&ns_campaign=bbcnews&ns_source=facebook" target="_blank">most numerous</a>, where around 5.3 million women joined the strike. Today, I will use some data (<a rel="nofollow" href="https://drive.google.com/open?id=10jJyjcaqtCgBvvc5ed2HnsI3nOUMDPw3" target="_blank">download</a>) regarding the scientific career in Spain (<a rel="nofollow" href="http://www.csic.es/mujeres-y-ciencia" target="_blank">2016</a>) to make a plot using ggplot2 and discuss about it. Here you have the graph and the code:</div>
<div></div>
<div></div>
<div></div>
<div><a rel="nofollow" href="https://i0.wp.com/3.bp.blogspot.com/-2oVhv8Ten78/Wqmhknjb-DI/AAAAAAAAAOA/eDrPSUuHLswRwNlXKjULS_D9qxIeIlx4ACLcBGAs/s1600/women.png?ssl=1" target="_blank"><img border="0" src="https://i1.wp.com/3.bp.blogspot.com/-2oVhv8Ten78/Wqmhknjb-DI/AAAAAAAAAOA/eDrPSUuHLswRwNlXKjULS_D9qxIeIlx4ACLcBGAs/s400/women.png?resize=450%2C669&ssl=1" data-original-width="450" width="450" data-original-height="669" data-recalc-dims="1"></a></div>
<div></div>
<div></div>
<p></p>
<pre><code> library(ggplot2)  <br> library(scales)  <br> dat &lt;- read.csv(&quot;wis.csv&quot;)  <br> dat$pos &lt;-  <br>  factor(dat$pos, levels = c(&quot;pre&quot;, &quot;post&quot;, &quot;ryc&quot;, &quot;ct&quot;, &quot;ic&quot; , &quot;pi&quot;))  <br> ggplot(dat, aes(x = pos, y = per)) +  <br>  geom_line(size = 3, aes(group = sex, color = sex)) +  <br>  geom_point() +  <br>  geom_text(aes(label = round(per * 100, 1)), vjust = -1, size = 4) +  <br>  labs(  <br>   title = &quot;Women in Science \n Spanish National Research Council&quot;,  <br>   x = &quot;research stage&quot;,  <br>   y = &quot;sex ratio&quot;,  <br>   color = &quot; \n&quot;,  <br>   subtitle = &quot;(2016)&quot;  <br>  ) +  <br>  scale_color_manual(labels = c(&quot;women&quot;, &quot;men&quot;),  <br>            values = c(&quot;purple&quot;, &quot;orange&quot;)) +  <br>  scale_x_discrete(  <br>   breaks = c(&quot;pre&quot;, &quot;post&quot;, &quot;ryc&quot;, &quot;ct&quot;, &quot;ic&quot; , &quot;pi&quot;),  <br>   labels = c(  <br>    &quot;Predoctoral&quot;,  <br>    &quot;Postdoctoral&quot;,  <br>    &quot;Ramón y Cajal&quot;,  <br>    &quot;Científico\nTitular&quot;,  <br>    &quot;Investigador\nCientífico&quot;,  <br>    &quot;Profesor de\nInvestigación&quot;  <br>   )  <br>  ) +  <br>  scale_y_continuous(labels = percent) +  <br>  theme(  <br>   text = element_text(size = 15),  <br>   legend.text = element_text(size = 15),  <br>   axis.text.x = element_text(face = &quot;bold&quot;, size = 11, angle = 30),  <br>   axis.title = element_text(size = 14, face = &quot;bold&quot;),  <br>   plot.title = element_text(hjust = 0.5, face = &quot;bold&quot;, size = 20),  <br>   plot.subtitle = element_text(hjust = 0.5, size = 19)  <br>  )  <br></code></pre>
<div>In X axis, we can see the stages at the Spanish National Research Council (known in Spanish as CSIC) positions, from young PhD candidates (left – “Predoctoral”) to the highest level, Research Professor (right – “Profesor de Investigación”). It’s easy to understand: in Spain, there are more women starting a scientific career than men, but only few of them get to the highest positions in CSIC.
<p>We usually call this the “scissors graph”, since the two curves soon cross each other changing the trend shown at the beginning. For the last stages this imbalance between males and females can be due to the age (mean age of Research Professor in CSIC is around 58 years old, and things have changed a lot in Spain since 30 years ago). However, the graph shows that for the earlier stages this imbalance is still being a problem: just from PhD candidate stage to first postdoctoral position, women lose around 15% positions in favor of men. <a rel="nofollow" href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2247379/" target="_blank">And this is not only happening in Spain</a>. Only active politics and special measures orientated to these first stages could change the trend for the highest positions in the future!</p>
<p>If you want to know a little bit more about women in science in Spain, here you have a <a rel="nofollow" href="https://drive.google.com/open?id=14IZi1MTgkpWK_op4LDb2s7HLWKTcI1tc" target="_blank">poster</a> made by some friends from the Ecology Department in Universidad de Alcalá.</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="http://allthiswasfield.blogspot.com/2018/03/nice-ggplot-with-sad-data-something.html"> long time ago...</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 alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/v_9WVeqW6V0" height="1"></a></div>