Book Image

Big Data Visualization

Book Image

Big Data Visualization

Overview of this book

Gain valuable insight into big data analytics with this book. Covering the tools you need to analyse data, together with IBM certified expert James Miller?s insight, this book is the key to data visualization success. ? Learn the tools & techniques to process big data for efficient data visualization ? Packed with insightful real-world use cases ? Addresses the difficulties faced by professionals in the field of big data analytics
Table of Contents (15 chapters)
Big Data Visualization
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Digging in with R


Using the power of R programming, we can run various queries on the data; noting that the results of these queries may spawn additional questions and queries and eventually, yield data ready for visualizing.

Let's start with a few simple profile queries. I always start my data profiling by time boxing the data.

The following R scripts (although as mentioned earlier, there are many ways to accomplish the same objective) work well for this:

# --- read our file into a temporary R table 
tmpRTable4TimeBox<-read.table(file="C:/Big Data Visualization/Chapter 3/sampleHCSurvey02.txt", sep=",")  
 
# --- convert to an R data frame and filter it to just include # --- the 2nd column or field of data 
data.df <- data.frame(tmpRTable4TimeBox) 
data.df <- data.df[,2] 
 
# --- provides a sorted list of the years in the file 
YearsInData = substr(substr(data.df[],(regexpr('/',data.df[])+1),11),( regexpr('/',substr(data.df[],(regexpr('/',data...