Access to the repository has been given to testing@devpost.com and chirpdevchallenge@twitter.com for review and testing.


The inspiration behind this application, happened a couple of months ago during my holidays. I had planned my movement around the region I was visiting only to realised that there was a day set aside for no movement in this area. A quick look at Twitter feed using the search coordinates shows there was indeed a deep conversation about this topic going on. But it was not easy skimming through different documentation to find out how to get the current discussion for an area I am interested in. I think about if I could spend a good amount of time figuring how to type the search query on the Twitter app, then what is the chances of a non-techie person ever getting to use this feature.

I had taken GIS ideas from flightradar24.com and marinetraffic.com

What it does

TwGIS app allows users to view tweets on map based on the tweets likely geographical origins. The app at its core allows users to draw an area on the map and see all the recent tweets in this area. User can then explore these tweets on the map or chose to explore the tweets on twitter.com.

How we built it

The primary technology used for this app is Javascript, NextJS (React), and Leaflet. Building the app, it was broken down into 3 components. The Search, The Draw, The Events.

The Search - handles making request to Twitter API based on query search term and filtering based on location selected on the map. The Draw - handle drawing poly shapes on the map and getting the coordinates of the area. The Events - since every action on the map; from mouse move, to context-menu, to zooming, to clicking are all listened to, these events had to be handled independently.

Challenges we ran into

The first challenge was realising that Twitter API does offer geo place location result for tweets to Elevated Developer Account. This made the app development less robust. To circumvent the issue algorithms such as point in polygon and point in circle were used to determine where to place tweets on the map within bounding box.

There were other Geospatial problems that arose; such as adding and subtracting miles from latitude and longitude degrees.

Another problem is accounting for tweets in the different worlds of the map.

Accomplishments that I am proud of

I am proud that people who faces similar challenges like me in the past now have an easy to use solution. With this app out there now, anyone can get a quick insight about what people are saying in a small geographical area.

What I learned

Advanced Geospatial problems and solutions. Better understanding of Twitter API.

What's next for TwGIS

Use exact latitude and longitude (geo place) from Twitter API (premium). Allow users save their drawn areas and possibly tweets at that time.

Built With

Share this project: