Skip to content

Instantly share code, notes, and snippets.

@shannonbradshaw
Created June 28, 2017 16:06
Show Gist options
  • Save shannonbradshaw/afd8de4c4d4fc76da702a370c1825b08 to your computer and use it in GitHub Desktop.
Save shannonbradshaw/afd8de4c4d4fc76da702a370c1825b08 to your computer and use it in GitHub Desktop.

Overview

Here you will find instructions for importing the datasets for M001: MongoDB Basics into a locally running MongoDB deployment.

Datasets

All datasets are provided in Amazon S3 in a single zip file (243 MB zipped; 1.5 GB unzipped). The files were created with the mongodump command. They may be imported into your MongoDB deployment using mongorestore. Note that these datasets include the indexes necessary to support example queries and labs used in M001. The datasets included are as follows.

  • 100YWeatherSmall (403 MB) - readings from weather stations throughout the world.
  • city (3.2 MB) - geospatial representations of neighborhoods in New York City.
  • citibike (835 MB) - details for trips taken using Citibikes.
  • ships (3.6 MB) - data on shipwrecks around the world, including geospatial coordinates.
  • video (303 MB) - summary data on movies.

Importing Data Locally

These instructions will help you load the M001 datasets into a local MongoDB instance (e.g., MongoDB running on your laptop). Note: this will require approximately 2.5 GB of RAM.

  1. Download the m001-datasets.zip file (243 MB) from S3.
  2. Unzip m001-datasets.zip. This will create a directory/folder called dump.
  3. Ensure you have a running MongoDB instance. For instructions on installation and setup, see the MongoDB installation documentation. Installation tutorials for all platforms include instructions for running MongoDB (the mongod daemon).
  4. Once you have a mongod instance running, you may import the datasets using mongorestore.
    1. Open a command shell (e.g., bash, powershell, or cmd).
    2. Change directory (e.g., cd) to where you unzipped m001-datasets.zip.
    3. Assuming you are running mongod on the default port, you may import the datasets from the dump directory by simply running, mongorestore. mongorestore looks for a directory called dump to import.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment