Posts

Adventures with R - Facebook Ads (Part 3)

Now that we have set up the required packages and authentications in Facebook, it is time to go to work in R !!

RStudio is the programming interface that I used. For ease of use, I go to Tools --> Global Options --> Appearance. I used Sky as my RStudio theme, Lucida console, font size 11 and Idle Fingers as my Editor theme. It gives a neutral black background and the fonts (comments, code, etc) is much more clearer to see


First part of the code - working directory and packages (All R code is in blue so that it easy to differentiate in the blog)

getwd()

setwd("<Use your own folder directory structure here")

#install.packages("httr")
library(httr)
library(dplyr)

library(devtools)

#devtools::install_github('Rdatatable/data.table')
library(data.table)

#install.packages("cardcorp/fbRads")
library(fbRads)
library(rlist)
library(RODBC)

library(stringr)

The next is a two step process.

Step 1 - One time to get the authentication for the first time
# Getting the aut…

Adventures with R - Facebook Ads (Part 2)

We covered the very high level of automating Facebook Ads via R in Part 1

Before we get started in Part 2, it is essential to download R Studio. There are other R development environments around but R Studio is the best environment that I have come across. Needless to say, you need Base R also. This post does not get into the basics of R (Idea for another post!)

Once you have R Studio in place, it is essential to get the fbRads package. Hat tip to Gergely Daroczi. His package is an excellent package, well documented, well supported and most importantly, fast !!! 


The next requirement is to create a Facebook App and create an oAuth token. 

The package link within GitHub covers the creation of the token but I have modified some of the steps as per my findings

Creating a Facebook App & connect with OAuth tokenTo be able to use this package, you will have to create a Facebook App and authorize it to manage your Facebook ads. Basic steps to create an app with Development access level lettin…

Adventures with R - Facebook Ads (Part 1)

A new year resolution in 2018 has been trying to learn new data science technologies. 
An attempt over the previous few weeks has been trying to master R. R is an open source programming language supported by the R foundation for statistical computing. Originally used by statisticians, it has now found applications in nearly every field of machine learning. 
One of the interesting applications at work was trying to automate Facebook Ads. Facebook has an advertising platform that uses advanced optimization techniques to serve the ads to the right audience at the right time. The challenge has been getting a daily feed from Facebook about who sees the ad, who interacts with it and who ends up buying your end product on an ecommerce site. 
There have been three main ways I tried extracting data from Facebook
1. Facebook Business Manager Login : Manually logging in and getting the data out. This was a cumbersome approach and not prone to easy automation. 
2. Blendo.co : Blendo is a world class …

Manchester Derby

Image

Tableau Sports Visualization Challenge

Image
Conference
Powered by Tableau

Happy New Year Wishes and all assorted !!

Image
Happy New year wishes for everyone..........


Crocodile Hunter passes away

http://abcnews.go.com/GMA/story?id=2392365&page=1

"
When Sawyer asked him what he feared the most, Irwin's answer wasn't venom or teeth, it was the animal within each of us. "I'm most afraid of people," Irwin said. "The places where I go, the people factor is just so scary, you know, bad guys running around with guns and stuff.
"