Reference¶
TwitterAnalysis¶
Main class - It inherits TwitterGraphs, TwitterDB, and TwitterTopics classes.
|
Configure the current object settings to drive the automation of the analysis files |
|
Aux function to concatenate edges to help filter in mongoDB |
|
This method is in charge of extracting, cleaning, and loading the data into all the collections in MongoDB. |
|
Method to compress and plot graph based on the graph reduction settings that can be updated using the setConfigs method. |
This method will export edges from mongoDB data that can be used to create graphs. |
|
|
Given a graph G, it exports nodes with they degree, edges with their weight, and word clouds representing the nodes scaled by their degree |
|
Creates topic model files. |
|
Creates hashtag frequency files. |
|
Creates words frequency files. |
|
Creates timeseries frequency files. |
|
Plot graph analysis files for a given graph G. |
|
Automated way to generate all analysis files. |
|
Method to query data in mongoDB for timeseries analysis given certain filters. |
Method to print a summary of the initial exploratory data analysis for any dataset. |
|
|
Calculates clustering metrics for top degree nodes |
|
Calculates clustering metrics for top degree nodes |
|
|
|
|
|
TwitterDB¶
TwitterDB class
|
Twitter documents have an extensive number of fields. |
|
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. |
|
Send requests to the 7-Day search API and save data into MongoDB |
|
Send requests to the Premium search API and save data into MongoDB |
|
The method will create two files, one python script containing the code necessary to make the requests, and a .bat file that can be used to schedule the call of the python script. |
|
Method to load focused data into mongoDB based on the configurations set on setFocusedDataConfigs. |
|
Method to load user data into mongoDB. |
|
Method to load hashthas in a separate collection in mongoDB. |
|
Method to load tweet connection in a separate collection in mongoDB. |
Method to load hashtag connection in a separate collection in mongoDB. |
|
|
Method to load the tweet words in a separate collection in mongoDB. |
|
Method to load addtional aggregated collection to MongoDB It creates the tweetWords collection. |
|
Method to update MongoDb collection with a flag identifieng is a user is a bot or not. |
|
Method used to clean the tweet message. |
|
Method to export the data from MongoDb into text files based on certain filters. |
|
Method to query the data from MongoDb. |
TwitterGraphs¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TwitterTopics¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|