class: center, middle, inverse, title-slide # R for Data Science - Introduction ### Stephen Balogun ### October 03, 2021 --- ## Outline - About me - What can R do for you? - Industries using R - Other benefits of R - What will you learn from this short course? - Requirements / Installations - Q&A (10 minutes) --- ## About me .right-column[ - A Public Health Physician - A quality improvement professional and patient safety expert - led me to data science - I am currently the Team Lead, Epidemiology and Surveillance Unit for the CARITAS Nigeria 4GATES program - Author, [{tidyndr}](https://CRAN.R-project.org/package=tidyndr) - Co-founder: [r4hds](https://r4hds.netlify.app/) - [My personal website](https://taiye.rbind.io) 😄 - <svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg>: follow @eppydoc 👍 - <svg viewBox="0 0 448 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"></path></svg>: [Stephen Balogun](https://www.linkedin.com/in/stbalogun/) ] .left-column[ <img src="./imgs/Stephen.png" width="731" /> ] --- ## What can R do for you? - You probably assume that R can be used for complex data analytics including visualization and modelling (I guess that's why you are here). - Yes,
can do all of those, a lot more!!! 💑 🤗 - Let's take a look at some of the things R can do for you 🛣 --- ## Beautiful Arts in R .pull-left[ <img src="./imgs/ij_01.png" width="80%" /> <footnote> <i>source:</i> Ijeamaka Anyene |@ijeamaka_a </footnote> ] .pull-right[ <img src="./imgs/ij_02.png" width="80%" /> ] --- ## Beautiful Arts in R - 02 .pull-left[ <img src="./imgs/ij_03.png" width="80%" /> <footnote> <i>source:</i> Ijeamaka Anyene |@ijeamaka_a </footnote> ] .pull-right[ <img src="./imgs/ij_04.png" width="80%" /> ] --- ## Games .pull-left[ <img src="./imgs/games_02.png" width="80%" /> <footnote> <i>source:</i> <a "https://rpodcast.shinyapps.io/hotshot_dashboard/?_ga=2.208167953.2086729808.1633251750-2118447652.1633251750"> Hotshots dashboard engine </a> </footnote> ] .pull-right[ <img src="./imgs/games_03.png" width="100%" /> ] --- ## Text mining - 01 <img src="./imgs/wc_01.png" width="80%" /> <footnote> <i>source:</i> <a "https://www.r-graph-gallery.com/wordcloud.html"> R graph gallery </a> </footnote> --- ## Dashboards .pull-left[ <img src="./imgs/dashboards_01.png" width="100%" /> <footnote> <i>source:</i> <a ""> Shiny demo </a> </footnote> ] .pull-right[ <img src="./imgs/dashboards_02.png" width="100%" /> <footnote> <i>source:</i> <a "https://skylab.cdph.ca.gov/ODdash/"> California Overdose Surveillance </a> </footnote> ] --- ## Websites .pull-left[ <img src="./imgs/website_01.png" width="100%" /> <footnote> <a "https://taiye.netlify.app"> <i>Personal website</i> </a> </footnote> ] .pull-right[ <img src="./imgs/website_02.png" width="100%" /> <footnote> <a "https://r4hds.app"> <i>Corporate website</i> </a> </footnote> ] --- ## Others .pull-left[ - GIS Maps <img src="./imgs/gis.png" width="100%" /> <footnote> <i>Source</i> Balogun Stephen | @eppdoc </footnote> ] .pull-right[ - Music analysis ([rmusic]("https://towardsdatascience.com/compose-and-play-music-in-r-with-the-rmusic-package-b2afa90761ea") and [chorrrds]("https://www.analyticsvidhya.com/blog/2018/08/chorrrds-r-package-analyzing-working-music-data/")) <img src="./imgs/music.png" width="85%" /> ] --- ## R in Industries .right-column[ <img src="./imgs/industries_02.png" width="80%" /> <img src="./imgs/industries_01.png" width="80%" /> ] .left-column[ - Google - Facebook - Microsoft - Twitter - Norvatis - WHO - Bioconductor (genomics data analysis) - Janssen <footnote> <sup>1</sup><a "http://makemeanalyst.com/companies-using-r/"> Companies using R </a> <br/> <sup>2</sup><a "https://r4hds.netlify.app/why_r"> Why you should use R </a> </footnote> ] --- ## Other benefits of R - [Open source 📬](https://en.wikipedia.org/wiki/Open_source) - [Free 🆓](https://www.gnu.org/philosophy/free-sw.html) - [Strong R community/support 👪](https://community.rstudio.com/) - [Reproducible 👨🔬](https://www.annualreviews.org/doi/10.1146/annurev-publhealth-012420-105110?url_ver=Z39.88-2003&rfr_id=ori%3Arid%3Acrossref.org&rfr_dat=cr_pub++0pubmed) - Broad 📚 --- ## What you will learn This short course will get you started. - Basic Introduction to R - Importing your data into R - Transforming your data into "easy-to-use" format - Data visualization - making simple charts - Communicating your findings All these using practical examples!!! 🆒 right? 😉 --- ## Requirements - [
software](https://cran.r-project.org) - [RStudio](https://www.rstudio.com/products/rstudio/download/) - [some R packages](#installation-required-r-packages) - A compiler (optional): - [Rtools on Windows](https://cran.r-project.org/bin/windows/Rtools/) - [Xcode command line tools on macOS](https://developer.apple.com/programs/register/) - Good internet connection --- ## Installation - R .left-column[ - Visit the [`CRAN` website](https://cran.r-project.org) - Follow the instructions provided. - I encourage you accept default settings. ] .right-column[ <img src="./imgs/cran.png" width="100%" /> ] --- ## Installation - RStudio .left-column[ - Visit the [RStudio website](https://www.rstudio.com/products/rstudio/download/) - Scroll down a bit and download the free version. - Follow the installation prompt. ] .right-column[ <img src="./imgs/rstudio.png" width="100%" /> ] --- ## Installation - Required R packages .pull-left[ - Download the [package demo folder](https://github.com/stephenbalogun/intro_to_R_demo/archive/refs/heads/master.zip) - Unzip and place in a folder of your choice - In the unzipped folder, click on `*.Rproj` file to open your project in `RStudio` ] .pull-right[ <img src="./imgs/installation.png" width="100%" /> ] --- ## Installation - Required R packages 2 .left-column[ - Follow the three steps as indicated - You will need internet connection - Previously installed packages will *not* be re-installed - You are now ready for the sessions!!! ] .right-column[ <img src="./imgs/installation_final.png" width="100%" /> ] --- class: inverse, middle, center background-image: url(https://upload.wikimedia.org/wikipedia/commons/3/39/Naruto_Shiki_Fujin.svg) background-size: contain # Questions