Home » Posts tagged 'JavaScript'
Tag Archives: JavaScript
Google Plus API- statistical text mining anyone
For the past year and two I have noticed a lot of statistical analysis using #rstats /R on unstructured text generated in real time by the social network Twitter. From an analytic point of view , Google Plus is an interesting social network , as it is a social network that is new and arrived after the analytic tools are relatively refined. It is thus an interesting use case for evolution of people behavior measured globally AFTER analytic tools in text mining are evolved and we can thus measure how people behave and that behavior varies as the social network and its user interface evolves.
And it would also be a nice benchmark to do sentiment analysis across multiple social networks.
Some interesting use cases of using Twitter that have been used in R.
- Using R to search Twitter for analysis
- Text Data Mining With Twitter And R
- TWITTER FROM R… SURE, WHY NOT!
- A package called TwitteR
- slides from my R tutorial on Twitter text mining #rstats
- Generating graphs of retweets and @-messages on Twitter using R and Gephi

The Console lets you see and manage the following project information:
- Activated APIs - Activate one or more APIs to enable traffic monitoring, filtering, and billing, and API-specific pages for your project. Read more about activating APIs here.
- Traffic information - The Console reports traffic information for each activated API. Additionally, you can cap or filter usage by API. Read more about traffic reporting and request filtering here.
- Billing information - When you activate billing, your activated APIs can exceed the courtesy usage quota. Usage fees are billed to the Google Checkout account that you specify. Read more about billing here.
- Project keys - Each project is identified by either an API key or an OAuth 2.0 token. Use this key/token in your API requests to identify the project, in order to record usage data, enforce your filtering restrictions, and bill usage to the proper project. You can use the Console to generate or revoke API keys or OAuth 2.0 certificates to use in your application. Read more about keys here.
- Team members - You can specify additional members with read, write, or ownership access to this project’s Console page. Read more about team members here.
| Google+ API | Courtesy limit: 1,000 queries/day |
|---|
Effective limits:
| API | Per-User Limit | Used | Courtesy Limit | |
|---|---|---|---|---|
| Google+ API | 5.0 requests/second/user | 0% | 1,000 queries/day |
API Calls
GET https://www.googleapis.com/plus/v1/people/userId
Common Parameters
Different API methods require parameters to be passed either as part of the URL path or as query parameters. Additionally, there are a few parameters that are common to all API endpoints. These are all passed as optional query parameters.
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data Formats
Resources in the Google+ API are represented using JSON data formats. For example, retrieving a user’s profile may result in a response like:
{
"kind": "plus#person",
"id": "118051310819094153327",
"displayName": "Chirag Shah",
"url": "https://plus.google.com/118051310819094153327",
"image": {
"url": "https://lh5.googleusercontent.com/-XnZDEoiF09Y/AAAAAAAAAAI/AAAAAAAAYCI/7fow4a2UTMU/photo.jpg"
}
}
Common Properties
While each type of resource will have its own unique representation, there are a number of common properties that are found in almost all resource representations.
|
|
|
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Pagination
In requests that can respond with potentially large collections, such as Activities list, each response contains a limited number of items, set by maxResults(default: 20). Each response also contains a nextPageToken property. To obtain the next page of items, you pass this value of nextPageToken to the pageTokenproperty of the next request. Repeat this process to page through the full collection.
For example, calling Activities list returns a response with nextPageToken:
{
"kind": "plus#activityFeed",
"title": "Plus Public Activities Feed",
"nextPageToken": "CKaEL",
"items": [
{
"kind": "plus#activity",
"id": "123456789",
...
},
...
]
...
}
To get the next page of activities, pass the value of this token in with your next Activities list request:
https://www.googleapis.com/plus/v1/people/me/activities/public?pageToken=CKaEL
As before, the response to this request includes nextPageToken, which you can pass in to get the next page of results. You can continue this cycle to get new pages — for the last page, “nextPageToken” will be absent.
+ 1 your website -updated
how to add the all new plus one button to your own website
just go here.
submit form
wait
https://services.google.com/fb/forms/plusonesignup/
also see https://profiles.google.com/u/0/+1/personalization/
or read the hack here
http://www.yvoschaap.com/weblog/the_google_1_button_discovered
The buttons does exists because there is personalisation option available refering to non-Google sites.
Google claims the button is “coming soon” but I couldn’t wait, so I looked around the code, and looked some more, untill I found the button endpoint hiding from me, obfuscated, in a stray piece of javascript.
Check out these live Google +1 buttons:
at
http://fanity.com/
Protovis a graphical toolkit for visualization
I just found about a new data visualization tool called Protovis http://vis.stanford.edu/protovis/ex/
Protovis composes custom views of data with simple marks such as bars and dots. Unlike low-level graphics libraries that quickly become tedious for visualization, Protovis defines marks through dynamic properties that encode data, allowing inheritance, scales and layouts to simplify construction.
Protovis is free and open-source and is a Stanford project. It has been used in web interface R Node (which I will talk later )
http://squirelove.net/r-node/doku.php
Conventional
While Protovis is designed for custom visualization, it is still easy to create many standard chart types. These simpler examples serve as an introduction to the language, demonstrating key abstractions such as quantitative and ordinal scales, while hinting at more advanced features, including stack layout.
Custom
Many charting libraries provide stock chart designs, but offer only limited customization; Protovis excels at custom visualization design through a concise representation and precise control over graphical marks. These examples, including a few recreations of unusual historical designs, demonstrate the language’s expressiveness.
Try Protovis today
http://vis.stanford.edu/protovis/
It uses JavaScript and SVG for web-native visualizations; no plugin required (though you will need a modern web browser)! Although programming experience is helpful, Protovis is mostly declarative and designed to be learned by example.
Related Articles
- Linking Petterson – Visualising FRBR data with Protovis (home.hio.no)
- The Stanford Visualization Group Debuts Visual Tool for Cleaning Up Data (readwriteweb.com)
- Roll your own JavaScript lambda syntax (strobe.cc)



Area Charts
Bar & Column Charts
Scatterplots
Pie & Donut Charts
Line & Step Charts
Stacked Charts
Grouped Charts
Anderson’s Flowers
Becker’s Barley
Bertin’s Hotel
Streamgraphs
Sparklines
Bullet Charts
Bubble Charts
Sizing the Horizon
Candlestick Charts
Burtin’s Antibiotics
Nightingale’s Rose
Playfair’s Wheat
Gas & Driving
Seattle Weather
Marey’s Trains
Stemplots
Merge Sort




