-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate PokeMob detection from HashPokemonGo #32
Comments
Same as in other comment ;) |
Hey, since the pokemobs are quite rare, could you provide us with a sample JSON object which we would get in case a mob happens? |
Sure! The clusters basically look like this: {
"tweets": [{
"id": "some_tweet_id",
"text": "I got a pikachu",
"coordinates": [longitude, latitude],
"timestamp": 1473599493
},{
"id": "another_tweet_id",
"text": "i also got a pikachu!",
"coordinates": [longitude, latitude],
"timestamp": 1473599499
}],
"coordinates": [longitude, latitude], // this is a weighted moving average of the tweets in the cluster
"timestamp": 1473599499, // timestamp of last tweet in cluster
"isMob": true,
"clusterId": 1
} |
Hey, updating this a bit: the API has now changed, instead of opening a socket to This code illustrates how you connect to the server: var socket = io('http://localhost:3000/mobs');
socket.on("connect", function () {
console.log("Connected to server, sending geo settings..");
socket.emit("settings", {mode: "geo", lat: 1, lon:1, radius: 5000000});
});
// or:
/*socket.on('connect', function () {
console.log("Connected to server, sending settings for listening to all clusters..");
socket.emit("settings", {mode: "all"});
});*/ The returned JSON basically looks the same though. @farisca Is anyone from your team working on this? If you don't have the time, then maybe we could do a PR adding this functionality, however we would need some pointers as to where to start with integrating this. |
@phdowling Can a mob always be linked to a single Pokemon? For example, in your JSON example both tweets are about Pikachu. If that's always the case would you be able to include the pokemonId in the mob object?
|
Actually, we don't group by any tweet content, only geolocation and number of users tweeting. Basically, we got about zero mobs on most given days as it is, limiting this further to only considering clusters would not be very useful as far as we can see. |
I don't want you to limit your results further but ask you to add some more context to your cluster object. For our project it would be nice to display a mob together with some additional information like the Pokemon(s) which "caused" that mob. So I'm thinking about something like this.
|
Regarding |
Meters On Sep 14, 2016 9:29 PM, "Faris Cakaric" [email protected] wrote:
|
Hey guys,
We wrote a PokeMob detection module. We listen for tweets with location tags, and if we detect a spike in locality, we trigger an event via a websocket. How difficult would this be for you guys to integrate?
The API is basically just the following: You open a websocket conenction to
/mobs/geo/all
(or/mobs/geo/:lat/:lon/:radius
for location-based queries, though those will be even more rare), and every now and then, though very rarely, you will receive a JSON object with detected mobs. The goal would then be to display this live in the users map.What are your thoughts?
The text was updated successfully, but these errors were encountered: