Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Introduction to R for Business Intelligence
Introduction to R for Business Intelligence

Introduction to R for Business Intelligence: Profit optimization using data mining, data analysis, and Business Intelligence

Arrow left icon
Profile Icon Gendron
Arrow right icon
€20.99 €23.99
eBook Aug 2016 228 pages 1st Edition
eBook
€20.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Gendron
Arrow right icon
€20.99 €23.99
eBook Aug 2016 228 pages 1st Edition
eBook
€20.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
€20.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Introduction to R for Business Intelligence

Chapter 2. Data Cleaning

Clean data is an essential element of good data analysis. Poor data quality is a primary reason for problems in business intelligence analysis. Data cleaning is the process of transforming raw data into usable data. Cleaning data, checking quality, and standardizing data types accounts for the majority of an analytic project schedule.

Anthony Goldbloom, the CEO of Kaggle, said: Eighty percent of data science is cleaning data and the other twenty percent is complaining about cleaning data (personal communication, February 14, 2016).

This chapter covers four key topics using some of the newer packages available within the R environment:

  • Summarizing your data for inspection
  • Finding and fixing flawed data
  • Converting inputs to data types suitable for analysis
  • Adapting string variables to a standard

Business analysts spend a lot of time cleaning data before moving to the analysis phase. Data cleaning does not have to be a dreaded task. This chapter provides business...

Summarizing your data for inspection

We live in an information age. Large and accessible datasets are being widely used in business intelligence and decision making. When you begin the data cleaning process, you will need a way of summarizing your data. You will need to understand its content and structure at the beginning of the process. Large datasets require ways of summarizing the data for inspection. Fortunately, the R language provides them for you! You will learn data cleaning through a use case called the Bike Sharing Analysis Project.

Note

Use case: Bike Sharing Analysis Project

Imagine you are a business analyst on the Bike Sharing Analysis Project. New data has just arrived for analysis. Unlike the dataset you saw in Chapter 1, Extract, Transform, and Load, which was pre-processed for a Kaggle competition, this data you received has arrived in raw form. The book's website at http://jgendron.github.io/com.packtpub.intro.r.bi/ contains the Ch2_raw_bikeshare_data.csv data...

Finding and fixing flawed data

The summarize step revealed some possible flaws in the data. Mind you, the bike sharing data is in good shape compared to many datasets that you will encounter as a business analyst. Your next step in the SFCA approach is to fix any flaws that could impact your analysis. First, you have to find the flaws before you can fix them.

Finding flaws in datasets

There is no single best way to find flaws in data. This activity requires art mixed with some computational methods. The approach presented in this section shares some methods, but they only represent a few of the many possible ways of finding flawed data.

Tip

R tip: Keep an open mind and strive to become a lifelong learner of business analytics. The methods change and adapt continually. The best business analysts have a skillset that goes beyond great coding. Throughout this book, the authors will share their favorite picks from videos, blogs, and books relevant to the chapters.

One tip for business analysts...

Converting inputs to data types suitable for analysis

Another aspect of data cleaning is investigating the input data and shaping it to conform to your analysis design needs. The third step of the SFCA approach is convert. Specifically, converting the data from one data type to another.

Converting between data types

The R environment stores data in one of the several data types. You will experience five different data types in the Bike Sharing Analysis Project:

Data type

Explanation

Example

Numeric

A number having a decimal value

9.84

Integer

A number without decimals

3

Character

A string variable

"www.google.com"

Factor

A categorical variable that has a character and integer representation

"ad campaign", "blog": 1,2

Date

A date or time in various formats

2016-02-16 18:56:57 EST

Each data type has different properties consistent with definitions used in disciplines such as computer science, mathematics, and statistics. Some R...

Adapting string variables to a standard

You are almost done with the basics of data cleaning. At this point in the process, you have summarized, fixed, and converted your input data. This means that it is time for you to accomplish the fourth SFCA step, adapting your data to a standard.

The term standard has many possible meanings. It may be that an R package will set a standard for you. In other cases, you may wish to establish one. For instance, notice in the previous data view that the sources variable is a character data type. You will see that it contains the advertising source where the customer learned about bike sharing. Leaving this as a character data type seems reasonable, but R cannot group character items to summarize them in analysis.

Your implied standard is that sources should be a categorical variable. What might happen if you use the as.factor(bike$sources) function? This will convert the data, but before you do that, you should consider a couple of questions:

  • How many unique...

Summary

Congratulations! You have learned a lot of topics in this chapter. Data cleaning is a very important part of business intelligence analysis. In this chapter, you learned that cleaning data is a four-step process that can be remembered by SFCA (summarize-fix-convert-adapt).

Summarizing the data gives you a big-picture overview and provides a perspective on the data. This shapes your data cleaning strategies. Fixing flawed data can be tedious, but there are common practices to use. Converting data is important to get it in the right data type to support your analysis. Dates and times can be difficult, but tools help with this. Adapting your data to a standard is the key to setting a foundation for a successful data analysis. Standards may be given or you may design one.

Continuing to learn is also important as the packages and methods change frequently. Lastly, the topic of data cleaning is full of interesting ideas that you may find helpful. A recommended resource is An Introduction...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Use this easy-to-follow guide to leverage the power of R analytics and make your business data more insightful.
  • This highly practical guide teaches you how to develop dashboards that help you make informed decisions using R.
  • Learn the A to Z of working with data for Business Intelligence with the help of this comprehensive guide.

Description

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.

Who is this book for?

This book is for data analysts, business analysts, data science professionals or anyone who wants to learn analytic approaches to business problems. Basic familiarity with R is expected.

What you will learn

  • Extract, clean, and transform data
  • Validate the quality of the data and variables in datasets
  • Learn exploratory data analysis
  • Build regression models
  • Implement popular data-mining algorithms
  • Visualize results using popular graphs
  • Publish the results as a dashboard through Interactive Web Application frameworks

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 26, 2016
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781785286513
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 26, 2016
Length: 228 pages
Edition : 1st
Language : English
ISBN-13 : 9781785286513
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 112.97
Big Data Analytics with R
€45.99
Introduction to R for Business Intelligence
€29.99
Learning R Programming
€36.99
Total 112.97 Stars icon

Table of Contents

12 Chapters
1. Extract, Transform, and Load Chevron down icon Chevron up icon
2. Data Cleaning Chevron down icon Chevron up icon
3. Exploratory Data Analysis Chevron down icon Chevron up icon
4. Linear Regression for Business Chevron down icon Chevron up icon
5. Data Mining with Cluster Analysis Chevron down icon Chevron up icon
6. Time Series Analysis Chevron down icon Chevron up icon
7. Visualizing the Datas Story Chevron down icon Chevron up icon
8. Web Dashboards with Shiny Chevron down icon Chevron up icon
A. References Chevron down icon Chevron up icon
B. Other Helpful R Functions Chevron down icon Chevron up icon
C. R Packages Used in the Book Chevron down icon Chevron up icon
D. R Code for Supporting Market Segment Business Case Calculations Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.