ta.TwitterDB.loadDocFromFile

TwitterDB.loadDocFromFile(directory)[source]

This method will load tweet .json files into the DB (tweet collection) It goes through all .json files in the directory and load them one by one. It also saves the files already loaded into the ‘loadedFiles’ collection to make sure we don’t load the same file twice

Parameters

directory – the directory where the files are stored

Examples

Import data from json files into a mongoDB database:

>>> loadDocFromFile(json_file_path = 'C:\Data\My_JSON_Files_folder')