class: center, middle, inverse, title-slide # Putting it together-2 ### Stephen Balogun ### October 13, 2021 --- <style> #code { color: red; font-weight: 600; line-height: 2em; font-size: 30px; } #code1 { color: #17a2b8; font-weight: 600; line-height: 2em; font-size: 30px; } </style> ## Recap of previous days .left-column[ - R vectors - Functions and packages - Using R projects - Importing files - Cleaning files ] .right-column[ <img src="./imgs/recap.jpg" width="704" /> ] --- ## Today's outline 1. Plotting charts with {ggplot2} 2. Saving outputs 3. Communicating your results 4. Recap of the 3 days 5. Learning more --- ## Plotting charts with {ggplot2} .pull-left[ - Several packages available for plotting - Charts can be static, embeded with htmlwidgets or interactive - The type of chart that you plot will depend on the type of data that you have ] --- ## The grammar of graphics .left-column[] .right-column[ <img src="./imgs/grammar.png" width="1566" /> ] --- ## Grammar layers <img src="./imgs/grammar2.png" width="2342" /> --- ## Layer options <img src="./imgs/grammar3.png" width="1770" /> --- ## {ggplot2} format #### I recommend any of the following formats .pull-left[ <p id="code"> <i>data %>% <br/> ggplot(mapping = aes(x, y, etc)) + <br/> geom_type() + <br/> theme_specify()</i> </p> <bold>or</bold> ] .pull-right[ <p id="code1"> <i>ggplot( <br/> data, <br/> mapping = aes(x, y, etc) <br/> ) + <br/> geom_type() + <br/> theme_specify() </i> </p> ] --- ## Saving outputs - Use the `export()` from the {rio} package - for csv - for Excel - many other file types --- ## Communicating your results - HTML - Word - PowerPoint - PDF - Articles - Abstracts --- ## Recap ### Kindly drop in the chart box one thing that you have learnt --- ## Where to go from here .pull-left[ - R packages > the {swirl} package > > the {learnr} package use `pacman::p_install("swirl", "learnr")` - Community groups https://community.rstudio.com/ - Learning platforms (Coursera, edX, Udemy, YouTube, etc) ] .pull-right[ - I am open for: - collaboration - trainings - jobs - currently putting together a teaching platform - I am available via: - Twitter: **@eppydoc** - LinkedIn: **https://www.linkedin.com/in/stbalogun/** - Email: **stbalo2002@gmail.com** ] --- class: inverse, middle, center background-image: url(https://upload.wikimedia.org/wikipedia/commons/3/39/Naruto_Shiki_Fujin.svg) background-size: contain # Questions