USGS Twitter Earthquake Dispatch (@USGSted)

Release Date:

@USGSted (USGS Twitter Earthquake Dispatch) distributes Twitter alerts for earthquakes worldwide with magnitudes of 5.5 and above. When citizens feel shaking activity, they often use the popular social media application, Twitter, to "tweet" what they are experiencing. The @USGSted application, in general terms, searches for tweets that contain the word "earthquake" or certain related terms and stores these messages to a database. From this database, scientists at the National Earthquake Information Center (NEIC) can then produce maps of locations and discern how severe an earthquake event might be as soon as tweets are received. In today's electronic-device society, tweets are received almost instantly after an earthquake begins.

Twitter provides a Java-level interface (twitter4j) to allow applications to request a set of tweets. Using this interface, a Java developer wrote code that accesses the Twitter stream, requests tweets that contain a keyword (for example, "earthquake"), and stores that data in a database. Because earthquakes are a global natural event, the keywords include international terms like "temblor" and "terremoto."

Anyone can track the updates from @USGSted. Follow the USGS tweets on significant earthquake activity (or add your own during an event!) by logging into and searching for “@USGSted.” Or, go directly to and set up an account.

Design Features

  • Extrapolating Geospatial Information: One of the advantages for the science community of retrieving data from Twitter is that each tweet contains a geospatial string of where the tweet came from. For the application design, we used Yahoo PlaceFinder to decode the location string from Twitter to a latitude and longitude. For the scientist, this latitude-longitude data can be plotted on a map to visualize the areas of impact.
  • Managing Peak Thresholds: When a major event occurs, there could be 40–50 tweets per second. This is a high level of data coming in for a short period of time. At these peak event times, the system must focus on storing the incoming tweets. We designed @USGSted so that if the incoming data load is higher than a specified threshold, the decoding of locations into lat/long values is deferred. These values are filled at a later time when the incoming tweet rate is below the threshold.
  • Compensating for Down Time: There are occasions when the Twitter interface is unavailable to the @USGSted application. Since the data is important for the scientific analysis, we created a separate process as part of the @USGSted solution that determines the last tweet received by the system and the current tweet ID issued by Twitter. If there is a discrepancy, this process attempts to recover tweets lost in the interim. By filling in any gaps, the application can provide a more consistent and complete dataset to the scientist.