Skip to content

Instantly share code, notes, and snippets.

@davidpiesse davidpiesse/
Last active Jan 31, 2018

What would you like to do?
Earthquake Stream Connection - Pusher

To connect to Earthquake Streams data feed you need to use a pusher library such as

Live Demo Code @

Required Keys

To connect you need

  • Pusher Key: cb8e92ce5edfd617ee0a
  • Pusher Cluster: mt1
  • Event Name: earthquake
  • Channels [all]


Currently there is only the one channel all but other will be available soon

There are 6 channels:

  • all
  • minor
  • light
  • strong
  • significant
  • tsunami
  • All data is fired to a earthquake event
  • All earthquake alerts are sent to the all channel
  • Significant earthquakes are sent to the significant channel
  • Earthquakes that may create a tsunami are sent to the tsunami channel
  • The other three channels, minor, light, and strong are based on magnitudes <2.5, <4.5, and >4.5 respectivily


Below is a code snippet to connect in JavaScript

Include this in the <head>

<script src=""></script>

Setup Pusher

var pusher = new Pusher('cb8e92ce5edfd617ee0a', {
  cluster: 'mt1'

Connect to a specific channel

var channel = pusher.subscribe('all');

Listen for an earthquake

channel.bind('earthquake', function(data) {

This comment has been minimized.

Copy link

commented Aug 23, 2017

I can not see any data on the site. I see a never-ending spinner with text 'Awaiting New Earthquake Detection' - it is not clear if this is the intended view for 'no earthquakes right now' or if the site is broken. Also I can not find the issue tracker here on github so I can not report, that is why I am writing here.


This comment has been minimized.

Copy link
Owner Author

commented Jan 31, 2018

Hi @wowcut - Earthquake Stream has been in hibernation and has only just been restarted. Should be working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.