Type: | Package |
Title: | Fetching Tweet Data for Sentiment Analysis |
Version: | 1.0.5 |
Author: | Hakki Sabah <hakkisabah@hotmail.com> |
Maintainer: | Hakki Sabah <hakkisabah@hotmail.com> |
Description: | Which uses Twitter APIs for the necessary data in sentiment analysis, acts as a middleware with the approved Twitter Application. A special access key is given to users who subscribe to the application with their Twitter account. With this special access key, the user defined keyword for sentiment analysis can be searched in twitter recent searches and results can be obtained( more information https://github.com/hakkisabah/tsentiment ). In addition, a service named tsentiment-services has been developed to provide all these operations ( for more information https://github.com/hakkisabah/tsentiment-services ). After the successful results obtained and in line with the permissions given by the user, the results of the analysis of the word cloud and bar graph saved in the user folder directory can be seen. In each analysis performed, the previous analysis visual result is deleted and this is the basic information you need to know as a practice rule. 'tsentiment' package provides a free service that acts as a middleware for easy data extraction from Twitter, and in return, the user rate limit is reduced by 30 requests from the total limit and the remaining requests are used. These 30 requests are reserved for use in application analytics. For information about endpoints, you can refer to the limit information in the "GET search/tweets" row in the Endpoints column in the list at https://developer.twitter.com/en/docs/twitter-api/v1/rate-limits. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
URL: | https://github.com/hakkisabah/tsentiment, https://www.tsentiment.com |
BugReports: | https://github.com/hakkisabah/tsentiment/issues |
Depends: | R (≥ 4.0) |
Imports: | grDevices,reshape2,wordcloud,ggplot2,httr,syuzhet,tidytext,dplyr,tibble,stringi |
RoxygenNote: | 7.2.1 |
NeedsCompilation: | no |
Packaged: | 2022-11-02 21:32:21 UTC; hakki |
Repository: | CRAN |
Date/Publication: | 2022-11-02 22:10:02 UTC |
tsentiment environment
Description
tsentiment environment
Usage
APIinfo
Arguments
APIinfo |
Environment |
Format
An object of class environment
of length 4.
User file permission checker
Description
User file permission checker
Usage
checkConfirmForUSer()
Value
String
Examples
## Not run:
checkConfirmForUser()
## End(Not run)
Check r Version
Description
This function checking using current R version
Usage
checkVersionForSentiment()
Value
boolean
Examples
checkVersionForSentiment()
Clean raw data
Description
This function clean fetched tweets
Usage
cleanFetchedTweet(fetchedTweet = NULL)
Arguments
fetchedTweet |
Fetched tweet has a lot of different characters |
Value
table
Help for delete save files folder
Description
Help for delete save files folder
Usage
clearPrevious()
Value
Void
Folder creator
Description
This function create a folder in project path
Usage
createFolder()
Value
String
Start analysis after defined Twitter API information
Description
This function prepare API information and start analysis
Usage
getAnalysis()
Value
file
Examples
## Not run:
clearPrevious()
getCloudSentiment()
getBarSentiment()
## End(Not run)
Export bar plot
Description
This function export a bar plot with analysed data
Usage
getBarSentiment(tweet = NULL)
Arguments
tweet |
Cleaned tweet data |
Value
file
Export word cloud
Description
This function export a word cloud with analysed data
Usage
getCloudSentiment(text)
Arguments
text |
Cleaned tweet data |
Value
file
Get Tweet
Description
This function only get tweet from tsentiment api
Usage
getTweet(fetchParams)
Arguments
fetchParams |
is variable |
Value
JSON
Examples
## Not run:
fetchParams <- list(headers = headers,params = params,url = APIinfo$url)
getTweet(fetchParams)
## End(Not run)
Set Twitter Developer Account Api Information
Description
This function should be used at the start of each session
Usage
setAccount(params)
Arguments
params |
Its have to required Twitter and request informations for using this package |
Value
String
Examples
params <- list(BEARER_TOKEN = "DSEFS55SSS",query = "binance")
setAccount(params)
Fetch Tweets
Description
This function prepare http information for fetching process and working together sub function
Usage
tweetFetcher()
Value
list
Create CSV
Description
This function create CSV file with parameters
Usage
writeToCSV(tweetData)
Arguments
tweetData |
fetched first dirty tweet data |
Value
file
Examples
## Not run:
writeToCSV()
## End(Not run)