Title: | Fetching Tweet Data for Sentiment Analysis |
---|---|
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>. |
Authors: | Hakki Sabah <[email protected]> |
Maintainer: | Hakki Sabah <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.5 |
Built: | 2024-11-05 03:26:33 UTC |
Source: | https://github.com/hakkisabah/tsentiment |
tsentiment environment
APIinfo
APIinfo
APIinfo |
Environment |
An object of class environment
of length 4.
User file permission checker
checkConfirmForUSer()
checkConfirmForUSer()
String
## Not run: checkConfirmForUser() ## End(Not run)
## Not run: checkConfirmForUser() ## End(Not run)
This function checking using current R version
checkVersionForSentiment()
checkVersionForSentiment()
boolean
checkVersionForSentiment()
checkVersionForSentiment()
This function clean fetched tweets
cleanFetchedTweet(fetchedTweet = NULL)
cleanFetchedTweet(fetchedTweet = NULL)
fetchedTweet |
Fetched tweet has a lot of different characters |
table
Help for delete save files folder
clearPrevious()
clearPrevious()
Void
This function create a folder in project path
createFolder()
createFolder()
String
This function prepare API information and start analysis
getAnalysis()
getAnalysis()
file
## Not run: clearPrevious() getCloudSentiment() getBarSentiment() ## End(Not run)
## Not run: clearPrevious() getCloudSentiment() getBarSentiment() ## End(Not run)
This function export a bar plot with analysed data
getBarSentiment(tweet = NULL)
getBarSentiment(tweet = NULL)
tweet |
Cleaned tweet data |
file
This function export a word cloud with analysed data
getCloudSentiment(text)
getCloudSentiment(text)
text |
Cleaned tweet data |
file
This function only get tweet from tsentiment api
getTweet(fetchParams)
getTweet(fetchParams)
fetchParams |
is variable |
JSON
## Not run: fetchParams <- list(headers = headers,params = params,url = APIinfo$url) getTweet(fetchParams) ## End(Not run)
## Not run: fetchParams <- list(headers = headers,params = params,url = APIinfo$url) getTweet(fetchParams) ## End(Not run)
This function should be used at the start of each session
setAccount(params)
setAccount(params)
params |
Its have to required Twitter and request informations for using this package |
String
params <- list(BEARER_TOKEN = "DSEFS55SSS",query = "binance") setAccount(params)
params <- list(BEARER_TOKEN = "DSEFS55SSS",query = "binance") setAccount(params)
This function prepare http information for fetching process and working together sub function
tweetFetcher()
tweetFetcher()
list
This function create CSV file with parameters
writeToCSV(tweetData)
writeToCSV(tweetData)
tweetData |
fetched first dirty tweet data |
file
## Not run: writeToCSV() ## End(Not run)
## Not run: writeToCSV() ## End(Not run)