Welcome to Quake visualizer

Team : Jillian Aurisano, Rohan Dargad, Guan Wang

    Quake visualizer is an interactive program that displays information about the half-million earthquakes that have been measured over the past 37 years around the globe. The gathered quake data is from
US Geological Survey's Global Earthquake Search site at http://earthquake.usgs.gov/earthquakes/eqarchives/epic/epic_global.phpEach quake has a recorded magnitude, measured in the Richter Scale, which attempts to quantify the amount of energy released by the quake. The data also gives us the depth of each quake and their geographical location as well as the date and time that they occurred.

Source Code : Link (To run the source code you will need to have the controlP5 library unzipped in your libraries folder in processing sketch folder)

  1. The timeline Slider : 
    1. The time slider allows you to look at quakes along a particular range.
    2.  Also it includes a play/pause button. When you hit play, the Earthquake animation starts i.e. The slider glides along the time range showing quakes every month over the time range.
    3. Without the play button, you can still bunch the two vertical bars on the slider together to view every month individually on the map.
  2. Map View buttons : 
    1. You can change the view of the world map by toggling between Hybrid view, aerial view, road view by using the corresponding button on the lower right of the screen.
  3. Filter buttons : 
    1. Magnitude filter : located on the lower right, you can use these check boxes to display earthquakes over any given range of magnitudes.
    2. Depth filter: located above the magnitude filters, you can use these check boxes to display earthquakes over any given range of depth.
    3. Time filter : located above the depth filter, you can use these check boxes to display earthquakes over any given time of day.
  4. Plot buttons :
    1. These buttons are located on the lower left of the screen below the stack plot. You can toggle between these buttons to change the color scheme of the world map as well as the criteria for the stack plot.
  5. Map mode buttons : 
    1. You can switch between All, Major quakes and Cities mode. The All mode will show you quakes all over the world. The Major Quakes mode shows you major earth quakes and the earth quakes around the world a day before and after that major earthquake. The city mode button will show the world map. You can now start typing city names to get them visible on the map. Pressing enter on a typed name will zoom the map to that city and show earthquakes around that city.
  6. The Zoom and Pan buttons
    1. Generic navigation buttons to allow you to zoom in, zoom out, and panning about the map. 

  1. All EarthQuakes Mode :  
    1. In this mode, the tool shows all the quakes that have occurred over the 37 year time period. You can filter the Earthquakes on the map by using the check boxes for Magnitude, depth and time of day on the right of the screen.
    2. You can also vary the time range you want to look between by moving the sliders on the top of the screen.
    3. The tool also plays back time if you press on the play button. It will move through each month and show the corresponding quakes on the World map.
    4. Changing the time range or the Depth, Magnitude and Time filters will also alter the corresponding stack plots at the bottom left of the screen.
    5. Hovering over a random quakes gives you information (depth, magnitude, latitude, longitude) about the quake in the textArea on the upper left box.
    6. The three plot buttons (time plot, magnitude plot and depth plot) on the lower left side, when pressed also change the color scheme of the quakes visible on the map. This allows us to look at the same plot from a different perspective.
  2. Major Quakes mode : 
    1. In this mode, you get a list of 10 major quakes in the past 37 years to chose from. These quakes were selected from the database itself.
    2. When you select a Major quake the world map shows all the quakes in the world that took place a day before till a day after the major quake. This helps us in looking at possible aftershocks and how far they could have spread. 
    3. For the Major Earthquake mode, you can change the color scheme of the quakes by pressing the plot buttons on the lower left of the screen.
    4. The major quake itself is drawn larger so as to distinguish it from the other quakes.
    5. Also a transparent radius is drawn around the Major earthquake.
    6. Also the textArea on the upper left, shows you details about the major earthquake (magnitude, depth, day, month and casualties for that quake).
  3. Cities Mode : 
    1. For the cities mode, we have intuitive displays of a list of 95 major cities (the cities). When this mode is activated, the map will show the geology locations of cities on the map. User can type the city name in particular interests. While typing, irrelevant cities will disappear. Only the cities with the name prefix matches typed characters will remain on the map.
    2. When there is only one city on the map, then even if you have typed an incomplete word, pressing enter will zoom into that particular city. At the same time the map will draw earthquakes around that city.
    3. When finish exploring, user can use backspace to erase characters typed. When all of them are cleared and enter is pressed, the map will return a whole world zoom level.
    4. For this mode also you can change the color scheme to get quakes according to depth , magnitude or time.

  4. The StackPlot :
    1. The stack plot on the lower left of the screen has 3 possible view. You can view frequency of quakes over time vs depth, frequency of quakes vs time of day,  frequency of quakes vs magnitude
    2. You can hide and expand this plot.
    3. The plot accounts for changes in the time range under consideration (but only in All earthquakes mode).
    4. The plot also changes accordingly when you change the filtering with the set of check boxes on the right side of the screen. 
  5. The Comparison Chart : 
    1. This chart is hidden by default. Its located on the upper right side. pressing on compare will will pop out a comparison chart. This chart compares Earthquakes of different magnitudes on the basis of different criteria like Energy released, Fault Dimensions and their annual frequency. The horizontal line shows fault dimension, and the two vertical lines show Energy on the left and frequency on the right. The energy axis show the powers of 2 that need to be multiplied to 15 tons of TNT to have corresponding energy to an earthquake. The frequency axis shows powers of 10. So frequency of *+ mag quake is 10 power 0 which is approximately 1.


