[twitter-dev] Re: help me plz quiry speed and geocode

2010-12-01 Thread disc31
my goal is to plott the long and lat of posts on twitter in real time,
i have got this working but it seems to be very slow.

im using the stream api to do this

im justing pulling off the json quiry the post and the geocode, when i
just pull the post without the geocode it runs like a dream, very fast
but as soon as a try to pull the lat and long it pulls in one post and
then stops its strange because there is nothing wrong with my
processing script that i can see, and the json quiry looks like its
working fine also.

On Nov 28, 1:44 am, danetroup  wrote:
> how do you get tweets from all over? I thought they were limited to up
> to 1000 mile radius?
>
> can you give a summary of your goal. It seems like doing it real time
> would be impossible (if you want to capture every tweet around the
> world)
>
> I am working on a geo mashup with tweets and google maps using Flash.
> It is working ok but the limitations are the 100 cap on results and
> the radius cap of 100 miles.
>
> it sounds like you must be hitting the rate limitation on the API. im
> not sure what it is on the authenticated status filter. did you try
> the search API?
>
> On Nov 27, 6:34 pm, disc31  wrote:
>
> > I am a uni student, I am very new to the twitter api, i have been
> > making an aplication in "Processing" to show tweets coming up on a
> > world map in real time. im not trying to get the post its the geocodes
> > i want, with lots of help from people here and on the processing
> > forums i have made it so that it plotts the geocode in my application
> > as a dot and this will represent twitter posts from all around the
> > world.
>
> > link to a picture of my app to give you an idea:
>
> >http://yfrog.com/b7worldstarmapj
>
> > here is the quiry i am using:
>
> > search.twitter.com/1/statuses/filter.json?
> > location=-168.75,9.79,158.90,83.02
>
> > The problem i am getting is that i am getting a twitter post about
> > every 30 seconds with this and after about 5/10 posts it stops feeding
> > me the posts and wont let me connect for about another hour.
>
> > OVER VIEW OF WHAT I WANT TO ACHIEVE
>
> > - geocode of posts from all around the would not just one place
> > - i dont need what they have posted but if i get it then its a bonus
> > - i need to be able to recieve this information at a reasonable speed
> > (i dont know if im allowed because of the quiry limit)
> > - any sugestions of different quirys or code are VERY WELCOME
>
> > here is my processing code is anyone is interested:
>
> > import com.twitter.processing.*;
> > //
>
> > // test tweet counting (not sure if it will work)
> > int tweetCount;
> > // this stores how many tweets we've gotten
> > int tweets = 0;
> > // and this stores the text of the last tweet
> > String tweetText = "";
> > Geo tweetGeo;
>
> > double lati, longi;
> > float latiFl, longiFl,latiMap, longiMap;
>
> > int textsize;
>
> > void setup() {
> >   size(1000,600);
> >     background(0);
>
> >   // set up twitter stream object
> >   TweetStream s = new TweetStream(this, "search.twitter.com", 80,
> >   "1/statuses/filter.json?location=-168.75,9.79,158.90,83.02",
> >   "Usser", "PASSWORD");
> >   s.go();
> >   smooth();
>
> > }
>
> > void draw() {
>
> >    fill(0);
> >   rect(0,450,1000,150);
>
> >   textsize = 12;
> >   // set up fonts
> >   PFont font;
> >   font = createFont("ArialMT-48.vlw", textsize);
> >   textFont(font);
> >   textSize(textsize);
>
> >   fill(255);
>
> >    //converts double to float
> >   latiFl = (float)lati;
> >   longiFl = (float)longi;
>
> >   //map value to screen
> >   latiMap = map(latiFl, -90, 90, 0, width);
> >   longiMap = map(longiFl, -180, 180, 0, height);
>
> >   // and draw the text of the last tweet
>
> >   text(tweetText, 20, 520);
> >   // adn its lat and long
> >   text("lat = " + lati + " long = " + longi,20,560);
>
> >   text("number of tweets:" +tweetCount, 880, 580);
>
> >   for( int i = 0; i < 7000; i++){
> >     fill(255);
> >     ellipse(latiMap, longiMap, 5,5);
> >    /* fill(0);
> >     rect(0,500,1000,100);
> >     */
> >   }
>
> > }
>
> > // called by twitter stream whenever a new tweet comes in
> > void tweet(Status tweet) {
> >   // print a message to the console just for giggles if you like
> >   // println("got tweet " + tweet.id());
>
> >   // store the latest tweet text
> >   tweetText = tweet.text();
> >   tweetGeo = tweet.geo();
>
> >   lati = tweetGeo.latitude();
> >  longi = tweetGeo.longitude();
>
> >   println("lat = " + lati + " long = " + longi);
> >   // bump our tweet count by one
> >   tweets += 1;
>
> >   println("number of tweets:" +tweetCount);
> >   tweetCount++;
>
> > }
>
> > thanks for looking

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: help me plz quiry speed and geocode

