Around the world today, there are many movements that have united the population in an otherwise stressful period of time. A very popular way of expressing this unity is by using hashtags on twitter. Large groups of people use a certain hashtag to show their support for a particular movement. We wanted to get data on where these movements are taking place by gathering location data on the tweets.

What it does

You can input any hashtag into the program and it'll upload all relevant tweet locations to a MongoDB database. You can then use the frontend graphics program to view the data in a nicely displayed map

How I built it

This Project was built with a combination of the Twitter API and MongoDB. The language of choice was Python since it has two readily available libraries, TweePy and PyMongo. A cluster was set up through MongoDBs AWS servers and was configured to accept collections of tweet information. The tweet-fetching program will leverage the Twitter API to fetch all relevant tweets and upload them to the MongoDB cluster. Finally, the graphics frontend will fetch the tweet data stored in the MongoDB cluster and display it to the user in a nicely laid out map.

Challenges I ran into

  • Getting the Twitter API to find the tweets that we want
  • Parsing the tweet info into a format that MongoDB will accept

Accomplishments that I'm proud of

  • First time leveraging a database in a project
  • First time using the Twitter API

What I learned

  • How data is retrieved and stored in APIs
  • How databases help store data

What's next for Twitter Hashtag Heat Map

The next step for the Hashtag Heat Map is server deployment. We were not able to get a domain and hosting in time for this Hackathon but the project was built with that in mind. The program that searches for the tweets themselves can be hosted server-side and be coded to handle multiple users at once. The graphics frontend can be turned into a website that leverages Google Maps (for more accurate location information) and present the user with a nice and easily accessible interface.

Share this project: