Book Image

Practical Data Analysis - Second Edition

By : Hector Cuesta, Dr. Sampath Kumar
Book Image

Practical Data Analysis - Second Edition

By: Hector Cuesta, Dr. Sampath Kumar

Overview of this book

Beyond buzzwords like Big Data or Data Science, there are a great opportunities to innovate in many businesses using data analysis to get data-driven products. Data analysis involves asking many questions about data in order to discover insights and generate value for a product or a service. This book explains the basic data algorithms without the theoretical jargon, and you’ll get hands-on turning data into insights using machine learning techniques. We will perform data-driven innovation processing for several types of data such as text, Images, social network graphs, documents, and time series, showing you how to implement large data processing with MongoDB and Apache Spark.
Table of Contents (21 chapters)
Practical Data Analysis - Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

Group


Aggregation function is a type of function used in data processing by grouping values into categories in order to find a significant meaning. The common aggregate functions include Count, Average, Maximum, Minimum, and Sum. However, we may perform more complicated statistical functions, such as Mode or Standard Deviation. Typically, the grouping is performed with the SQL Group by statement, as is shown in the following code; additionally, we may use aggregation functions, such as COUNT, MAX, MIN, and SUM in order to retrieve summarized information:

SELECT sentiment, COUNT(*)
FROM Tweets
GROUP BY sentiment

In MongoDB, we can use the Group function, which is similar to the SQL Group By statement. However, the Group function doesn't work in shared systems, and the result size is limited to 10,000 documents (20,000 in version 2.2 or higher). Due to this, the Group function is not very often used. Nevertheless, it is an easy way to find aggregate information when we have only one MongoDB...