Implementation/Design Decisions :
  1. Data Management : 
Data management was critical in this project, due to the large number of quakes to consider for display.  To optimize speed of the application, quakes were stored in a multi-dimensional array upon loading the program, and then indexed in a unique data structure designed for this visualization problem.  Every quake index was then stored in a location in a 2D array based on the quake's latitude and longitude.  Latitudes and longitudes were thus clustered together and grouped into an array list at each latitude and longitude cluster.   The number of quakes in a cluster drawn at a given time depended on the degree of zoom in the map.  The further the zoom, the fewer quakes in a cluster are drawn, since all quakes in a cluster cannot be seen by the viewer at this distance.  As the user zooms into the map, more quakes in a cluster are drawn.  Application performance is maximized by limiting the range of cluster locations iterated over in each draw cycle, according to the maximum and minimum latitudes and longitudes on screen.  Further, quakes indices are stored in the array list at each cluster in magnitude sorted order.  Since there are fewer earthquakes of large magnitude, this means that speed is not compromised as magnitude categories are eliminated. A visual representation of the quake data storage approach is below:

  •  Also cities for city mode were collected from the web. What we decided to go with all the cities in the world with population of 2million or more. Initially decided to go with quake prone cities. But, a search on the web revealed that the cities listed were usually ones that were most likely to sustain most damage rather than most earthquake prone
  • For the Major earthquakes we fed the data to a database, and figured out the most deadly earthquakes in the past 37 years.  We picked the top 10 and then consulted the http://earthquake.usgs.gov/ website to get magnitude 8+ quakes and found some more information about our 10 Major earthquakes.\
  • We had initially planned to use a database. The data was loaded into an SQlite database and it was connected to our processing sketch. However, the performance was really slow. So then we tried indexing the database. However, the performance was still not upto our expectation. So decided to drop the database due to speed concerns.

   2. User interface : 
  • Decided to provide users with an option to browse the quakes over time. Hence provided the time slider. the multiple movement bars helped us in selecting a range as well playing from one point to another.
  • Decided to add check boxes for depth, magnitude and time filters. This helped us viewing earth quakes on the map with varying criteria in all the different modes.
  • The color schemes for depth, magnitude and time of day was chosen by consulting the http://colorbrewer2.org/ website which provided us with a good range of colorblind safe color schemes.
            As seen below the color schemes are completely color blind safe.

  • Also due to the large number of quakes plotted, we decided not to use size as a way to show higher magnitude quakes. We though different colors would be a more efficient way.
  • The  Comparison chart was an unconventional representation. But, one that we felt adequately conveyed the differences between different magnitude earthquakes on the basis of their fault dimensions, energy released and frequency every year all in a single visual.
  • The wide range of options, provides users with numerous possible view, like viewing all the quakes with magnitude greater than 6 but depth more 300km or viewing the quakes at depth below 70 that happened in the morning.
  • The stack plot smoothly switches between magnitude, depth and time of day modes.
  • A small textbox on the upper right gives you the depth, magnitude and also the location of a quake when you hover over it.
  • In the major earthquake mode, the textbox on the top gives information about that quake like day and month it occurred, magnitude, depth as well as the casualties.

  • IN the city mode, the user needs start typing letters, cities with matching names will pop up on the screen. When there is one city on the map the user can press enter to zoom to that city and view earthquakes around it.
    Above example shows cities starting with J.

Trends :


·         Are Earthquakes on a increase?

A look at the stackplot for magnitude might indicate a steady increase in earthquakes. However, that is not true. Further investigation via web revealed that measuring points have increased in number and have become more senstitive and precise allowing the detection very low magnitude earthquakes.

Infact, in the magnitude mode if you remove out earthquakes from 0 to 5 then the frequency of major quakes have remained constant  over the entire time period. This shows that the increase is only because of better  and more widespread detection

  •   Are Earthquakes on a decline in recent years?

No. The steep decline in magnitude stackplot in recent years is because the lower magnitudeearthquakes are not being documented in the database anymore. (Refer figures above)

  • Do bigger Earthquakes cause aftershocks in form of lower magnitude quakes?

Yes. The major earthquake mode shows 10 major quakes and other earthquakes a day before and after that major event. A large concentration around the major quake does suggest that it resulted in subsequent quakes. For example the Earthquake in Sumatra in 2004 caused aftershocks till upto Alaska as is visible on the map below.

  • Do earthquakes happen during particular time of day?
No. A simple look at the stack plot for frequency vs time of day clearly shows the equal distribution across all three parts(Early morning, afternoon, night) of the day.

  •  Is there a relation between the depth of an earthquake and its location?

A look at all the earthquakes in depth helps with this question. Most of the earthquakes are between the depth 0 to 70km. However, there are a few between 70 to 300km and very few between 300 and 700 km. But when you remove the quakes that at a depth less than 70 and magnitude less than 5 then the remaining quakes on the map reveal a interesting pattern. most of the larger quakes at higher depths are located along 3 major locations - coast of japan, region near Indonesia and the west coast of south america. Since most of the major quakes with high depths are located in these regions, it indicates there heavy plate activity in the earths crust in these regions. A look at different view with different filters also augment this hypothesis. These regions are easily the most earthquake prone.

To summarize, areas with heavy tectonic activity are generally the ones with deeper Earthquakes. 
  • Are earthquakes more prominent along certain regions of the world?
Yes. These are the regions where there is heavy tectonic activity in the Earth's crust. They are also called Fault lines. (Refer figure above)

Work Distribution : 


 Major contribution

 Minor Contribution

 Discussion - overall look



Drawing  Initial sketches on paper


 Jillian, Guan

 Research on Earthquakes



 Making the filter checkboxes



 Making the timeline slider



 making th stackplot



 Data parser to streamline data



 Initial use of SQLite database. 

 Rohan (Connection succesful but speed to slow)


 Gathering and cleaning raw data set



 Gathering data file for cities, and extra info on major quakes



 functions for plotting quakes in different modes 



 Control buttons for changing map view



 Control buttons for changing color scheme and switching between stackplots

 Rohan (the buttons), Jillian (the functions)


 Control buttons for changing Map mode



 The Comparison Chart



 Textboxes that show earthquake info

 Jillian, Rohan


 Plotting cities in City mode



text filling function to get cities on map as you type



 plotting quakes in city mode



 Last minute bug fixes


 Guan, Rohan



Credits : 

1. The controlP5 library was used for many of the buttons.

2. modest_maps library was used for world maps

3. United states Geological survey website was used for all earthquake data as well as major earthquake info. It was          also used to learn general information of Earthquakes

Week 3:
Work done: 
- Meeting almost every weekday. 
- Database solution considered to slow even after indexing on the database. Decided to drop the database. (Rohan)
- new data parser created to optimize data extraction from the original large dataset as it decided to load it into an array. (Jillian)
- stack plot working. still needs a bit of tweaking. (Jillian)
- showing cities as you start typing done. plotting cities done too. (Guan)
- power chart to put the data into context done. Minimizing the chart done. (Rohan)
- All design decisions finalised. (All)
Week 2:
Work done: 
- Met up couple more times. Major design decisions regarding controls for altering the global map resolved. The year slider, the magnitude range buttons done.(Jillian)
-The database created using SQlite. The database is connected. Individual points can be plotted (Rohan)
- The automatic text filling function for cities created.(Wang)
- Brainstormed different possible graphs that can be used. Made final decisions on some of them. Decided on using stack charts in general.(All - brainstorming)
- Included the depth slider in the map view. (All - Brainstorming)

Sketches :

    Still Discussing
- Some kind of representation to show relative powers of different           magnitude earth quakes.
- Inclusion of another slider that shows every month selected on the year slider in detail.
- Other charts that reveal additional patterns or information about earthquakes in general.

Week 1:

Work done: 
- We met twice this week, put up the website, and discussed project
- For week one we decided to work on the basic map view and controls for the map, as well as get the data base connected.
- We decided to use the SQL library and mySQL database.  We decided on the controls to use to manipulate the map and made some sketches of the                 map view.
- We also talked about how to implements particular features, such as searching cities and showing earthquakes in 100km zone.

Jillian:  plan to implement buttons, controls and slider bar. 
                    Research different graphical representation for week 2

                Wang:   Research different graphical representation for week 2
                                Creating tabs for different views

Rohan:  Work on integrating the mySQL database using the  SQL                                                library for processing. Start plotting some points.
Research different graphical representation for week 2