I am playing around with the Twitter Streaming API and have got my head around it at a basic level, but I can't seem to get reliable results for the location - I'm using a bounding box as specificed in the docs, the location I want to track is Glasgow but I am getting results from all over the world.
My bounding box is $locations = '55.67,-4.66,56.17,-3.892540';
Does anyone know how to get the correct bounding box? If these are correct, then is there another explanation for what might be happening? Thanks!
You have it in latlon, twitter wants it lonlat. IOW, try '-4.66,55.67,-3.98,56.17'. BTW, IME, you'll still get tweets outside of the bounding box but hopefully not from "all over the world". :-)
Related
I need to know in which country (and hopefully some more info, like city or area or state and it would be great if I could get whether this is on land or sea) a coordinates set lies in.
I have tried the wikimapia api but it is extremely difficult to get around to it.
for example I have this call
http://api.wikimapia.org/?function=box&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json
which brings some information about an area in Athens, Greece.
The problem is that not only this api call is depreciated, but when i try to get the country by adding &category=2977
http://api.wikimapia.org/?function=box&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json&category=1176
this doesnt work(the category id i got it from this gist)
I would guess that this might have something to do with the method being depreciated, but when I change to the new method place.getbyarea it is not working at all.
http://api.wikimapia.org/?function=place.getbyarea&key=example&bbox=23.72251,37.96918,23.73094,37.9731&format=json
Any ideas? thanks in advance
Why do you want specifically the API of Wikimapia to get your information? To recover the city and country from GPS coordinates, some others API’s are much more appropriate I think, here some examples:
Google Maps (used here in a webpage)
Here Maps
Bing Maps
Apple Maps (Mapkit.js)
Algolia Places
OpenStreetMap Nominatim
I'm trying do some analysis on locations where people are going during winters. The approach I'm following is get tweets from a specific city (say, New York) and with the keyword Foursquare. Then use foursquare data for that user to see his/her checkins and try to trace a pattern.
So, I'm stuck in the first phase. How do I get those tweets from ONE city and with the keyword FOURSQUARE. I'm not sure if I understood how to use streaming API correctly and the ReST API isn't working (shows NOT AUTHORISED)
Could you tell me a detailed procedure for a rookie to understand the process of doing the above mentioned process. Also, let me know if you have a better approach for analysing trends in check ins.
Thanks
You want to read these:
https://dev.twitter.com/docs/api/1/get/search
https://dev.twitter.com/docs/platform-objects/places
You can give Twitter a latitude/longitude coordinate and a radius, or you can use the "place" field as a filter. Either way, expect to fine-tune this a bit to fit your needs. You also need to take into account that a lot of people might tweet without location services enabled.
If you want to use the REST API, you need to get an API key from twitter.
I'm busy with an app and I use Facebook's Graph API for that. I am trying to search Events with this url: https://graph.facebook.com/search?q=Party&type=event¢er=54,2&distance=100&access_token=%#.
When I load the results, I get some Events, but they're not even close to the given coordinates.
Does anyone know if I am using the right URL or is there a better one?
Thanks,
Jelle
I think center and distance are used for type=place, not for type=event.
I read a few other posts on SO that came close to what I was looking for, but I'm basically looking for a service to provide accurate GeoLocation services that will get you close to a location.
We used one IP based service that plotted us 4 hours away. That's no good. What is the most accurate service outside of the HTML5 GeoLocation API?
You will find both free & paid services for this: http://blog.programmableweb.com/2009/03/31/3-free-ways-to-geolocate-by-ip/
MaxMind is the better known series that works well at the City level.
Funny you should ask. There was a /. article on this subject just a few days ago. Here is an article by Bruce Schneier on it. Very interesting (and disturbing) stuff.
HTML 5, it gives you coordinates Latitude and longitude that you can send to a google map an get the map location.
http://html5demos.com/geo
but works only in newest browsers..
General geocoding is not problem. I can put in a city or stae or what ever specific location and usually geocode correctly using Bing. What I cant do is geocode things like intersections or fuzzy locations. My example is "I25 and Colorado blvd". In the Bing Maps site, this has no problem finding exactly what I am looking for. When I use geocode or the bing maps search nothing is found. Anyone have any clues how I can do something like this?
You could start by adding the state and country name in the query.
Also, I assume you're using VEMap.Find, so you may want to try calling the Locations API directly (especially as Find is no longuer available in the most recent version of the Ajax API):
It might give a more explicit error message to help understand why it doesn't return a position.