How to plot tweets by location in real time on to a map e.g. leaflet


I would like to know what would be the best way to plot real-time tweets by their location onto a map application such as leaflet.

At the moment I am getting the tweets by the streaming api(filtered) and storing into a mongodb. I would like to know how I can best achieve this. I'm using python and the flask framework.

So a tweet's information is stored into a DB and plotted in real-time onto the map concurrently.


10/22/2012 6:52:01 PM

Accepted Answer

This repo shows how to use Flask and Mongo with Leaflet

If you can either write a timer loop in your JS page to do an Ajax request at a regular interval or you will need something like WebSockets on the server and the client

7/27/2014 5:49:06 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow