Book Image

Introduction to R for Business Intelligence

By : Jay Gendron
Book Image

Introduction to R for Business Intelligence

By: Jay Gendron

Overview of this book

Explore the world of Business Intelligence through the eyes of an analyst working in a successful and growing company. Learn R through use cases supporting different functions within that company. This book provides data-driven and analytically focused approaches to help you answer questions in operations, marketing, and finance. In Part 1, you will learn about extracting data from different sources, cleaning that data, and exploring its structure. In Part 2, you will explore predictive models and cluster analysis for Business Intelligence and analyze financial times series. Finally, in Part 3, you will learn to communicate results with sharp visualizations and interactive, web-based dashboards. After completing the use cases, you will be able to work with business data in the R programming environment and realize how data science helps make informed decisions and develops business strategy. Along the way, you will find helpful tips about R and Business Intelligence.
Table of Contents (19 chapters)
Introduction to R for Business Intelligence
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
References
R Packages Used in the Book
R Code for Supporting Market Segment Business Case Calculations

Appendix C.  R Packages Used in the Book

The following table lists the packages used in the book by chapter:

Chapter

Package, in order of appearance

Chapter 1, Extract, Transform, and Load

RODBC, dplyr

Chapter 2, Data Cleaning

stringr, lubridate, and DataCombine

Chapter 3, Exploratory Data Analysis

psych, corrgram, and lubridate

Chapter 4, Linear Regression for Business

dplyr, MASS

Chapter 5, Data Mining with Cluster Analysis

dendextend, dplyr, and colorspace

Chapter 6, Time Series Analysis

TSA, forecast, dplyr, lubridate, and tbats

Chapter 7, Visualizing the Data's Story

ggplot2, scales, magrittr, leaflet, reshape2, and rCharts

Chapter 8, Web Dashboards with Shiny

devtools, shiny, shinysky, DT, dplyr, ggplot2, scales, dendextend, and RColorBrewer

In general, you will install R packages using the install.packages("{package name}") function from the console. For instance, to install the dplyr package, you will type the following in your R console:

install.packages("dplyr") 

Most R packages are available at https://cran.r-project.org/web/packages/ .

Two packages used in this book, rCharts and DT, are installed directly from GitHub. They are referenced in Chapter 7, Visualizing the Data's Story, and Chapter 8, Web Dashboards with Shiny, respectively. At the time of publication, the versions of these packages available on CRAN did not have the required functionality or could not be installed directly from CRAN in the typical way.

install.packages("devtools") 
library(devtools) 
install_github(repo = 'ramnathv/rCharts') 
install_github(repo = 'rstudio/DT') 

Note

GitHub is a free code-hosting platform for better version control and collaboration. Authors of R packages will host new code on GitHub to encourage transparency and collaboration. This code is often actively being updated and changed, so they contain features and perhaps bugs that do not exist in a formal package release on CRAN. These bleeding edge package versions can be installed directly from GitHub using the devtools R package.