Home » Posts tagged 'Application programming interface'
Tag Archives: Application programming interface
ESPN Crincinfo is the best site for cricket data (you can see an earlier detailed post on the database here http://decisionstats.com/2012/04/07/cricinfo-statsguru-database-for-statistical-and-graphical-analysis/ ), and using the XML package in R we can easily scrape and manipulate data
Here is the code.
library(XML) url="http://stats.espncricinfo.com/ci/engine/stats/index.html?class=1;team=6;template=results;type=batting" #Note I can also break the url string and use paste command to modify this url with parameters tables=readHTMLTable(url) tables$"Overall figures" #Now see this- since I only got 50 results in each page, I look at the url of next page table1=tables$"Overall figures" url="http://stats.espncricinfo.com/ci/engine/stats/index.html?class=1;page=2;team=6;template=results;type=batting" tables=readHTMLTable(url) table2=tables$"Overall figures" #Now I need to join these two tables vertically table3=rbind(table1,table2) Note-I can also automate the web scraping . Now the data is within R, we can use something like Deducer to visualize.
So I finally got my test plan accepted for a 1 month trial to the Oracle Public Cloud at https://cloud.oracle.com/ .
Some initial thoughts- this Java cloud seemed more suitable for web apps, than for data science ( but I have to spend much more time on this).
I really liked the help and documentation and tutorials, Oracle has invested a lot in it to make it friendly to enterprise users.
Hopefully the Oracle R Enterprise ORE guys can talk to the Oracle Cloud department and get some common use case projects going.
In the meantime, I did a roundup on all R -Java projects.
They include- (more…)
Due to changes in Google APIs my earlier post on using Google Analytics in R is deprecated. Unfortunately it is still on top 10 results for Google results for Using Google Analytics with R.
That post is here http://decisionstats.com/2012/03/20/using-google-analytics-with-r/
A more updated R package on Google Analytics and R is here . https://github.com/skardhamar/rga
A better updated post on an easy to use tutorial on using Google Analytics with R using OAuth 2 playground is here.
- Set the Google analytics query parameters for preparing the request URI
- Get the access token from Oauth 2.0 Playground
- Retrieve and select the Profile
- Retrieving GA data
Note it is excellent for learning to use RJSON method as well. You can see the details on the Tatvic blog above.
Hat tip- Vignesh Prajapati
- (not provided): Using R and the Google Analytics API (r-bloggers.com)