GithubHelp home page GithubHelp logo

xdevplatform / weekly-tweet-sentiment Goto Github PK

View Code? Open in Web Editor NEW
22.0 18.0 15.0 74 KB

A tutorial which walks you through how you can create code that pulls your Tweets from the past 7 days and gives you a score to let you know exactly how your week has been.

Home Page: https://blog.twitter.com/developer/en_us/topics/tips/2020/how-to-analyze-the-sentiment-of-your-own-tweets.html

License: Apache License 2.0

Jupyter Notebook 58.94% Python 41.06%
twitter-sentiment-analysis twitter-api python azure twitter

weekly-tweet-sentiment's Introduction

How to analyze the sentiment of your own Tweets

Tweets combined with a sentiment score can give you a gauge of your Tweets in a quantitative way. To put some data behind the question of how you are feeling, you can use Python. This code sample uses the Recent Search endpoint of Twitter Developer Labs and Microsoft Azure's Text Analytics Cognitive Service to detect languages and determine sentiment scores.

For this code to run you will need to set up a configuration file with your secrets, a sample of this can be found under config.yaml. Be sure to add your config.yaml to your .gitignore and check out our guide on securing keys and tokens.

For a step by step guide be sure to take a look at the blog post on the subject.

Support

Create a new issue on GitHub.

Contributing

We feel that a welcoming community is important and we ask that you follow Twitter's Open Source Code of Conduct in all interactions with the community.

License

Copyright 2020 Twitter, Inc.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0

weekly-tweet-sentiment's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weekly-tweet-sentiment's Issues

KeyError: 'data'

Hello when running this code I have created the yaml and azure endpoints but this error pops up in this line
data_only = res_json["data"]

KeyError: 'documents'

Everything is working fine, but on this line, I am getting an error.
langs = pd.DataFrame(with_languages["documents"])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.