<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/a-glimpse-into-the-daily-life-of-a-data-scientist/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://omaymas.github.io/Data_Science_Life/"> Once Upon a Data</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A couple of weeks ago, I had a discussion with a co-worker regarding a project I was involved in, I felt that there was no clear understanding of the daily challenges data scientists face. Few days later, I was at Rstudio::Conf 2017 where I met lots of data scientists from academia and industry. Later on, I described one of the conference’s positive side effects as “group therapy”, where one could see how others face the same challenges and struggle with similar issues. So it was like a personal sanity check!</p>
<p>When I came back to work, I decided to share with other teams more details about my daily work to help them understand the nature of my job, set their expectations and avoid conflicts. So I sent them a shorter version of the following.</p>
<p></p>
<table>
<tr>
<td width="50%">
<font color="dimgray "><i>“We are living in a Kafkaesque universe when we are doing data stuff.”<br>
<a target="_blank" rel="nofollow" href="https://youtu.be/-K9SjrWpeys?t=35">[1]</a></i><br>
</font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Josh Wills,<br>
Head of data engineering at Slack</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>As the role of data scientists evolve in different industries, it might be hard for some individuals or teams to get exactly what data scientists are doing, what they need, what challenges they face and why do they take time to come up with the simplest outputs. Or simply <strong>what on earth are we doing in the first place?</strong></p>
<p>Here is a glimpse into the world of data science as I know it through the eyes of experienced data scientists and based on my short experience. Hopefully, this will help us avoid getting into the infinite loop of sadness as things get more complex.</p>
<p></p>
<p><center>
<figure>
<img src="https://i2.wp.com/omaymas.github.io/images/2017-1-25-Data_Scientist_Life/1-loop.png?w=50%25" data-recalc-dims="1">
<figcaption><i>Infinite Loop of Sadness/Empathy, Josh Wills <a target="_blank" rel="nofollow" href="https://youtu.be/-K9SjrWpeys?t=35">[1]</a></i></figcaption>
</figure>
<p></p>
<p></p>
<p>So I will try to address the following questions:</p>
<ul>
<li>
<p>What accounts for the most of the work of data scientists?</p>
</li>
<li>
<p>Why things go slow sometimes even if data seems to be available?</p>
</li>
<li>
<p>What are the main characteristics of good data analysis? And what are the common critical issues?</p>
</li>
</ul>
<h2>What accounts for the most of the work of data scientists?</h2>
<table>
<tr>
<td width="50%">
<font color="dimgray "><i>“Practically, because of the diversity of data, you spend a lot of your time being a data janitor, before you can get to the cool, sexy things that got you into the field in the first place”<br>
<a target="_blank" rel="nofollow" href="https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html?_r=1">[2]</a> </i><br>
</font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Matt Mohebbi,<br>
Data scientist and co-founder of Iodine</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>Most of the time, the other teams see the tip of the iceberg. They see the results; the nice visualizations, the models, the patterns,..etc. However, as per a survey conducted by CrowdFlower<a target="_blank" rel="nofollow" href="http://www.forbes.com/sites/gilpress/2016/03/23/data-preparation-most-time-consuming-least-enjoyable-data-science-task-survey-says/#56343b777f75">[3]</a> , “data scientists spend, on average, around 80% of their time on preparing and managing data for analysis”. And since this part is really critical and painful, researchers and data scientists try to create tools and systems to make it easier. For instance, <a target="_blank" rel="nofollow" href="http://news.mit.edu/2017/system-finds-links-related-data-digital-files-querying-filtering-0119">Taming Data</a>; a recent article on MIT news, mentions <a target="_blank" rel="nofollow" href="http://cidrdb.org/cidr2017/papers/p44-deng-cidr17.pdf">Data Civilizer</a> system as a trial to <em>“decrease the grunt work needed to facilitate the analysis of<br>
data in the wild”</em> <a target="_blank" rel="nofollow" href="http://cidrdb.org/cidr2017/papers/p44-deng-cidr17.pdf">[4]</a>.</p>
<p><center>
<figure>
<img src="https://i1.wp.com/omaymas.github.io/images/2017-1-25-Data_Scientist_Life/2-survey.jpg?w=80%25" data-recalc-dims="1">
<figcaption>CrowdFlower Survey Results</figcaption>
</figure>
<p></p>
<h2>Why things go slow sometimes even if data seems to be available?</h2>
<table>
<tr>
<td width="50%">
<font color="dimgray"><i>“It’s an absolute myth that you can send an algorithm over raw data and have insights pop up.”<br>
<a target="_blank" rel="nofollow" href="https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html?_r=1">[2]</a> </i><br>
</font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Jeffrey Heer, <br>
Professor of computer science at the University of Washington and<br> a co-founder of Trifacta<br>
</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>Although data seems to be available all the time, one can still struggle to put it in the right format, which seems a simple quick task but the underlying known/unknown issues makes it really time consuming sometimes. From my experience, I could list some issues:</p>
<h3>Reading Data</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><i>“Reading data can be horrific.”</i></font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Hadley Wickham, <br>
Chief Scientist at RStudio</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>It might be surprising that people keep developing packages in different languages just to read data in the desired format, handle missing values, handle encoding issues, assign the right data classes,..etc. Every time a new source is imported, a new issue might pop-up. One could identify it, spend some time tracking it or even lose one’s sanity to find out!</p>
<h3>Preparing Data</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><br>
<i>“Tidy datasets are all alike but every messy dataset is messy in its own way.”<br>
<a target="_blank" rel="nofollow" href="http://vita.had.co.nz/papers/tidy-data.pdf">[6]</a><br>
</i><br>
</font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Hadley Wickham, <br>
Chief Scientist at RStudio</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>It is recommended, in almost every type of analysis to start with tidy data, i.e. data organized in form where:</p>
<ul>
<li>
<p><em>Each variable forms a column</em></p>
</li>
<li>
<p><em>Each observation forms a row</em></p>
</li>
<li>
<p><em>Each type of observational unit forms a table</em> <a target="_blank" rel="nofollow" href="http://vita.had.co.nz/papers/tidy-data.pdf">[6]</a></p>
</li>
</ul>
<p>In most of the cases, data does not come in such format or come from different sources. One can spend an awful lot of time working on merging and transforming data from messy to tidy.</p>
<h3>Tracking Changes in Data Sources</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><i>“You prepared your data for a certain purpose, but then you learn something new, and the purpose changes.”<a target="_blank" rel="nofollow" href="https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html?_r=1">[2]</a></i></font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Cathy O’Neil</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>During the journey of data analysis, one might need to change directions, go back to reinvestigate, or take a new path due to new discoveries, especially if one starts with exploratory analysis where everything is possible.</p>
<p>The following issues makes things harder:</p>
<ul>
<li>
<p><strong>Updates in data sources</strong> that are not synchronized with the data used in the analysis. In such cases, one might struggle to keep track of all changes.</p>
</li>
<li>
<p><strong>Change in purpose</strong> that was initially directing the work. With this change, one might need to put data in a different form, add more sources, track the changes, fix the scripts, test them, etc.</p>
</li>
</ul>
<h3>Processing Data</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><i>“If you torture the data long enough, it will confess.”</i></font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Ronald Coase</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>Data processing can be a really time consuming, it can even be a mutual torturing activity, however this depends on several factors such as data size, resources (hardware, software, internet connection!), purpose of analysis, using extracts versus live data, required accuracy and much more!</p>
<p>At some points, one does not have control over all the factors. One could get stuck with a slow chunk of code that imposes certain limitations. Several approaches could be adopted according to the available time, resources and urgency of task. One could try to profiling and optimizing the code, scaling up and getting more resources, getting back to data preparation and putting it in another form or pre-aggregate some values if possible, or just tolerate slowness if other solutions will take a longer time!</p>
<h3>Delivering Preliminary Results</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><i>“An approximate answer to the right problem is worth a good deal more than an exact answer to an approximate problem.”</i></font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>John Tukey</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>Here comes the final part where others see the results, and start to feel that the data scientists were not messing up. To get the desired results and avoid going into loops or repeating analysis a data scientist needs:</p>
<ul>
<li>
<p><strong>Clear realistic expectations</strong>:<br>
Tell me what is the minimum acceptable accuracy, what tradeoffs you can tolerate and what time limit you cannot exceed. I will start exploring and tell you what I can deliver, how long do I need to give you an update, what resources do I need <em>(extra data, data entry personnel…etc.)</em>.</p>
</li>
<li>
<p><strong>Involvement of all stakeholders</strong>:<br>
If a product manager, developers and business people are involved, I would like to get them to understand the hurdles I face, the pop-up issues and the sources of delay. We could find out that the initial target was not realistic or will be time consuming, so we’ll adjust and compromise.</p>
</li>
</ul>
<h3>Interpreting Results</h3>
<table>
<tr>
<td width="50%"><font color="dimgray "><i>“In real life there is no such person as the average man. There are only particular men, women and children, each with his or her inborn idiosyncrasies of mind and body.”</i></font></td>
<td width="50%"></td>
</tr>
<tr>
<td width="50%" align="right"><i>Aldous Huxley<br>
Brave New World Revisisted</i></td>
<td width="50%"></td>
</tr>
</table>
<p></p>
<p>Whenever we deal with data; especially when it is about people, it is hard to summarize everything in one single measure. Sometimes people ask about the <em>“average number of users who do x”</em>, look at <em>R^2^</em>, or other measures and jump to a conclusion. But, in most of the cases, one needs to dig deeper, combine different measures, go to a lower level of granularity, etc. to make better inference and this may take some time.</p>
<h2>What are the main characteristics of good data analysis?</h2>
<p>In her talk, <a target="_blank" rel="nofollow" href="http://www.slideshare.net/hilaryparker/opinionated-analysis-development">Opinionated Analysis Development</a> at Rstudio:Conf 2017, Hilary parker, a data analyst at StitchFix, highlighted that a good data analysis should be <strong>Reproducible, Accurate, and Collaborative</strong>:</p>
<ul>
<li>
<p><strong>Reproducible</strong>:<br>
Some of the analyses are required once, others are required more or grow with time. So making reproducible analysis, parameterized reports, and maintaining code makes it easier to avoid lots of issues. This would take sometime at the beginning , but saves time later especially if the underlying data changes.</p>
</li>
<li>
<p><strong>Accurate</strong><br>
It might take some time to write an efficient code, one sometimes hurry at the beginning to come up with results under pressure. But eventually as things get more complex, one gets obliged to stop and clean the code to be able to keep moving forward. So starting with an accurate code would always be a good practice.</p>
</li>
<li>
<p><strong>Collaborative</strong><br>
This is important in case more than one person collaborate on the same code/files.</p>
</li>
</ul>
<p>Hilary Parker also grouped the most common issues under the previous three points</p>
<p></p>
<p><center>
<figure>
<img src="https://i0.wp.com/omaymas.github.io/images/2017-1-25-Data_Scientist_Life/3-hp1.png?w=80%25" data-recalc-dims="1">
<figcaption><i>Opinionated Analysis Development, Hilary Parker-Slide 25<br>
<a target="_blank" rel="nofollow" href="http://www.slideshare.net/hilaryparker/opinionated-analysis-development">[7]</a></i></figcaption>
</figure>
<p></p>
<p></p>
<p>She also suggested approaches to address each group</p>
<p></p>
<p><center>
<figure>
<img src="https://i2.wp.com/omaymas.github.io/images/2017-1-25-Data_Scientist_Life/3-hp2.png?w=80%25" data-recalc-dims="1">
<figcaption><i>Opinionated Analysis Development, Hilary Parker-Slide 57<br>
<a target="_blank" rel="nofollow" href="http://www.slideshare.net/hilaryparker/opinionated-analysis-development">[7]</a></i></figcaption>
</figure>
<p></p>
<p></p>
<h2>In Conclusion</h2>
<p>The daily life of data scientists is full of challenges. It certainly differs from one to another, depending on the industry, organization, type of data, and many factors. But having this understood by other teams, and considering the hidden part of the iceberg, might help. And I encourage every individual/team with a dynamic or new role to communicate with others and explain their challenging hidden part of their jobs.</p>
<h1>Resources</h1>
<p><a target="_blank" rel="nofollow" href="https://youtu.be/-K9SjrWpeys?t=352">1-Data Engineering and Data Science: Bridging the Gap-DataEDGE 2016, Josh Wills, Slack</a></p>
<p><a target="_blank" rel="nofollow" href="https://www.nytimes.com/2014/08/18/technology/for-big-data-scientists-hurdle-to-insights-is-janitor-work.html?_r=1">2-For Big-Data Scientists, ‘Janitor Work’ Is Key Hurdle to Insights, Steve Lohr, NYT</a></p>
<p><a target="_blank" rel="nofollow" href="http://www.forbes.com/sites/gilpress/2016/03/23/data-preparation-most-time-consuming-least-enjoyable-data-science-task-survey-says/#56343b777f75">3-Cleaning Big Data: Most Time-Consuming, Least Enjoyable Data Science Task, Survey Says, Gil Press, Forbes</a></p>
<p><a target="_blank" rel="nofollow" href="http://cidrdb.org/cidr2017/papers/p44-deng-cidr17.pdf">4-The Data Civilizer System</a></p>
<p><a target="_blank" rel="nofollow" href="http://news.mit.edu/2017/system-finds-links-related-data-digital-files-querying-filtering-0119">5- Taming Data, Larry Hardesty, MIT News Office</a></p>
<p><a target="_blank" rel="nofollow" href="http://vita.had.co.nz/papers/tidy-data.pdf">6- Tidy Data, Hadley Wickham, Rstudio</a></p>
<p><a target="_blank" rel="nofollow" href="http://www.slideshare.net/hilaryparker/opinionated-analysis-development">7- Opinionated Analysis Development, Hilary Parker, Stitch Fix</a></p>
<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://omaymas.github.io/Data_Science_Life/"> Once Upon a Data</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 title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/YrXaGtjm-NA"></a></div></center></center></center></center>