Accessing GitHub data from R
Accessing the GitHub data from R is simple. It can be accessed using the package rgithub
developed by Carlos Scheidegger, which provides the binding for the GitHub web services API. We can also use the API URL directly in the function fromJSON
, which will extract the JSON data in data frame format.
Previously, we saw how to authenticate using the package rgithub
; now let's use some of the functions available in the package to pull data from GitHub.
First, let's pull our GitHub account data using the function get.myself
and pass the variable ctx
as a parameter, which is a GitHub context object holding the authentication results. This function will provide basic details about our account such as date created, last updated, location, e-mail, number of public repositories contributed, following and followers, and also about the number of API calls we have made in the current session. Let's execute the function get.myself
and check the output.
get.myself(ctx)
We get the...