{"id":22180716,"url":"https://github.com/jftuga/nfl_sentiment_analysis","last_synced_at":"2025-03-24T19:15:37.712Z","repository":{"id":117699375,"uuid":"380584690","full_name":"jftuga/nfl_sentiment_analysis","owner":"jftuga","description":"Sentiment Analysis of r/nfl live-streamed comments","archived":false,"fork":false,"pushed_at":"2021-11-29T20:43:22.000Z","size":452,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T23:29:58.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jftuga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-06-26T19:48:18.000Z","updated_at":"2021-11-29T20:43:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e26a0a3-4bcf-4852-a217-5443a0c7732d","html_url":"https://github.com/jftuga/nfl_sentiment_analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fnfl_sentiment_analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fnfl_sentiment_analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fnfl_sentiment_analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jftuga%2Fnfl_sentiment_analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jftuga","download_url":"https://codeload.github.com/jftuga/nfl_sentiment_analysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245334899,"owners_count":20598386,"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","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":[],"created_at":"2024-12-02T09:19:26.268Z","updated_at":"2025-03-24T19:15:37.703Z","avatar_url":"https://github.com/jftuga.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NFL Sentiment Analysis\nSentiment Analysis of [r/nfl](https://www.reddit.com/r/nfl/) live-streamed comments\n\n## Intro\nThis program uses the Reddit API to receive r/nfl comments in real time.  It then performs sentiment analysis on each user comment.  Results are then emitted from the server back to the web browser via the socket.io JS / Python library. A [Reddit API account](https://www.reddit.com/dev/api/) is needed in order to fetch the user comments.\n\nThis is just an experiment to learn more about:\n\n* [socket.io](https://socket.io/) - for both JS and Python versions\n* The [Asynchronous Python Reddit API Wrapper](https://github.com/praw-dev/asyncpraw)\n* The [TextBlob: Simplified Text Processing](https://textblob.readthedocs.io/) library to perform [Sentiment Analysis](https://en.wikipedia.org/wiki/Sentiment_analysis)\n* The [Uvicorn](https://www.uvicorn.org/) ASGI server\n* The Python 3 [async / await](https://docs.python.org/3/library/asyncio-task.html) library\n\n## Output\n* ![Example Output from web browser](output.png)\n\n## Prerequisites\n* Install a recent version of Python 3.\n* Python 3.9.5 was used for development.\n* Install git, if not already installed.\n* A Reddit API account.\n* * Edit `creds.py` with this information.\n\n## Installation and Operation\n```\n# you may need to install the python3 developemnt libraries\n# On Fedora Linux, you would run:\nsudo dnf install python3-devel\n\n# clone this repository to your system\ngit clone https://github.com/jftuga/nfl_sentiment_analysis\n\n# create a Python virtual environment\npython -m venv nfl_sentiment_analysis\ncd nfl_sentiment_analysis\n\n# Active the virtual environment\n- windows:\n.\\Scripts\\Activate\n- linux or macOS:\nsource bin/activate\n\n# install the necessary Python dependencies inside the Python virtual environment\npip install -r requirements.txt\npython -m textblob.download_corpora\n\n# rename creds--TEMPLATE.py to creds.py and edit accordingly\n\n# start the app server\n- windows:\n.\\start_server.ps1\n- linux or macOS:\n./start_server.sh\n\n# open web browser to:\nhttp://127.0.0.1:8000/\n\n# you many need to wait a minute for comments to start appearing in the HTML table\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fnfl_sentiment_analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjftuga%2Fnfl_sentiment_analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjftuga%2Fnfl_sentiment_analysis/lists"}