Setting up MongoDB for storing Twitter data
The default response format for the REST API is JSON, and thus, it is easiest to store this data as JSON in order to avoid extra data wrangling. While there are a number of different databases and data stores that can handle JSON data, we want to choose one that is relatively easy to set up, handles JSON data natively, is free to use, and is relatively popular. Thus, we will go with MongoDB.
Getting ready
For this recipe, you will need to download MongoDB on your local machine, so make sure that you have a broadband connection to the internet.
How to do it...
The following steps will walk you through setting up MongoDB and using it through the command shell:
- The first step for this stage is to install MongoDB. The easiest way to do this is to download the latest binary distribution (currently, 3.4) from the http://www.mongodb.org/downloads . 64-bit binary distributions that is available for Windows, Linux, macOS X, and Solaris.
- Once downloaded, follow...