Today we are going to complete the MongoDB module by performing mathematical aggregation and storing data into MongoDB. This is also a good prelude to your Project 2.

Warm-Up

Let’s open up the file(s) in the 01-Evr_WarmUp folder to get started.

To import the artifacts.json from your directory into a Mongo database, type:

mongoimport --type json -d met -c artifacts --drop --jsonArray artifacts.json

Aggregate by Country

Let’s open up the file(s) in the 02-Ins_Aggregation folder to get started.

Students Do: Aggregate by Classification

Aggregation Pipelines in PyMongo

Let’s open up the file(s) in the 04-Ins_AggregationPipeline folder to get started.

Students Do: Build an Aggregation Pipeline

Project 2 Groupings

We are going to break into groups for project 2. That’s because the following mini projects is a preparation for your eventual Extract-Transform-Load (ETL) project.

Extract-Transform-Load (ETL)

Your project 2 is fundamentally an ETL job, and it is a staple for all data-related work:

  1. Analyze the data and its schema.
  2. Model your database.
  3. Extract them into your Python scripts.
  4. Transform them into proper data types within the tables with your scripts.
  5. Load them into the tables.

You will be learning them in your next lesson.

Groups Do: MongoDB Mini-Project Part 1: Import Data from an API

Let’s open up the file(s) in the 06-Grp_MiniProject_Part1 folder to get started.

Groups Do: MongoDB Mini-Project Part 2: Aggregating the Data

Let’s open up the file(s) in the 07-Grp_MiniProject_Part2 folder to get started.

Groups Do: MongoDB Mini-Project Part 3: Plotting the Data

Let’s open up the file(s) in the 08-Grp_MiniProject_Part3 folder to get started.