patrickbeekman / SeniorCapstone

Exploratory analysis and visualization on how to maximize the potential of your tweets.
GNU General Public License v3.0
0 stars 1 forks source link

TweetMaximizer

Build Status

An application to analyze the trends of your followers so you can maximize the potential of your tweets. My analysis looks at when and what you should tweet about so you can gain the largest amount of favorites and retweets. This can be useful for businesses and advertisers who want to ensure each of their tweets makes the largest impact on their followers to help grow the businesses image on twitter. While useful for businesses it is also a great tool for twitter users who have something important to say and want to make sure the news gets spread! For example you may have something important to add to the #metoo campaign so you can use this application to find the best times to tweet and some keywords/emotional tones you may want to think about while drafting your tweet. Shown below are some examples of visualizations on the website that users can analyze to help determine an ideal time to tweet.

Normalized graph of Favorites and Retweets by hour Amount of tweets by hour
Normalized Sunday Monday Frequency of Tweets

Installation and Dependencies

This project use a python Flask app to display my findings. To get started you will first need to clone this repo to your workspace.

About and Usage

This application can be used at a very high level by:

  1. Clone/Download the repository
  2. Navigate to wherever you cloned/downloaded the repository
    • Inside the data folder should be a file called secrets.json which is where you can store your api keys
    • Store your twitter username and password inside the repsective field replacing your key with the text key goes in here
  3. Navigate back out of the data folder to the home directory and then into the src folder where flask_app.py is located.
  4. Open up a terminal at the location navigated to in step 2 and execute python flask_app.py SCREEN_NAME replacing the screen name with the twitter user you would like to analyze. (the screen name is the @name not the other one)
  5. Now wait for the script to execute, Depending on the amount of followers the user has this can take a while. For about 200 followers it can take about 15-30 minutes initially**.
  6. Once the script has finished executing the website should now be viewable at localhost:5000/ in your favorite web browser.

Developer Instructions

Setting up developer environment

Setup developer environment? Huh?

Testing

All tests were written using pytest.

Contribution

This project is open source under the GNU General Public Licencse.

Resources

Notes

** Note that it will only take this long the first time you run this script on a user. The reason this process takes so long requires some understanding as to what the scripts are doing. Below describes the process: