Skip to content

Take snapshots of the Twitter trending topics for a specific location (based on Twitter woeid) and provides statistics.

Notifications You must be signed in to change notification settings

ShaiShulman/TrendTrackr-app

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

TrendTrackr App

Take snapshots of the Twitter trending topics for a specific location (based on Twitter woeid) and provides statistics.

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgements

About The Project

Product Name Screen Shot

Take snapshots of the trending topics for a specific location, save them on a MongoDB collection and provide history and statistics. Trending topics are collected from the specified Twitter woeid (location id, translated from string place name) and saved togetehr with sample tweeps for each topic. The module also provides, command-line form, the history of the collected topics and statistics for each topics (first and last appearances, total volume, ranks, total number days in trending topics)

The main entry point file is trends_app.py

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Install all prerequisites from the included requirements.txt.

  • pip install -r /path/to/requirements.txt

Installation

  1. Clone the repo

    git clone https://github.com/github_shaishulman/TrendTrackr-app.git
  2. Install prerequisites

    pip install -r /path/to/requirements.txt
  3. Apply for a standard product Twitter API key

    https://developer.twitter.com/en/docs/twitter-api/getting-started/getting-access-to-the-twitter-api
  4. Open a free MongoDB user account and get connection string

    https://www.mongodb.com/cloud/atlas/register
  5. Store both Twitter API keys and MongoDB connection string in a file named keys.json (see the included keys_BLANK.json for example)

Usage

  • Save all current trending topics in New York City

    python trends_app.py --save "New York City"
  • Display history of all trending collected since 1 Sep 2021

    python trends_app.py --date "1/09/2021"
  • Display statistics (first and last appearances, total volume, total number of days) for all topics collected

    python trends_app.py -sta
  • Display dates of being a trending topic for the specific topic "afganistan"

    python trends_app.py --name afganistan

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Shai Shulman - @shaishulman - shai.shulman@gmail.com

Project Link: https://github.com/github_shaishulman/TrendTrackr-app

About

Take snapshots of the Twitter trending topics for a specific location (based on Twitter woeid) and provides statistics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages