<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/business-science-earl-sf-2017-presentation-tidyquant-timekit-and-more/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.business-science.io/presentations/2017/06/18/earl-2017.html"> business-science.io - Articles</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>The <a rel="nofollow" href="https://earlconf.com/sanfrancisco/" target="_blank">EARL SF 2017</a> conference was just held June 5 – 7 in San Francisco, CA. There were some amazing presentations illustrating how R is truly being embraced in enterprises. We gave a <strong>three-part presentation</strong> on <code>tidyquant</code> for financial data science at scale, <code>timekit</code> for time series machine learning, and <em>Business Science</em> enterprise applications. We’ve uploaded the <a rel="nofollow" href="https://www.youtube.com/watch?v=8BYjv1AKI1Y" target="_blank">EARL presentation to YouTube</a>. Check out the presentation, and don’t forget to <a rel="nofollow" href="http://www.business-science.io/presentations/2017/06/18/earl-2017.html#announcements" target="_blank">check out our announcements</a> and to <a rel="nofollow" href="http://www.business-science.io/presentations/2017/06/18/earl-2017.html#social" target="_blank">follow us on social media</a> to stay up on the latest <em>Business Science</em> news, events and information!</p>
<h1>EARL 2017 Presentation</h1>
<p>If you’re interested in financial analysis, forecasting, and business applications, check out our 30 minute presentation from EARL SF 2017! The presentation is three-in-one:</p>
<ol>
<li>Financial data science at scale with <code>tidyquant</code> (0:45)</li>
<li>Time series machine learning with <code>timekit</code> (9:10)</li>
<li>Enterprise applications with <em>Business Science</em> (23:00)</li>
</ol>
<p><iframe allowfullscreen src="https://www.youtube.com/embed/8BYjv1AKI1Y" width="100%" align="center" height="500"></iframe></p>
<h2>Forecasting daily CRAN downloads</h2>
<p>One of the big areas of interest on <a rel="nofollow" href="https://twitter.com/hadleywickham/status/870624661616209922" target="_blank">twitter</a> leading up to the presentation was this tweet from Hadley showing growth in daily CRAN downloads are up to 1.25M per day:</p>
<p><center><br>
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">Total daily CRAN downloads for the RStudio mirror for the last 3 years. <a rel="nofollow" href="https://twitter.com/hashtag/rstats?src=hash" target="_blank">#rstats</a> <a rel="nofollow" href="https://t.co/Wo5zz3xZyc" target="_blank">pic.twitter.com/Wo5zz3xZyc</a></p>
<p>— Hadley Wickham (@hadleywickham) <a rel="nofollow" href="https://twitter.com/hadleywickham/status/870624661616209922" target="_blank">June 2, 2017</a></p></blockquote>
<p></p>
<p>…and our response showing that it’s quite possible to <strong>exceed 2M downloads per day</strong> by end of the year!</p>
<p><center><br>
<blockquote class="twitter-tweet" data-lang="en">
<p lang="en" dir="ltr">What the future may bring… <a rel="nofollow" href="https://t.co/NObnNTXDcv" target="_blank">pic.twitter.com/NObnNTXDcv</a></p>
<p>— Matt Dancho (@mdancho84) <a rel="nofollow" href="https://twitter.com/mdancho84/status/870737108729835521" target="_blank">June 2, 2017</a></p></blockquote>
<p></p>
<h2>How we made the CRAN daily download forecast graph</h2>
<p>Several in the <a rel="nofollow" href="https://twitter.com/search?q=%23rstats&src=tyah" target="_blank">#rstats</a> community wanted to know how <a rel="nofollow" href="https://twitter.com/mdancho84/status/870737108729835521" target="_blank">this forecast</a> was made:</p>
<p><img alt="EARL SF 2017 Presentation" src="https://i2.wp.com/www.business-science.io/assets/cran-dload-forecast.png?w=456" data-recalc-dims="1"></p>
<p>It turns out that it’s actually a combination (or ensemble) of four separate predictions:</p>
<ol>
<li><code>prophet</code> with linear growth</li>
<li><code>prophet</code> with logistic growth</li>
<li><code>timekit</code> using a linear regression on the time series signature</li>
<li><code>timekit</code> using a spline first to track trend and then a linear regression on the augmented data frame including the times series signature and the spline</li>
</ol>
<p>We first made a log transformation and then calculated the for separate models. The key takeaway is that individually, none of the forecasts was a silver bullet! Each had issues with either the training set or the test set. The <code>prophet</code> models tended to detect trend better while the <code>timekit</code> models tended to detect pattern better.</p>
<p><img alt="EARL SF 2017 Presentation" src="https://i0.wp.com/www.business-science.io/assets/ensemble-forecast1.PNG?w=456" data-recalc-dims="1"></p>
<p>However, when combined via a simple average of the models, the ensemble prediction exhibited both low training and test error.</p>
<p><img alt="EARL SF 2017 Presentation" src="https://i1.wp.com/www.business-science.io/assets/ensemble-forecast2.PNG?w=456" data-recalc-dims="1"></p>
<p>If you’d like to take a deep dive into the code, the <a rel="nofollow" href="https://github.com/business-science/presentations/blob/master/EARL_SF_2017/cran_dload_prediction.R" target="_blank">cran_dload_prediction.R</a> file is available for download on the <a rel="nofollow" href="https://github.com/business-science" target="_blank"><em>Business Science</em> GitHub site</a>.</p>
<h1>Download Presentation and Code on GitHub</h1>
<p>The slide deck and code from the EARL SF 2017 presentation can be downloaded from the <a rel="nofollow" href="https://github.com/business-science/presentations/tree/master/EARL_SF_2017" target="_blank">Business Science GitHub site</a>.</p>
<p><img alt="EARL 2017 Presentation" src="https://i0.wp.com/www.business-science.io/assets/earl-2017.PNG?w=456" data-recalc-dims="1"></p>
<p><center><a rel="nofollow" href="https://github.com/business-science/presentations/tree/master/EARL_SF_2017" target="_blank">Download the EARL SF 2017 Presentation Slides!</a></center></p>
<h1>Announcements <a></a></h1>
<ul>
<li>
<p>We have completed the new package, <code>sweep</code>, which aims at “tidying” up the <code>forecast</code> workflow by applying <code>broom</code> concepts to the various model functions (<code>auto.arima()</code>, <code>ets()</code>, etc) and <code>forecast()</code> output. It’s not on CRAN quite yet, but we are encouraging testing. You can download from github: <code>devtools::install_github(&quot;business-science/sweep&quot;)</code>. Please provide feedback on the <a rel="nofollow" href="https://github.com/business-science/sweep" target="_blank">sweep github site</a>!</p>
</li>
<li>
<p>We are working on a name change of the <code>timekit</code> package. While we love the name, there’s also <a rel="nofollow" href="https://www.timekit.io/" target="_blank">timekit.io</a> that shares a product by the same name. To make it easier differentiating the software products, we are considering the change to <code>timekitr</code>. This transition is expected to take place in July.</p>
</li>
</ul>
<h1>Follow Business Science on Social Media <a></a></h1>
<ul>
<li><a rel="nofollow" href="https://twitter.com/bizScienc" target="_blank">@bizScienc</a> is on <a rel="nofollow" href="https://twitter.com/bizScienc" target="_blank">twitter</a>!</li>
<li>Check us out on <a rel="nofollow" href="https://www.linkedin.com/company/business.science" target="_blank">LinkedIn</a>!</li>
<li>Sign up for <a rel="nofollow" href="http://www.business-science.io/" target="_blank">our insights blog</a> to stay updated!</li>
<li>If you like our software, <a rel="nofollow" href="https://github.com/business-science" target="_blank">star our GitHub packages</a> <img alt="🙂" src="https://s.w.org/images/core/emoji/2/72x72/1f642.png" class="wp-smiley"></li>
</ul>
	<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://www.business-science.io/presentations/2017/06/18/earl-2017.html"> business-science.io - Articles</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/KJOw3S8sGRs" height="1"></a></div></center></center>