July 2017
Beginner to intermediate
312 pages
7h 27m
English
The process of data extraction might take from a few minutes to an hour depending on multiple factors (Internet connection speed, database location, Graph API response time, and so on). Once all the data is ready in our database we can start the data science workflow by creating data structures that are convenient and efficient for the analysis.
In the first step, we will collect all the data stored in collections: collection_posts and collection_comments and put them into two lists: posts_data and comments_data:
posts_data = [] comments_data = []
We iterate through the MongoDB cursor and get all fields that are needed for the analysis. In the case of posts, these are: message, created_time, number of likes, number of ...
Read now
Unlock full access