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
About the Author
About the Reviewers
R Packages Used in the Book
R Code for Supporting Market Segment Business Case Calculations

Analyzing a single data variable

If your dataset has a single variable, you have univariate data. When examining univariate data, you may describe the data distribution in terms of its value and spread. A good place to begin the exploration of univariate data is with the str() function that you learned in Chapter 2, Data Cleaning. Load the marketing dataset into R and run the str() function:

marketing <- read.csv("./data/Ch3_marketing.csv", stringsAsFactors = TRUE) 

We will get the following output:

'data.frame':  172 obs. of  7 variables:
 $ google_adwords : num  65.7 39.1 174.8 34.4 78.2 ...
 $ facebook       : num  47.9 55.2 52 62 40.9 ...
 $ twitter        : num  52.5 77.4 68 86.9 30.4 ...
$ marketing_total: num  166 172 295 183 150 ...
 $ revenues       : num  39.3 38.9 49.5 40.6 40.2 ...
$ employees      : int  5 7 11 7 9 3 10 6 6 4 ...
$ pop_density    : Factor w/ 3 levels "High","Low","Medium": 1 3 ...

You will see that it contains 172 observations of...