Chapter 12. Data Processing and Aggregation with MongoDB
Aggregation queries are a very common way to get summarized data by counting or adding features to our dataset. MongoDB provides us with different ways to get the aggregated data quickly and easily. In this chapter, we will explore the basic features of MongoDB as well as two ways to get summarized data using the group
function and the aggregation framework.
In this chapter we will cover:
Getting started with MongoDB:
Database
Collections
Documents
Mongo shell
Insert/Update/Delete operations
Queries
Data Processing:
Data transformation with OpenRefine
Inserting documents with PyMongo
Group
The aggregation framework:
Pipeline
Expressions
In Chapter 2, Working with Data, we introduced the NoSQL (Not Only SQL) databases and their types (document-based, graph-based, and key-value stores). The NoSQL databases provide key advantages to the user such as scalability, high availability, and processing speed. Due to the distributed nature of the NoSQL technology...