class: center, middle, inverse, title-slide # rstudio::conf ## Stories from San Francisco ๐ ### (
@RLadiesLancs
) ### 2020-02-05 --- layout: true <div class = "rladies-header"> <span class="social"><table><tr><td><img src="images/twitter.gif"/></td><td> @RLadiesLancs</td></tr></table></span> </div> --- # RStudio Conference 2020 * In San Francisco * ~2400 attendees * Broad disciplines * 2 days workshops (materials online) * 2 days talks (videos online soon) * Lots of R-Ladies! <img src="images/rladies_rstudioconf.jpeg" width="500px" style="display: block; margin: auto;" /> --- # Workshops * All material [available online](https://github.com/rstudio-conf-2020) * A Practical Introduction to Data Visualization with ggplot2 Workshop * Applied Machine Learning Workshop * Big Data with R Workshop * Building Tidy Tools Workshop * Deep Learning with Keras and TensorFlow in R Workshop * Designing the Data Science Classroom Workshop * Introduction to Data Science in the Tidyverse Workshop * Introduction to Machine Learning with the Tidyverse Workshop * JavaScript for Shiny Users Workshop * Modern Geospatial Data Analysis with R Workshop * My Organization's First R Package Workshop * R for Excel Users Workshop * R Markdown and Interactive Dashboards Workshop * RStudio Instructor Training Workshop (1-day) * RStudio Professional Products Administration Workshop * Shiny From Start To Finish Workshop * Text Mining with Tidy Data Principles Workshop * Tidy Time Series and Forecasting in R Workshop * What They Forgot to Teach You about R Workshop --- # Tidy Time Series .pull-left[ * Rob Hyndman * Manipulating time series data * Forecasting * All in the tidyverse framework * Free book [FPP3](https://otexts.com/fpp3/) ## R packages * tsibble * feasts * fable ] .pull-right[ ![](images/rob.png) ] --- # What the flip is a tsibble? * A tsibble allows storage and manipulation of multiple time series in R. * It contains: * An index: time information about the observation * Measured variable(s): numbers of interest * Key variable(s): optional unique identifiers for each series * It works with tidyverse functions. <img src="images/tsibble.png" width="300px" style="display: block; margin: auto;" /> --- # Example
--- # Quarterly Australian Beer Production ```r beer <- aus_production %>% select(Quarter, Beer) %>% filter(year(Quarter) >= 1992) beer %>% autoplot(Beer) ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-4-1.png" height="400px" /> --- # Quarterly Australian Beer Production ```r beer %>% gg_season(Beer, labels = "right") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-5-1.png" height="400px" /> --- # Multiple seasonal periods ```r vic_elec %>% gg_season(Demand) ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-6-1.png" height="400px" /> --- # Multiple seasonal periods ```r vic_elec %>% gg_season(Demand, period = "week") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-7-1.png" height="400px" /> --- # Multiple seasonal periods ```r vic_elec %>% gg_season(Demand, period = "day") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-8-1.png" height="400px" /> --- # Quarterly Australian Beer Production ```r beer %>% gg_subseries(Beer) ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-9-1.png" height="400px" /> --- # Australian holidays ```r holidays <- tourism %>% filter(Purpose == "Holiday") %>% group_by(State) %>% summarise(Trips = sum(Trips)) holidays %>% autoplot(Trips) + ylab("thousands of trips") + xlab("Year") + ggtitle("Australian domestic holiday nights") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-10-1.png" height="400px" /> --- # Seasonal Plots ```r holidays %>% gg_season(Trips) + ylab("thousands of trips") + ggtitle("Australian domestic holiday nights") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-11-1.png" height="400px" /> --- # Seasonal subseries plots ```r holidays %>% gg_subseries(Trips) + ylab("thousands of trips") + ggtitle("Australian domestic holiday nights") ``` <img src="rstudio_conf_files/figure-html/unnamed-chunk-12-1.png" height="400px" /> --- # Calendar Plots <img src="rstudio_conf_files/figure-html/unnamed-chunk-13-1.png" height="400px" /> --- # RStudio becomes a PBC * Mission: Open source software for statistical computing * Started developing in 2008 * Corporations are by-default not trustworthy * Community needs to trust that our mission open-source software -- ## So far... * 250 open source projects * 36 full-time engineers dedicated to open source software (54%) * Hundreds of millions of downloads of open source products/packages <img src="images/RStudio-Logo-Flat.png" width="500px" style="display: block; margin: auto;" /> --- # Styling Shiny apps with Sass and Bootstrap * Joe Cheng * Shiny apps can look a bit samey * Use SASS to style * Fancy interactive helper function <img src="images/demo.gif" width="500px" style="display: block; margin: auto;" /> --- # Glamour of Graphics: Will Chase <img src="images/glamour.jpg" width="300px" style="display: block; margin: auto;" /> --- # Glamour of Graphics: skip the labels <blockquote class="twitter-tweet"><p lang="en" dir="ltr">I so agree with this statement from <a href="https://twitter.com/W_R_Chase?ref_src=twsrc%5Etfw">@W_R_Chase</a>: you remove the need for axis labels with good titles. Applies to simpler plots, but I think label all axes all the time is too strict an advice. <a href="https://twitter.com/hashtag/rstudioconf?src=hash&ref_src=twsrc%5Etfw">#rstudioconf</a> <a href="https://t.co/3LkJlLn00W">pic.twitter.com/3LkJlLn00W</a></p>— Mine CetinkayaRundel (@minebocek) <a href="https://twitter.com/minebocek/status/1222952045327446016?ref_src=twsrc%5Etfw">January 30, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- # Glamour of Graphics: skip the legend <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Awesome tip from <a href="https://twitter.com/W_R_Chase?ref_src=twsrc%5Etfw">@W_R_Chase</a> on legends - see if you can skip them entirely by using color in your title <a href="https://twitter.com/hashtag/rstudioconf?src=hash&ref_src=twsrc%5Etfw">#rstudioconf</a> <a href="https://t.co/qg5OG1dPKt">pic.twitter.com/qg5OG1dPKt</a></p>— Emily Robinson (@robinson_es) <a href="https://twitter.com/robinson_es/status/1222953128313544705?ref_src=twsrc%5Etfw">January 30, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> --- # Teacup giraffes * Gentle introduction to statistics with R * Nice story telling * Really cute graphics * [Website](https://tinystats.github.io/teacups-giraffes-and-statistics/01_introToR.html) <img src="images/giraffes.jpg" width="600px" style="display: block; margin: auto;" /> --- # Donโt Repeat Yourself, Talk To Yourself! * Repeated Reporting In The R Universe * [Sharla Gelfand](https://twitter.com/sharlagelfand) * [Slides](https://sharstudioconf.netlify.com/#1) * Write "chatty functions" using the **usethis** package ```r library("usethis") analysis_year <- 2019 ui_info("Hi") ``` ``` ## โน Hi ``` ```r ui_todo("Querying demographics data for {analysis_year}...") ``` ``` ## โ Querying demographics data for 2019... ``` ```r ui_done("Analysis complete") ``` ``` ## โ Analysis complete ``` --- # Object of type closure is not subsettable * [Jenny Bryan](https://twitter.com/jennybryan?lang=en) * [Slides](https://speakerdeck.com/jennybc/object-of-type-closure-is-not-subsettable) * Reset * Reprex * Debug * Deter <img src="images/repex.jpg" width="100px" style="display: block; margin: auto;" /> --- # Sewing a tidy dress <img src="images/amelia.jpg" width="500px" style="display: block; margin: auto;" /> * [GitHub](https://github.com/ameliamn/hexfabric) * [Blog Post](https://www.amelia.mn/blog/misc/2019/08/17/Tidy-Dress.html) --- # Live podcast * [Live episode](http://nssdeviations.com/100-live-from-rstudio-conf-2020) <img src="images/podcast.jpeg" width="600px" style="display: block; margin: auto;" />