{"id":27646427,"url":"https://github.com/gabicavalcante/twitter-sentiment-analysis","last_synced_at":"2025-08-01T00:36:45.709Z","repository":{"id":74437402,"uuid":"297182606","full_name":"gabicavalcante/twitter-sentiment-analysis","owner":"gabicavalcante","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-18T20:36:38.000Z","size":11795,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-24T01:20:24.986Z","etag":null,"topics":["hacktoberfest","rq","sentiment","twitter-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabicavalcante.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-20T23:34:35.000Z","updated_at":"2020-10-18T20:36:41.000Z","dependencies_parsed_at":"2023-02-26T18:16:19.438Z","dependency_job_id":null,"html_url":"https://github.com/gabicavalcante/twitter-sentiment-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gabicavalcante/twitter-sentiment-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabicavalcante%2Ftwitter-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabicavalcante%2Ftwitter-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabicavalcante%2Ftwitter-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabicavalcante%2Ftwitter-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabicavalcante","download_url":"https://codeload.github.com/gabicavalcante/twitter-sentiment-analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabicavalcante%2Ftwitter-sentiment-analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268147436,"owners_count":24203280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","rq","sentiment","twitter-api"],"created_at":"2025-04-24T01:18:45.264Z","updated_at":"2025-08-01T00:36:45.701Z","avatar_url":"https://github.com/gabicavalcante.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twitter-sentiment-analysis\n\nUsing as reference the blog post [twitter sentiment python docker elasticsearch kibana](https://realpython.com/twitter-sentiment-python-docker-elasticsearch-kibana/).\n\n### run\n\n1. twitter api\n\nTo run the project you need to register an application at [twitter apps](http://apps.twitter.com/). Get the `consumer key` and `consumer secret` and create an `access token` under the *Keys and Access Tokens* tab. There is a file `config.template.py`, copy it and rename to `config.py`. Add your credentials in this file.\n\n```\nconsumer_key = \"add_your_consumer_key\"\nconsumer_secret = \"add_your_consumer_secret\"\naccess_token = \"add_your_access_token\"\naccess_token_secret = \"add_your_access_token_secret\"\n```\n\n2. streaming and processing tweets\n   \nWe are using the [Tweepy](https://www.tweepy.org) to grab the tweets. You can see the code in `sentimental.py` file, there we connect to twitter api and filter the data by the keywords `[covid, covid19, covid-19, pandemia]`. \n\nThe next step is calculate sentimental analysis using [Textblog](http://textblob.readthedocs.org/en/dev/), determine if the overall sentiment is positive, negative or neutral. At the end, the tweet data is added to the Elasticsearch DB and Mongo DB.\n\n3. store the data\n\nTo run mongo, kibana and the elasticsearch:\n\n```\n$ docker-compose up\n```\n\nTo run the python script:\n\n```\n$ pip install -r requirements.txt\n$ python sentimental.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabicavalcante%2Ftwitter-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabicavalcante%2Ftwitter-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabicavalcante%2Ftwitter-sentiment-analysis/lists"}