Book Image

Mastering Data analysis with R

By : Gergely Daróczi
Book Image

Mastering Data analysis with R

By: Gergely Daróczi

Overview of this book

Table of Contents (19 chapters)
Mastering Data Analysis with R
Credits
www.PacktPub.com
Preface

The number of R users in social media


An alternative way to try to estimate the number of R users could be to analyze the occurrence of the related terms on social media. This is relatively easy on Facebook, where the marketing API allows us to query the size of the so-called target audiences, which we can use to define targets for some paid ads.

Well, we are not actually interested in creating a paid advertisement on Facebook right now, although this can be easily done with the fbRads package, but we can use this feature to see the estimated size of the target group of persons interested in R:

> library(fbRads)
> fbad_init(FB account ID, FB API token)
> fbad_get_search(q = 'rstats', type = 'adinterest')
         id                       name audience_size path description
6003212345926 R (programming language)       1308280 NULL          NA

Of course, to run this quick example you will need to have a (free) Facebook developer account, a registered application, and a generated token...