Skip to Content

Analyzing Global Earthquakes on Lumira with Google Heatmap Extension

In this blog, I wanted to analyze significant earthquakes from 2150 BC to present. Data is downloaded from This dataset is important because of including latitude and longtitude information of earthquakes. Latitude and longtitude information will be used on google maps in order to visualize exact geo location of earthquakes. We will start with cleaning data and end with identifying a fault line.

1. Cleaning Data

Since the data is starting from 2150 BC, it is a little bit dirty. After visually discovering data, it can be clearly seen that, a lot of earthquakes doesn’t have magnitude information. Gray squares at below images shows years with no magnitude information. Since there were no measurement technology in the past, this is normal. The strange part is, there is an earthquake in 1580 with a magnitude of 6.2, I wonder how this earthquake has been measured in 1580.


Anyway, I filtered non-empty magnitudes and got all the earthquakes with a magnitude information. It seems that 2007 was not a good year for world.


2. Heatmap Extension

Next step is to visualize these earthquakes on a map. For this purpose, I developed an extension using Google Maps Javascript API.


Most challenging part of developing this extension is loading Google API into Lumira. Since we cannot modify html document directly, we have to insert js into HTML document via render.js file. This can be achieved either via requirejs or appending script into HTML like below. Important point is Google API js file must be edited as well. For this reason, I am using a modified version of script file, instead of URL.


We end up with a heatmap, that shows most dangereous parts of World in terms of earthquakes.


3. To Move or Not To Move to California

Now we can analyse different parts of world in a more detailed fashion. I wanted to drill down into California. Map dynamically resizes and focuses according to selected region. Below picture shows a very nice snapshot of dangerous parts of California. If you are willing to relocate to CA, you have to think about it twice, at least you can select somewhere far from ocean.


It can bee seen that big earthquakes in California are around a line that is paralel to ocean. I thought there may be a fault line around here and guess what, there is really one and named San Adreas Fault.

/wp-content/uploads/2014/12/san_andreas_fault_map_380_601148.jpgImage Source:

Lumira has already ESRI integration, however having possibility to create your own map extension using different services makes analyzing data very powerful.

Update: VizPacker and Extension Files

Important Note: Extension requires internet connection in order to load Google Maps.

You must be Logged on to comment or reply to a post.
  • Great piece of work - My only concern about all of these is the amazing amount of examples where we have extended Lumira - sounds great but the other side of the coin is just that...

    Look what you can't do with Lumira out the box... there is still SO MUCH that the product needs to do without 3rd parties extending the product. We (SAP) should be doing this ourselves in the out the box product.

    • I agree with you Daniel. Most of the extensions must be provided out of the box.

      I believe, as Lumira developed, more extensions will be part of the product.

  • There's a balance between what should be in Lumira and what should be easily available to Lumira. We are doing two things to achieve this balance:

    1. A marketplace where partner created extensions can be published and then directly downloaded to Lumira from within Lumira like you do with apps on your smart phone
    2. A global repository where optional SAP developed extensions are available for download from within Lumira. Example: DAE for BW. Most SAP BI customers don't have BW in their landscape and they don't need a driver for it so we shouldn't make it a default part of the product
  • With the 1.23 release there seems to be many things that we perhaps should be told BEFORE the product auto-updates. Many extensions have simply stopped working... Now I have a new dialog when saving old LUMS files that they are now saved in a NEW FILE FORMAT...

    that's just pre-school 101 - The Lumira.ini  file get re-written every time and does not keep a copy of the old one - poor design, the file formats chance and we only find out AFTER the product installs, I have virtual machines that I do not want to update but can no longer send LUMS files to customer and prospects as they no longer open in a version that was only installed a month ago.

    We keep telling our customers about the extendibility of Lumira (something my customers tell me is just not ideal as competitors have it in the product out the box) and to cap it all the things they then extend stop working.

    It feels a little underdone - don't get me wrong I do love Lumira but please don't just 'do it' but 'do it right' please.



  • Hi Mustafa,

    I managed to get the extension working (on my copy of Lumira 1.23).

    After trying my own extensions with some headaches with 1.23 I found if I set the parameters I mention in my comment to Julien's Google Maps extension

    SAP Lumira Extension: Google Maps

    Also for both extensions I moved the data definition (fdata slice call in this case) before the require.js call and it was more stable for me changing the data.

    So for your heatmap extension I adapted the code as follows. Not sure how this will show in this Jive editor but here it is......


    var fdata = data.slice()  


    mapDiv = container;

          //load google maps api if it wasnt loaded before.

      //requirejs and async plugin is used in order to load google maps api asynchronously
      //you can check async plugin's developer blog for more information.
       paths: {
       async: '../sap/bi/bundles/sap/viz/ext/googlemapsheatmap/async' //If you are deploying extension for Lumira, aysn.js file must be somewhere  that lumira can access.
       //async: 'C:/LumiraFiles/async' //If you are working with vizPacker, locate your async.js file to location that vizpacker can access.
       function ( ) {

    I'd be interested if changing the parameters and changing the code works for anyone else.




    • Hi Robert,

      I changed parameters as below, and code as you stated, however extension still doesnt work on my pc.



      I have another extension using requirejs, that is also not working.

  • I updated extension to work on Lumira 1.25. Now it is working on 1.25 without any problem on my pc. I hope it works for everybody.

    You can download new version from above links.

  • Mustafa,

    Great example but I cannot get mine working on 1.25 - I point to the ZIP, add it, restart... load the CSV, create visualisation with Mag, Long and Lat - ALL WHITE screen, any ideas?

    Thanks and Regards


  • It gets stranger 🙁 I reinstalled Lumira 1.25 fresh, added the zip, went through all the usual steps... and opened the lums file - amazing the heatmap was there and visible and working... I do anything with Lumira and when I return to the visualisation it's white again.


    I tested Wifi vs Cable, 2 networks, with and without proxy, refresh, recreate, reinstall and now I have to get on with other stuff. Very strange

    Thanks for advice



  • Mustafa,


    Is the extension only for Desktop Lumira?

    Or should it be possible to use opening a Lumira document through LaunchPad?

    Works nicely for me on Desktop but blank white page displaying when opened through launchpad.





  • Hi Mustafa,

    I am using the SAP Lumira designer 2.1 version. I have downloaded the heat map extension but every time I execute it, it displays the message " for development purpose only". Please find attached screenshot.

    Upon extensive research, I found out that you need to insert a Google API key to access the google maps now. However, I inserted a Google API key in the render.js file at the line that says :


    The maps still are showing the same message. PLease please help me out on this.