2010-11-28 Thread Bess
Any standard Twitter API is rate-limited except Streaming API
(Firehost). However Streaming API must be approved by Twitter
manually.

If radius cap is 100 miles, it should cover most metropolitan area
size. In some areas you may not get enough tweets for 200 miles
diameter to show sufficient Tweet results in real time or search
terms.

On Nov 27, 5:44 pm, danetroup  wrote:
> how do you get tweets from all over? I thought they were limited to up
> to 1000 mile radius?
>
> can you give a summary of your goal. It seems like doing it real time
> would be impossible (if you want to capture every tweet around the
> world)
>
> I am working on a geo mashup with tweets and google maps using Flash.
> It is working ok but the limitations are the 100 cap on results and
> the radius cap of 100 miles.
>
> it sounds like you must be hitting the rate limitation on the API. im
> not sure what it is on the authenticated status filter. did you try
> the search API?
>
> On Nov 27, 6:34 pm, disc31  wrote:
>
> > I am a uni student, I am very new to the twitter api, i have been
> > making an aplication in "Processing" to show tweets coming up on a
> > world map in real time. im not trying to get the post its the geocodes
> > i want, with lots of help from people here and on the processing
> > forums i have made it so that it plotts the geocode in my application
> > as a dot and this will represent twitter posts from all around the
> > world.
>
> > link to a picture of my app to give you an idea:
>
> >http://yfrog.com/b7worldstarmapj
>
> > here is the quiry i am using:
>
> > search.twitter.com/1/statuses/filter.json?
> > location=-168.75,9.79,158.90,83.02
>
> > The problem i am getting is that i am getting a twitter post about
> > every 30 seconds with this and after about 5/10 posts it stops feeding
> > me the posts and wont let me connect for about another hour.
>
> > OVER VIEW OF WHAT I WANT TO ACHIEVE
>
> > - geocode of posts from all around the would not just one place
> > - i dont need what they have posted but if i get it then its a bonus
> > - i need to be able to recieve this information at a reasonable speed
> > (i dont know if im allowed because of the quiry limit)
> > - any sugestions of different quirys or code are VERY WELCOME
>
> > here is my processing code is anyone is interested:
>
> > import com.twitter.processing.*;
> > //
>
> > // test tweet counting (not sure if it will work)
> > int tweetCount;
> > // this stores how many tweets we've gotten
> > int tweets = 0;
> > // and this stores the text of the last tweet
> > String tweetText = "";
> > Geo tweetGeo;
>
> > double lati, longi;
> > float latiFl, longiFl,latiMap, longiMap;
>
> > int textsize;
>
> > void setup() {
> >   size(1000,600);
> >     background(0);
>
> >   // set up twitter stream object
> >   TweetStream s = new TweetStream(this, "search.twitter.com", 80,
> >   "1/statuses/filter.json?location=-168.75,9.79,158.90,83.02",
> >   "Usser", "PASSWORD");
> >   s.go();
> >   smooth();
>
> > }
>
> > void draw() {
>
> >    fill(0);
> >   rect(0,450,1000,150);
>
> >   textsize = 12;
> >   // set up fonts
> >   PFont font;
> >   font = createFont("ArialMT-48.vlw", textsize);
> >   textFont(font);
> >   textSize(textsize);
>
> >   fill(255);
>
> >    //converts double to float
> >   latiFl = (float)lati;
> >   longiFl = (float)longi;
>
> >   //map value to screen
> >   latiMap = map(latiFl, -90, 90, 0, width);
> >   longiMap = map(longiFl, -180, 180, 0, height);
>
> >   // and draw the text of the last tweet
>
> >   text(tweetText, 20, 520);
> >   // adn its lat and long
> >   text("lat = " + lati + " long = " + longi,20,560);
>
> >   text("number of tweets:" +tweetCount, 880, 580);
>
> >   for( int i = 0; i < 7000; i++){
> >     fill(255);
> >     ellipse(latiMap, longiMap, 5,5);
> >    /* fill(0);
> >     rect(0,500,1000,100);
> >     */
> >   }
>
> > }
>
> > // called by twitter stream whenever a new tweet comes in
> > void tweet(Status tweet) {
> >   // print a message to the console just for giggles if you like
> >   // println("got tweet " + tweet.id());
>
> >   // store the latest tweet text
> >   tweetText = tweet.text();
> >   tweetGeo = tweet.geo();
>
> >   lati = tweetGeo.latitude();
> >  longi = tweetGeo.longitude();
>
> >   println("lat = " + lati + " long = " + longi);
> >   // bump our tweet count by one
> >   tweets += 1;
>
> >   println("number of tweets:" +tweetCount);
> >   tweetCount++;
>
> > }
>
> > thanks for looking

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk


[twitter-dev] Re: help me plz quiry speed and geocode

2010-11-28 Thread danetroup
how do you get tweets from all over? I thought they were limited to up
to 1000 mile radius?

can you give a summary of your goal. It seems like doing it real time
would be impossible (if you want to capture every tweet around the
world)

I am working on a geo mashup with tweets and google maps using Flash.
It is working ok but the limitations are the 100 cap on results and
the radius cap of 100 miles.

it sounds like you must be hitting the rate limitation on the API. im
not sure what it is on the authenticated status filter. did you try
the search API?

On Nov 27, 6:34 pm, disc31  wrote:
> I am a uni student, I am very new to the twitter api, i have been
> making an aplication in "Processing" to show tweets coming up on a
> world map in real time. im not trying to get the post its the geocodes
> i want, with lots of help from people here and on the processing
> forums i have made it so that it plotts the geocode in my application
> as a dot and this will represent twitter posts from all around the
> world.
>
> link to a picture of my app to give you an idea:
>
> http://yfrog.com/b7worldstarmapj
>
> here is the quiry i am using:
>
> search.twitter.com/1/statuses/filter.json?
> location=-168.75,9.79,158.90,83.02
>
> The problem i am getting is that i am getting a twitter post about
> every 30 seconds with this and after about 5/10 posts it stops feeding
> me the posts and wont let me connect for about another hour.
>
> OVER VIEW OF WHAT I WANT TO ACHIEVE
>
> - geocode of posts from all around the would not just one place
> - i dont need what they have posted but if i get it then its a bonus
> - i need to be able to recieve this information at a reasonable speed
> (i dont know if im allowed because of the quiry limit)
> - any sugestions of different quirys or code are VERY WELCOME
>
> here is my processing code is anyone is interested:
>
> import com.twitter.processing.*;
> //
>
> // test tweet counting (not sure if it will work)
> int tweetCount;
> // this stores how many tweets we've gotten
> int tweets = 0;
> // and this stores the text of the last tweet
> String tweetText = "";
> Geo tweetGeo;
>
> double lati, longi;
> float latiFl, longiFl,latiMap, longiMap;
>
> int textsize;
>
> void setup() {
>   size(1000,600);
>     background(0);
>
>   // set up twitter stream object
>   TweetStream s = new TweetStream(this, "search.twitter.com", 80,
>   "1/statuses/filter.json?location=-168.75,9.79,158.90,83.02",
>   "Usser", "PASSWORD");
>   s.go();
>   smooth();
>
> }
>
> void draw() {
>
>    fill(0);
>   rect(0,450,1000,150);
>
>   textsize = 12;
>   // set up fonts
>   PFont font;
>   font = createFont("ArialMT-48.vlw", textsize);
>   textFont(font);
>   textSize(textsize);
>
>   fill(255);
>
>    //converts double to float
>   latiFl = (float)lati;
>   longiFl = (float)longi;
>
>   //map value to screen
>   latiMap = map(latiFl, -90, 90, 0, width);
>   longiMap = map(longiFl, -180, 180, 0, height);
>
>   // and draw the text of the last tweet
>
>   text(tweetText, 20, 520);
>   // adn its lat and long
>   text("lat = " + lati + " long = " + longi,20,560);
>
>   text("number of tweets:" +tweetCount, 880, 580);
>
>   for( int i = 0; i < 7000; i++){
>     fill(255);
>     ellipse(latiMap, longiMap, 5,5);
>    /* fill(0);
>     rect(0,500,1000,100);
>     */
>   }
>
> }
>
> // called by twitter stream whenever a new tweet comes in
> void tweet(Status tweet) {
>   // print a message to the console just for giggles if you like
>   // println("got tweet " + tweet.id());
>
>   // store the latest tweet text
>   tweetText = tweet.text();
>   tweetGeo = tweet.geo();
>
>   lati = tweetGeo.latitude();
>  longi = tweetGeo.longitude();
>
>   println("lat = " + lati + " long = " + longi);
>   // bump our tweet count by one
>   tweets += 1;
>
>   println("number of tweets:" +tweetCount);
>   tweetCount++;
>
> }
>
> thanks for looking

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk