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.
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