Original link:tecdat.cn/?p=387

Original source:Tuo End number according to the tribe public number

 

Twitter is a popular social network, and there’s a ton of data waiting to be analyzed. The Twitter R package is a great tool for text mining Twitter data. This article is about using the Twitter R package to take Twitter data, import it into R, and then do some interesting data analysis on it.

The first step is to register your app.

To be able to access Twitter data programming, we need to create an application that interacts with Twitter’s API.

After registering you will receive a key and password:

After obtaining the key and password, we can authorize our application in R to access Twitter on our behalf:

Depending on the search term, we can collect tens of thousands of tweets in a matter of minutes. Here we test the twitter results of a keyword called Littlecaesars:

Grab the latest 1000 related Tweets

Since the default crawl result is in JSON format, the twlisttodf function is used to convert it into a data box

Then we do some simple text cleaning

From the obtained data, we can see twitter Posting time, content, longitude and latitude and other information

After cleansing the data, we segmented the Twitter content for data visualization

After word segmentation, we can get the related twitter high-frequency words and then visualize them

In addition, the data can be combined with the timestamp data and geographic data for visual analysis

If you’ve been considering applying sentiment analysis to some textual data, you might find it easier to use R than you thought!


Most welcome insight

1. Research hot spots of big data journal articles

2.618 Online Shopping data Review – What are the Chopped people concerned about

3. R language text mining TF-IDF topic modeling, sentiment analysis N-gram modeling research

4. Python Topic Modeling Visualization LDA and T-SNE interactive visualization

5. R language text mining, NASA Data Network analysis, TF-IDF and Topic modeling

6. Python topics LDA modeling and T-SNE visualization

7. Topic-modeling analysis of text data in R language

8. Topic modeling analysis of TEXT mining for NASA metadata using R language

9. Python crawler is used to analyze semantic data of web fetching LDA topic