I made my own Tweet Geolocalizer filter from the search API

twitter4j
java

#1

Hey everyone,

Noob post here,

(Scroll down to geolocalisation)
https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators

An issue I ran into, is that because metro areas are not shaped like a circle in order to get all the Tweets from within these boundaries (and if you need to be precise e.g presenting profile location data in your app) you have to set the radius slightly larger than what you need and then filter down some of the Tweets that are not within the metro bounds.

So here is my experimental code that I wrote using New York City as an example, check it out!
In a nutshell, it looks for geotagged tweets within boundaries of the exact land masses of the city (about 1-2% of the returned search results), if this is not present it then matches strings from the user profile from a list of neighborhoods and boroughs.


#2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.