A teeny tiny Twitter tale

[This article was first published on HighlandR, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Use of social media within the NHS to raise awareness of dangerous conditions –

We had an event at work today, bringing together clinicians and QI staff across a range of disciplines and services to provide some education and raise awareness of work that is being undertaken to recognise and treat Sepsis.

We tried to encourage folk to tweet, using the hashtag “#nhshsepsis” (you can also follow our sepsis twitter account on @nhshsepsis to learn more about this dangerous condition and the work we are doing in Highland).

There weren’t a huge amount of tweets, at the time of writing this, but there were enough to justify installing rtweet and taking a look.

I haven’t covered the necessary setup in terms of creating an application – take a look at https://apps.twitter.com/ and also the rtweet package help, you should be able to get yourself going without too much issue.
The main thing to remember is that you will need to set a callback URL of http://127.0.0.1:1410

Gist below – should all be pretty self explanatory – looking at the number of tweets, the most favourited, and the most influential (based on likes/RT) tweeter.

2017-11-06-most-tweets.png

Also a wee look at the devices being used – there’s quite a lot of info that can be gleaned from the Twitter API.

2017-11-06-devices.png

There are many functions that I have not even looked at yet, but the key function of simply returning all the tweets with the relevant hashtag was very straightforward.

With this package, stringr and tidytext, there is a lot that can be done to analyse data from what seems to be the social media channel of choice for the #rstats afficionado

2017-11-06-most-rt.png

To leave a comment for the author, please follow the link and comment on their blog: HighlandR.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)