class: center, middle, inverse, title-slide # Prework - An Introduction R + the
tidyverse
## For Dr. Wasem’s Immigrant Incorporation Course
###
Matt Worthington
| Sr. Project Manager for Data Initiatives, UT Austin - LBJ ###
October 05, 2021
--- class: middle # Prework This is a resource to get compliment Dr. Wasem's Immigrant Incorporation guest lecture on accessing census data in R with tidycensus. This can be done after the workshop, but to ensure you can replicate all of the things we discussed in the course, you'll need to do a few things to get setup. If you have any questions during prework, please contact one of us at the following emails before class: * Matt Worthington: [matthew.worthington@austin.utexas.edu](matthew.worthington@austin.utexas.edu) #### Class Workshop Dates: * Immigrant Incorporation: Oct 5, 2021 --- class: middle .pull-left[ ## About The Workshop Whether you're conducting a comprehensive program evaluation, making some clean charts and maps, or working to build a sophisticated statistical model, the tools inside [RStudio](https://www.rstudio.com/products/rstudio/download/#download) and the [tidyverse](https://www.tidyverse.org) make policy work incredibly efficient *and* reproducible. While this workshop is designed to help you get started in R as a policy student, *getting good at R takes practice*. The good news, we're giving you a framework that will make your learning easier and more beneficial over time (both at LBJ and after graduation). ![](https://github.com/allisonhorst/stats-illustrations/raw/master/rstats-artwork/monster_support.jpg) ] .pull-right.b--gray.ba.bw2.ma2.pa4.shadow-1[ **In the session, we cover the following:** * Navigating Rstudio * Rstudio Interface * R Projects * R Markdown - Markdown Text - Code Chunks * Getting Data You Need * tidycensus - Accessing ACS Data - Accessing Decennial Data * Exporting Data ] .tr.burntorange[ **Next: Prework** `-->` ] --- class: middle ### Task 1: Setup RStudio The first step to get started is by setting up RStudio locally on your desktop. If you have any trouble getting setup, shoot me an email at [matthew.worthington@austin.utexas.edu](matthew.worthington@austin.utexas.edu) .pull-left.b--gray.ba.bw2.ma2.pa4.shadow-1[ **INSTRUCTIONS** **Step 1:** Go to [this link](https://rstudio.com/products/rstudio/download/#download). **Step 2:** Follow the two-step instructions on that page. **Step 3:** For visual assistance, use the video tutorial on the right. **Step 4:** Congrats, you're ready! ] .pull-right[ **Video Tutorial** <iframe width="550" height = "316" src="https://www.youtube-nocookie.com/embed/k7DuOUEO7SE" frameborder="0" style = "border: solid 0px #ffffff" color = "white" modestbranding = "1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen data-external="1"></iframe> ] --- class: middle .pull-left[ ### Task 2: Learning Markdown If you're not familiar with Markdown, that's okay. If you're like me, you grew up using things like Microsoft Office and Google Docs to write, so you're probably not familiar with markdown, but Markdown is a lot easier. So... what is it? Markdown is just an easy way to write formatted text. Like anything else, it takes practice, but is used widely in popular writing apps like [Bear](https://bear.app), [iA Writer](https://ia.net/writer), [Ulysses](https://ulysses.app). For the purposes of this workshop, we'll use it in an RStudio document tool called "[Rmarkdown](https://rmarkdown.rstudio.com)". Here's a quick way to get familiar with writing in Markdown: .bg--burntorange.b--text-color.ba.bw2.br3.shadow-5.ph4.mt5.f7[ *__Note__: If writing in Markdown still feels weird, don't worry. I'll also show you some tricks inside RStudio to make writing easier. Just make sure to do this tutorial.* ] ] .pull-right[ ![Doing the Markdown 10-min Tutorial](https://d33wubrfki0l68.cloudfront.net/59f29676ef5e4d74685e14f801bbc10c2dbd3cef/c0688/lesson-images/markdown-1-markup.png) * **First, visit this link:** Go to [https://commonmark.org/help/tutorial/](https://commonmark.org/help/tutorial/) * **Then, do the 10-minute tutorial:** It's a bit of time, but goes quick and will help you have a better grasp on writing in markdown by the time we start the workshop. * **Finally, bookmark this site**: [https://commonmark.org/help/](https://commonmark.org/help/) ] --- class: middle .pull-left[ ### Task 3: Install R Packages We'll need a few R packages, so try installing these. If you have trouble, shoot me an email at [matthew.worthington@austin.utexas.edu](matthew.worthington@austin.utexas.edu): * **Step one:** Open RStudio after you've installed it. * **Step two:** Paste the code below in your console (see screenshot) - If it asks you about Updating, just hit "No" before hitting enter. * **Step three:** Hit enter ```r install.packages(c("rmarkdown", "tidyverse", "tidycensus", "distill", "devtools")) install.packages(c("janitor", "readxl")) install.packages('tinytex') tinytex::install_tinytex() install.packages(c("sf")) ``` ] .pull-right[ </br></br> </br></br> ![Pasting Code in the Console](assets/images/install_packages.png) ]