{"id":15165894,"url":"https://github.com/evan-l-munson/saotd","last_synced_at":"2026-03-04T03:02:28.336Z","repository":{"id":47286503,"uuid":"117839390","full_name":"evan-l-munson/saotd","owner":"evan-l-munson","description":"Sentiment Analysis of Twitter Data (saotd)","archived":false,"fork":false,"pushed_at":"2024-08-10T22:07:06.000Z","size":99999,"stargazers_count":12,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-22T07:37:03.749Z","etag":null,"topics":["bing-lexicon","latent-dirichlet-allocation","n-grams","plot","r","sentiment-analysis","tidy-data","topicanalysis","tweets","twitter-data"],"latest_commit_sha":null,"homepage":"","language":"R","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/evan-l-munson.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","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":"2018-01-17T13:23:26.000Z","updated_at":"2024-08-10T22:07:10.000Z","dependencies_parsed_at":"2022-08-21T06:50:42.666Z","dependency_job_id":"a43c6299-4c80-4870-90fa-ca6ad6034cdf","html_url":"https://github.com/evan-l-munson/saotd","commit_stats":{"total_commits":456,"total_committers":5,"mean_commits":91.2,"dds":"0.019736842105263164","last_synced_commit":"c83000e95cd6baba8a44555f13637eaaf231e14e"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/evan-l-munson/saotd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evan-l-munson%2Fsaotd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evan-l-munson%2Fsaotd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evan-l-munson%2Fsaotd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evan-l-munson%2Fsaotd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evan-l-munson","download_url":"https://codeload.github.com/evan-l-munson/saotd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evan-l-munson%2Fsaotd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30070479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T01:03:42.280Z","status":"online","status_checked_at":"2026-03-04T02:00:07.464Z","response_time":59,"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":["bing-lexicon","latent-dirichlet-allocation","n-grams","plot","r","sentiment-analysis","tidy-data","topicanalysis","tweets","twitter-data"],"created_at":"2024-09-27T04:05:52.191Z","updated_at":"2026-03-04T03:02:28.320Z","avatar_url":"https://github.com/evan-l-munson.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Sentiment Analysis of Twitter Data \u003cimg src=\"man/figures/hex_saotd.png\" align=\"right\" width=\"150\" height=\"150\" /\u003e\n\n[![CRAN\\_Status\\_Badge](http://www.r-pkg.org/badges/version/saotd?style=flat-square)](https://cran.r-project.org/package=saotd)\n[![R-CMD-check](https://github.com/evan-l-munson/saotd/workflows/R-CMD-check/badge.svg?style=flat-square)](https://github.com/evan-l-munson/saotd/actions?workflow=R-CMD-check)\n[![codecov](https://codecov.io/gh/evan-l-munson/saotd/branch/master/graph/badge.svg?token=dosG0Ck4Tm)](https://app.codecov.io/gh/evan-l-munson/saotd)\n[![Downloads](http://cranlogs.r-pkg.org/badges/saotd)](https://CRAN.R-project.org/package=saotd)\n[![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/saotd?color=orange)](https://CRAN.R-project.org/package=saotd)\n![GitHub last commit](https://img.shields.io/github/last-commit/evan-l-munson/saotd?style=plastic)\n[![status](http://joss.theoj.org/papers/e6002792b44f50039afc22dbe3d4a086/status.svg)](https://joss.theoj.org/papers/10.21105/joss.00764)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2578973.svg?)](https://doi.org/10.5281/zenodo.2578973)\n\n## Purpose\n\nThis package is focused on utilizing Twitter data due to its widespread\nglobal acceptance. The rapid expansion and acceptance of social media\nhas opened doors into opinions and perceptions that were never as\naccessible as they are with today’s prevalence of mobile technology.\nHarvested Twitter data, analyzed for opinions and sentiment can provide\npowerful insight into a population. This insight can assist companies by\nletting them better understand their target population. The knowledge\ngained can also enable governments to better understand a population so\nthey can make more informed decisions for that population. During the\ncourse of this research, data was acquired through the Public Twitter\nApplication Programming Interface (API), to obtain Tweets as the\nfoundation of data and will build a methodology utilizing a topic\nmodeling and lexicographical approach to analyze the sentiment and\nopinions of text in English to determine a general sentiment such as\npositive or negative. The more people express themselves on social\nmedia, this application can be use1`d to gauge the general feeling of\npeople.\n\n## Package\n\nThe `saotd` package is an R interface to the Twitter API and can be used\nto acquire Tweets based on user selected \\#hashtags and was developed\nutilizing a tidyverse approach. The package was designed to allow a user\nto conduct a complete analysis with the contained functions. The package\nwill clean and tidy the Twitter data, determine the latent topics within\nthe Tweets utilizing Latent Dirichlet Allocation (LDA), determine a\nsentiment score using the Bing lexicon dictionary and output\nvisualizations.\n\n## Installation\n\nYou can install the CRAN version using:\n\n``` r\ninstall.packages(\"saotd\")\n```\n\nYou can install the development version from GitHub using:\n\n``` r\ninstall.packages(\"devtools\")\ndevtools::install_github('evan-l-munson/saotd', build_vignettes = TRUE)\n```\n\n## Using saotd\n\nThe functions that are provided by `saotd` are broken down into five\ndifferent categories: Acquire, Explore, Topic Analysis, Sentiment\nCalculation, and Visualizations.\n\n-   Acquire\n\n    -   `tweet_acquire` allows a user to acquire Tweets of their\n        choosing by accessing the Twitter API. In order to do this the\n        user needs to have a [Twitter](https://twitter.com) account.\n        Additionally once the user has an account they will then need to\n        sign up for a [Twitter Developers](https://developer.twitter.com/apps)\n        account. Once a user has a Twitter developers account and has\n        received their individual consumer key, consumer secret key,\n        access token, and access secret key, they can acquire Tweets\n        based on a list of hashtags and a requested number of entries\n        per hashtag.\n\n-   Explore\n\n    -   `tweet_tidy` removes all emoticons, punctuation, weblinks, etc\n        and converts converts the data to a tidy structure.\n    -   `merge_terms` merges terms within a dataframe and prevents\n        redundancy in the analysis.\n    -   `unigram` displays the text Uni-Grams within the Twitter data in\n        sequence from the most used to the least used. A Uni-Gram is a\n        single word.\n    -   `bigram` displays the text Bi-Grams within the Twitter data in\n        sequence from the most used to the least used. A Bi-Gram is a\n        combination of two consecutive words.\n    -   `trigram` displays the text Tri-Grams within the Twitter data in\n        sequence from the most used to the least used. A Tri-Gram is a\n        combination of three consecutive words.\n    -   `bigram_network` Bi-Gram networks builds on computed Bi-Grams.\n        Bi-Gram networks serve as a visualization tool that displays the\n        relationships between the words simultaneously as opposed to a\n        tabular display of Bi-Gram words.\n    -   `word_corr` displays the word correlation between words.\n    -   `word_corr_network` displays the mutual relationship between\n        words. The correlation network shows higher correlations with a\n        thicker and darker edge color.\n\n-   Topic Analysis\n\n    -   `number_topics` determines the optimal number of Latent topics\n        within a dataframe by tuning the Latent Dirichlet Allocation\n        (LDA) model parameters. Uses the `ldatuning` package and outputs\n        an ldatuning plot. **This process can be time consuming\n        depending on the size of the dataframe.**\n    -   `tweet_topics` determines the Latent topics within a dataframe\n        by using Latent Dirichlet Allocation (LDA) model parameters.\n        Uses the `ldatuning` package and outputs an ldatuning plot.\n        Prepares Tweet text, creates DTM, conducts LDA, display data\n        terms associated with each topic.\n\n-   Sentiment Calculation\n\n    -   `tweet_scores` calculates the Sentiment Scores using the [Bing\n        Lexicon\n        Dictionary](https://www.cs.uic.edu/~liub/FBS/sentiment-analysis.html)\n        that will account for sentiment by hashtag or topic.\n    -   `posneg_words` determines and displays the most positive and\n        negative words within the Twitter data.\n    -   `tweet_min_scores` determines the minimum scores for either the\n        entire dataset or the minimum scores associated with a hashtag\n        or topic analysis.\n    -   `tweet_max_scores` determines the maximum scores for either the\n        entire dataset or the maximum scores associated with a hashtag\n        or topic analysis.\n\n-   Visualizations\n\n    -   `tweet_corpus_distribution` determines the scores distribution\n        for the entire Twitter data corpus.\n    -   `tweet_distribution` determines the scores distribution by\n        hashtag or topic for Twitter data.\n    -   `tweet_box` displays the distribution scores of either hashtag\n        or topic Twitter data.\n    -   `tweet_violin` displays the distribution scores of either\n        hashtag or topic Twitter data.\n    -   `tweet_time` displays how the Twitter data sentiment scores\n        through time.  \n    -   `tweet_worldmap` function is not longer exported, as the Twitter data \n        does not contain latitude and longitude values.  Displays the location \n        of a Tweet across the globe by hashtag or topic.\n\n## Example\n\nFor an example of how to use this package, find the vignette at:\n\n``` r\nlibrary(saotd)\nutils::vignette(\"saotd\")\n```\n\n## Meta\n\n-   license:\n\n    -   All code is licensed GPL.\n    -   All data is from public data sources.\n\n-   Get citation information for `saotd` in R by running:\n\n``` r\ncitation(\"saotd\")\n```\n\n## Getting help\n\nIf you encounter a clear bug, please file a minimal reproducible example\non [github](https://github.com/evan-l-munson/saotd/issues).\n\n## Contributing\n\nIf you would like to contribute, please create a [Pull\nRequest](https://github.com/evan-l-munson/saotd/pulls) and make\nappropriate applicable changes for review.\n\n## References\n\n-   [AFIT Data Science Lab](https://github.com/AFIT-R)\n-   [Tidyverse](https://www.tidyverse.org/)\n-   [Text Mining with R](https://www.tidytextmining.com/)\n-   [ldatuning](https://CRAN.R-project.org/package=ldatuning)\n-   [topicmodels](https://CRAN.R-project.org/package=topicmodels)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevan-l-munson%2Fsaotd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevan-l-munson%2Fsaotd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevan-l-munson%2Fsaotd/lists"}