# get collection weekly_demand weekly_demand_collection = database.get_collection("weekly_demand") # open the weekly_demand json file with open("weekly_demand.json") as f: file_data = json.load(f) # insert the data into the collection weekly_demand_collection.insert_many(file_data) # get the count of total data points weekly_demand_collection.find().count() # >> 456548