17.4 Case Study: A MongoDB JSON Document Database
MongoDB is a document database capable of storing and retrieving JSON documents. Twitter’s APIs return tweets to you as JSON objects, which you can write directly into a MongoDB database. In this section, you’ll:
use Tweepy to stream tweets about the 100 U.S. senators and store them into a MongoDB database,
use pandas to summarize the top 10 senators by tweet activity and
display an interactive Folium map of the United States with one popup marker per state that shows the state name and both senators’ names, their political parties and tweet counts.
You’ll use a free cloud-based MongoDB Atlas cluster, which requires no installation and currently allows you to store up to 512MB of data. To store ...
Get Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.