<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/5%c2%bd-reasons-to-ditch-spreadsheets-for-data-science-code-is-poetry/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://lucidmanager.org/spreadsheets-for-data-science/"> The Devil is in the Data – The Lucid Manager</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>The post <a rel="nofollow" href="https://lucidmanager.org/spreadsheets-for-data-science/" target="_blank">5½ Reasons to Ditch Spreadsheets for Data Science: Code is Poetry</a> appeared first on <a rel="nofollow" href="https://lucidmanager.org/" target="_blank">The Lucid Manager</a>.</p>
<p>When I studied civil engineering some decades ago, we solved all our computing problems by writing code. Writing in BASIC or PASCAL, I could quickly perform fundamental engineering analysis, such as reinforced concrete beams, with my home-brew software library. Soon after I started my career, spreadsheets became widely available, and I fully embraced this fantastic business tool, first Lotus 123 and later grudgingly moved to MS Excel.</p>
<figure class="wp-caption"><img data-orig-file="https://i2.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2018/11/atari_conrete.jpg?fit=1273%2C759&amp;ssl=1" data-orig-size="1273,759" data-medium-file="https://i2.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2018/11/atari_conrete.jpg?fit=300%2C179&amp;ssl=1" data-attachment-id="7478" data-image-meta="{" data-image-description="" src="https://i2.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2018/11/atari_conrete.jpg?resize=525%2C313&ssl=1" data-permalink="https://lucidmanager.org/spreadsheets-for-data-science/atari_conrete/" data-large-file="https://i2.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2018/11/atari_conrete.jpg?fit=525%2C313&amp;ssl=1" alt="Screendump of Atari BASIC program to estimate concrete reinforcement surface area." data-image-title="atari_conrete" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" width="450" data-comments-opened="1" class="wp-image-7478" data-recalc-dims="1"><figcaption class="wp-caption-text">Screendump of Atari BASIC program (in Dutch) to estimate concrete reinforcement surface area.</figcaption></figure>
<p>Spreadsheets were excellent in those early days because data, code, visualisations and tabular output are all stored in one convenient file. Creating graphs with computer code was a bit of a nightmare in those days, so spreadsheets were a minor miracle. The next twenty years, I must have created thousands of spreadsheets of varying complexity. I even developed a ‘jungle’ of interlinked spreadsheets to manage progress reporting.</p>
<p><iframe allowfullscreen="true" src="https://www.youtube.com/embed/YDvbDiJZpy0?version=3&rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent" width="450" type="text/html"></iframe></p>
<p>In the pioneering days of spreadsheets, they provided enormous convenience for engineers and other professionals to quickly develop analytical tools. But after using this tool for a few years, cracks started to appear.</p>
<h2>Spreadsheets are Chaos</h2>
<p>Throughout my career, I had many nightmarish experiences trying to reverse engineer spreadsheets, even the ones I wrote myself. The combination of data, code and output that I loved at the start of my career was reaching its limits.</p>
<p>Spreadsheets use incomprehensible names for variables (</p>
<pre>AZ346</pre>
<p>, </p>
<pre>XC89</pre>
<p> and so on) and the formulas are impossible to read because all code is cramped on one line with deeply nested logic. The multiple parentheses make Excel formulas are even harder to read than LISP expressions. Furthermore, spreadsheets hide the formulas behind the results, which renders spreadsheets notoriously hard to understand.</p>
<p>My love affair with the spreadsheet came to an end when I started writing my dissertation about <a rel="nofollow" href="https://lucidmanager.org/invisible-water-utility/" target="_blank">customer service for water utilities</a>. Excel was incapable of helping me with the complex machine learning I needed to draw my conclusions. A colleague suggested I look into this new thing called ‘Data Science’ and this advice changed my career.</p>
<h2>Code is Poetry</h2>
<p>I decided to learn how to write code in the R language for statistical analysis. The R language is like a Swiss army chainsaw for engineers with capabilities that far exceed anything a spreadsheet can do.</p>
<p>Writing in code, such as R or Python, is like writing an instruction manual on how to analyse data. Anyone who understands the language will be able to know how you derived your conclusions. Modern data science languages can generate print-quality visualisations and can output results in many formats, including a spreadsheet.</p>
<p>In my job as a <a rel="nofollow" href="https://lucidmanager.org/data-science-strategy-water-utilities/" target="_blank">data science manager for a water utility</a> I use R code for everything. The awesome power of being able to easily combine large data sets, visualise data and undertake complex analysis.</p>
<p>Now that I have rediscovered the poetry of writing computer code, I advocate learning to use R or perhaps Python and ditch the spreadsheet. On my <a rel="nofollow" href="https://lucidmanager.org/devil-is-in-the-data/" target="_blank">data science blog</a>, I share examples of creating value and having fun with the R language. The only purpose I still have for spreadsheets is an interface for small data sets.</p>
<figure class="wp-caption"><a rel="nofollow" href="https://lucidmanager.org/geographic-bubble-chart/" target="_blank"><img data-orig-file="https://i0.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2017/08/VietTri_cropped.png?fit=1496%2C1122&amp;ssl=1" data-orig-size="1496,1122" data-medium-file="https://i0.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2017/08/VietTri_cropped.png?fit=300%2C225&amp;ssl=1" data-attachment-id="966" data-image-meta="{" data-image-description="" src="https://i0.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2017/08/VietTri_cropped.png?resize=525%2C394&ssl=1" data-permalink="https://lucidmanager.org/geographic-bubble-chart/viettri_cropped/" data-large-file="https://i0.wp.com/lucidmanager.org/wp-content/blogs.dir/4/files/sites/4/2017/08/VietTri_cropped.png?fit=525%2C394&amp;ssl=1" alt="Geographic Bubble Chart: Visualising Water Consumption in Vietnam." data-image-title="Viet Tri water consumption bubble chart" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" width="450" data-comments-opened="1" class="wp-image-966" data-recalc-dims="1"></a><figcaption class="wp-caption-text">Geographic Bubble Chart: Visualising Water Consumption in Vietnam.</figcaption></figure>
<h2>5½ Reasons to Ditch the Spreadsheet</h2>
<p>If you are still using spreadsheets, or you are trying to convince a colleague to ditch this tool, here are 5½ reasons to start using code to analyse data:</p>
<ol>
<li>Good analysis is reproducible and can be peer-reviewed. Spreadsheets are hard to understand because of non-sequential references. Computer code is like an instruction book that can be read step-by-step.</li>
<li>Spreadsheet variables are hard to understand (e.g.
<pre>ZX81:ZX99</pre>
<p>). In computer code, you give them meaningful names (e.g. </p>
<pre>sales[81:99]</pre>
<p>).
<li>Best practice in data management is to separate data, code and output. In spreadsheets, it is not immediately clear which cell is the result of another cell and which ones are raw data. Computer code separates the data from the code and the output.</li>
<li>You can only share spreadsheet output with people who have access to the relevant software package. Computer code can produce output in <a rel="nofollow" href="https://lucidmanager.org/r-sweave-and-latex/" target="_blank">multiple formats, such as HTML, PDF</a> or even Excel, including <a rel="nofollow" href="https://shiny.rstudio.com/" target="_blank">interactive dashboards</a> you can publish on the web.</li>
<li>Functionality in spreadsheets is limited to what is made available by Microsoft. The R and Python languages are extendable and have extensive libraries to solve complex problems.</li>

<p>The bonus reason to ditch the spreadsheet is that the best data science software, such as R and Python, is Open Source and freely available on the web. No license fees and it comes with terrific community support.</p>
<p>Feel free to leave a comment if you like to defend the spreadsheet. If you have additional reasons to ditch this venerable but largely obsolete tool.</p>
<p>Subscribe to this monthly blog if you are interested in using the R language for practical data science and some fun.</p>
<p>The post <a rel="nofollow" href="https://lucidmanager.org/spreadsheets-for-data-science/" target="_blank">5½ Reasons to Ditch Spreadsheets for Data Science: Code is Poetry</a> appeared first on <a rel="nofollow" href="https://lucidmanager.org/" target="_blank">The Lucid Manager</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="https://lucidmanager.org/spreadsheets-for-data-science/"> The Devil is in the Data – The Lucid Manager</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/4ZdgoLRdWjg" height="1"></a></div></ol>