5/6/2017

Introduction

The INSighTA™ is a simple Instagram Analytics application to get understanding on how likes in instagram posts are related with various attributes.

I have gathered personal instagram data of public profiles using Instagram API and compiled a data set. From the dataset few features were extracted and more features were derived.

The exploratory analysis was done and few inferences were made. As the last part a linear regression fit with loess was fitted for the user customisable data.

App is live at:

https://shining-thiloshon.shinyapps.io/instagramanalysis/

Data Retrieval

The user specific access token was used to get the instagram data. Various GET requests were used to retrieve as specified in the API.

appClientID <- "client ID goes here"
appClientSecret <- "client secret goes here"
appAuth <- instaOAuth(appClientID, appClientSecret, scope = "basic")

# JSON libraries were used to parse JSON data
ownerInfo <- 
    paste("https://api.instagram.com/v1/users/self/?access_token=", 
                   accessToken, sep = "")
ownerData <- getURL(ownerInfo) %>% fromJSON()

Feature Extraction

The raw data gathered was itself a feature extraction process. The features extracted were,

        "userName", # the username of the user
        "createdTime", # time the post was created
        "caption", # caption of the post
        "userHasLiked", # has the user liked his own posts?
        "likes", # number of likes
        "tags", # the Hashtags used in the post
        "filter", # the filters used in the image
        "commentsCount", # number os counts
        "type", # is the post a video or image
        "location", # location of the post
        "usersInPhoto" # how many are tagged in the post?

Analysis