Analyze Twitter User

No algorithm description given

0. TL;DR This is a recipe for Analyzing a Twitter User. It combines  diego/GetUserTweets ,  nlp/SocialSentimentAnalysis , and  nlp/LDA  into a micro-service. 1. Introduction Recipes are plug-n-play utilities that solve a specific problem in a novel way. These micro-services are comprised of one or more algorithms that allow users to quickly and easily get value from Algorithmia. They’re modular, and should be thought of as mini-products with obvious value. This recipe is composed in the following way: The recipe is given a twitter user and retrieves relevant tweets from twitter using  diego/GetUserTweets . These relevant tweets are analyzed, labelled and sorted by  nlp/SocialSentimentAnalysis . The top 20% (positive) tweets and the bottom 20% (negative) tweets are used to extract positive and negative topics using  nlp/LDA . The corresponding positive & negative topics as well as information about the user including followers and following. Input: (Required):   The twitter user to analyze (Required):   Twitter API authentication keys Output user twitter name number of followers number of people following A list of positive topics   (nlp/LDA output) A list of negative topics   (nlp/LDA output) 2. Query The query keyword/string:  The keyword that you're searching for on Twitter.   (key = "query") Example of a query keyword/string: {
 "query": "algorithmia"
} 3. Authentication Twitter API authentication keys:   The API keys that are necessary to access Twitter API service. You can get yours   here .   (key = "auth") {
 "auth": {
 "app_key": "xxxxxxx",
 "app_secret": "xxxxxxx",
 "oauth_token": "xxxxxxx",
 "oauth_token_secret": "xxxxxxx"
} 3. Example Example 1: Parameter 1: A twitter username Parameter 2: Twitter API authentication keys {
 "query": "doppenhe",
 "auth": {
 "app_key": "xxxxxxx",
 "app_secret": "xxxxxxx",
 "oauth_token": "xxxxxxx",
 "oauth_token_secret": "xxxxxxx"
} 4. Output Example 1: {     "following":302,    "is negative about":[        {           "obfuscated":1,          "algorithm":1,          "terrorists":1,          "humans":1,          "aims":1,          "computer":1,          "identify":1,          "time":2       }      ...      {           "code":2,          "machine-learning":1,          "scala":2,          "review":1,          "wtf":1,          "signs":1,          "make":1,          "died":1       }    ],    "followers":1390,    "screen_name":"doppenhe",    "is positive about":[        {           "binary":1,          "algorithmia":4,          "algorithm":2,          "show":1,          "support":1,          "doppenhe":1,          "advantage":1,          "today":3       }      ...    ] }

(no tags)

Cost Breakdown

10 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
API calls
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Internet access

This algorithm has Internet access. This is necessary for algorithms that rely on external services, however it also implies that this algorithm is able to send your input data outside of the Algorithmia platform.

Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.

To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY'
View cURL Docs
algo auth
algo run algo://diego/AnalyzeTwitterUser/0.1.6 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import (
  algorithmia ""

input := {{input | formatInput:"go"}}

var client = algorithmia.NewClient("YOUR_API_KEY", "")
algo, _ := client.Algo("algo://diego/AnalyzeTwitterUser/0.1.6")
resp, _ := algo.Pipe(input)
response := resp.(*algorithmia.AlgoResponse)
View Go Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://diego/AnalyzeTwitterUser/0.1.6");
AlgoResponse result = algo.pipeJson(input);
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://diego/AnalyzeTwitterUser/0.1.6")
val result = algo.pipeJson(input)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(output) {
View Javascript Docs
using Algorithmia;

var input = "{{input | formatInput:"cs"}}";
var client = new Client("YOUR_API_KEY");
var algorithm = client.algo("algo://diego/AnalyzeTwitterUser/0.1.6");
var response = algorithm.pipe<object>(input);
View .NET/C# Docs
var input = {{input | formatInput:"javascript"}};
           .then(function(response) {
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('diego/AnalyzeTwitterUser/0.1.6')
print algo.pipe(input)
View Python Docs

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("diego/AnalyzeTwitterUser/0.1.6")
result <- algo$pipe(input)$result
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('diego/AnalyzeTwitterUser/0.1.6')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::Algorithmia;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo("diego/AnalyzeTwitterUser/0.1.6");
let response = algo.pipe(input);
View Rust Docs
import Algorithmia

let input = "{{input | formatInput:"swift"}}";
let client = Algorithmia.client(simpleKey: "YOUR_API_KEY")
let algo = client.algo(algoUri: "diego/AnalyzeTwitterUser/0.1.6") { resp, error in
View Swift Docs
  • {{comment.username}}