Measuring CTR performance for a page
The performance of a page can be measured by the user activity in the page and the user's interaction in the posts published in the page. Let's measure the performance for a page. When we say measuring the performance, it is by means of counting the user interaction through likes, comments, and shares.
In order to come up with a trend, we will need the timestamp data. Then, we need to consolidate the data on a monthly basis so that we can draw the time-series performance chart.
First, we need to convert the Facebook date format into R-supported date format. The following code is a function to convert the date format. We need to pass the date timestamp data to this function. The function will return the same date timestamp in R-supported format so that we can perform date operation. The code is as follows:
format.facebook.date<- function(datestring) { date<- as.POSIXct(datestring, format = "%Y-%m-%dT%H:%M:%S+0000", tz = "GMT") }
Then, we need to aggregate...