BUA 455 - Week 13

Author

Penelope Pooler Eisenbies

Published

November 29, 2022

# this line specifies options for default options for all R Chunks
knitr::opts_chunk$set(echo=T, 
                      highlight=T)

# suppress scientific notation
options(scipen=100,
        getSymbols.warning4.0 = FALSE)

# install helper package (pacman), if needed
if (!require("pacman")) install.packages("pacman", repos = "http://lib.stat.cmu.edu/R/CRAN/")
Loading required package: pacman
# install and load required packages
# pacman should be first package in parentheses and then list others
pacman::p_load(pacman,tidyverse, knitr)

# verify packages (comment out in finished documents)
p_loaded()
 [1] "knitr"     "forcats"   "stringr"   "dplyr"     "purrr"     "readr"    
 [7] "tidyr"     "tibble"    "ggplot2"   "tidyverse" "pacman"   

Final Projects

Presentations are next week, Tue. 12/6 and Thu. 12/8

  • If your group wants to present on Tue. 12/6, let me know by Thursday.

    • Otherwise, random order will be posted on Friday.
  • Attendance required by all

  • Dress: Business casual with emphasis on casual

  • Suits, Ties, Dresses, and Jackets are NOT required

  • No sweats t-shirts or pjs

  • You will present better if you dress the part (at least a little)

  • All students should be prepared to answer questions about the work presented.

  • Each student will evaluate other groups and their own group members

  • All project components must be submitted by Tuesday, December 13th at 5:00 PM


Project Memos

  • Project Description - Memos are described on Page 5

  • Template for Memo to Supervisor

    • Supervisor Memo’s Goal:

      • Provide your supervisor with what they need
      • They will want to be knowledgeable about the data and dashboard, but have very limited time.
      • Predict questions they (supervisor) might have and questions a client might ask.
  • Template for memo to Colleague

    • Colleague Memo’s Goal:

      • Colleague should be able to follow memo to update dashboard quickly and seamlessly when new data are available.

      • I (or TAs) will follow memo and verify that instructions are clear, links are functional, and I can update dashboard based on this memo. when new data are available.

Questions about Project and Templates?


R Markdown (.Rmd) and Quarto (.qmd) formats

  • RStudio is currently in transition

  • Documents can be rendered from R Markdown (.Rmd) or Quarto (.qmd)

  • Presentations can be rendered from R Markdown (.Rmd) or Quart (.qmd)

    • Powerpoint

      • better for non-technical talks
    • Quarto Presentations (RevealJS) will replace Xaringan

      • These slides are Xaringan

      • Updated options will make better slides with more options

      • Xaringan and RevealJS are preferred for including code and output


Best way to learn Quarto

  • Examine Examples provided in R

  • Examine Examples in Quarto Gallery

    • click on code symbol </> to see the code used to create the documents or presentations

    • Examine and modify code for your document

    • Also use Google, website documentation, and stack overflow for questions


Resources - Where to go next

For all aspects of analytics and R and RStudio


Tutorials

  • As SU Students you also have free access to Linkedin Learning

    • Great tutorials in R, Python, SQL

    • Employers are likely to expect some familiarity with each.

    • R is most versatile and powerful

    • Employers may prefer Python, SQL, or another language/environment because that is what they know.

    • NOTE: Python, SQL, others can all be utilized through RStudio.

    • Different languages can be combined in one RMarkdown document in separate chunks.

  • DataCamp - Not Free, but Excellent.

    • Provides certificates of completion

    • Published this excellent document about data fluency

      • Download this document and save it for when you have to apply for jobs and answer questions about your skillset.
  • Other companies are quickly developing tutorial training too (some are good)


Sharing and Collaborating - GitHub vs. RPubs

  • Last week I introduced you to Rpubs which is ideal from sharing a dashboard.

  • Alternatively, you may have already come across GitHub in searching for files or a package.

    • Slides for this course are stored on GitHub

    • Required for files where data, code and text are maintained together as a project, referred to as a repository or repo.

    • Not required for finished dashboard.

  • GitHub is an online code sharing and code development platform.

  • Many R packages start as development code on GitHub and over time they are refined and published.


More about GitHub

  • Once you create free account, you can learn more about how it works in this tutorial.

  • Collaborative coding is common on GitHub but is a little more complex than working on a shared drive.

    • Developers of games, R packages, other software, etc., have huge code files and need to protect them.

    • There is a system in place (version control) where people can create a project with multiple code versions and edits. Over time a project develops more and more branches, like a tree, but the trunk.

    • Original code is preserved and changes can be incorporated as they are verified and approved.

Evaluations


Course Evaluation QR Code


Project Questions

  • The rest of class time can be used for group projects.

Key Points from Week 13

  • Project Info

    • Two Memos - Information, Templates, & Examples provided
  • Taking advantage of RStudio

    • R Markdown and Quarto
      • Data management and reporting are seamless.
      • Can combine R chunks with PYthon, SQL etc.
  • Github and Rpubs

    • For large projects, Github is essential
    • For BUA 455, Rpubs is ideal
  • Links for Learning More

  • Data Camp White Paper about Skillset

You may submit an ‘Engagement Question or Comment’ about Week 13 lectures until Thursday, 12/1, at midnight on Blackboard.