SAP Lumira – How to extend Lumira with Location Analytics and your own geodata
This part 2 explains how to build custom maps in SAP Lumira using Galigeo free extension for Lumira Desktop.
It follows the part 1 that explains the main concepts to add custom geodata and geomaps in Lumira.
You can find it here.
Let’s say that I have crime statistics for New York City per year and geographic sectors, called precincts.
The geographic NYC precincts come from the NYC OpenData website.
The geodata have to be in geoJSON format and in standard WGS84 coordinate system (lat/long).
If your geodata is in the common shapefile format, you can use the following tool to convert it in GeoJSON.
Our goal is to be able to build a map of #crime by precinct, using the above specific geodata.
First of all, you must have already installed the Galigeo geomap extension for Lumira which you can find here.
Follow the installation instruction to install it in a couple of minutes.
The extension comes with a standard catalog of geodata, such as States, counties, zipcode samples.
The standard catalog, obviously, doesn’t contain the NYC precincts.
So let’s see how to enrich it with our custom geodata.
1. Copy the GeoJSON file into the directory:
2. Edit the catalog
For SapLumira 1.25, open the file located here:
The file contains sections describing the metadata for each layer.
- country: Country or area that will appear in the catalog
- label: Name of the custom layer that will appear in the map
- field: Field of the geoJSON file to match with the Lumira geographic dimension
- url: URL to the geojson file. $layers is replaced by the default layers directory.
- keywords: Name of the dimension to match with the geodata field
- geometryType: ‘point’ or ‘polygon’ according to the type of geometry
- description: A description that will appear in the catalog
Copy/paste one section and modify it according to your data
In our example, we put:
“country”: “USA, NYC”,
“description”:”NYPD precinct area by code. For example 1,2,3,..100…”,
3. We recommend to test your JSON syntax
To make sure the catalog.json you are working on is valid after your changes, go to this tool, and copy/paste the entire content of your file.
We are fully aware that editing JSON can be painful and our next version will offer a killer new feature to skip this step;)
4. Save and close the catalog
5. (Re)start Lumira
Choose Galigeo map extension and check the online help.
Go to the section “Available Geographic Layers”.
Check that your new layer is in the catalog.
Then add the Lumira geographic dimension in the GeoLayers box and a measure in the indicators box to get your location analytics with your own geodata.
Here, you can see the number of Robberies per precinct in 2014 displayed as a choropleth map through a quantile classification.
Thank you for reading and I look forward to your feedback, questions, or ideas to improve your UX and build better products.
Indeed editing the catalog may seem "geeky" on the surface, but it's not that hard once you gave it a try. And for convenience, if you know that you'll never use some pre-existing data, you can remove them from the catalog and only let you own entries. That will be a lot easier to manage. Note that you could also firstly copy the catalog.json and rename it catalog.json.original in order to keep track of original data before removing the entries you do not want.
Great article anyway 🙂 , really educational and easy to understand.
Thanks for your complement Vincent!
Love how Galigeo is extending Lumira's geospatial functionality!
Thank you Ty for your comment and support!
Working hard to get our extension supported on Lumira Server, with the help of SAP teams.
First of all, great add-on for Lumira and a great blog post. I have played around with it and use another dataset (vehicle collisons in NYC) together with a zip code map. I get the data displayed perfectly but I have one question. I don't see any 'base' map where the data is plotted on. Is this something which needs to be inside the map definition or am I missing a feature? I would love to see the same background as in your example!
Thanks for your reply!
With kind regards,
Martijn van Foeken
If you empty both Indicators and Geolayers fields, do you see the basemap ?
The basemap requires an access to Internet in order to work.
If you are connected to Internet, are you behind a proxy ?
Thanks for your swift response! When I empty the Indicators and the Geolayer fields i get the following displayed:
If I use the standard map visualization of Lumira I do get a map displayed. I'm not behand any proxy as far as I know.
With kind regards,
I had once a problem with Lumira "proxy-handling", which prevented the extension to connect to the Internet.
If you are not behind a proxy, in Lumira, try to go to File > Preferences then click on the Network tab.
Check what is used for config.
If it's "Use System Proxy Settings", select "No proxy" instead.
Then relaunch Lumira and tell me.
This is the resolution! Now that you mentioned it, I have experienced this earlier with Lumira as well. I switched it to 'No proxy' and it's working!
Thanks for your support and I'm looking forward to see the next release!
With kind regards,
No problem 🙂 , do not hesitate to post feedbacks or issues on the extension if you have some more.
Thanks for your valuable support Vincent!
Awesome article dude. It was so much simple to follow it that even as a newbie I could make it work with Indian zonal (East, West, North, South) and States data (India has some 35 states and each zone contains a few states). However, I have a few points
1) It does not let me create a geographical hierarchy and refuses to take East, West, South and North as GIS values, even though when I use it without hierarchy it displays exactly as intended i.e nicely splits the country into 4 regions.
2) I cant view it on cloud as it tells that ID "galigeo.viz.ext.map" is missing.
Could you help please.
Glad to hear that you found it easy to add your own geodata to the Galigeo Extension. This is what we tried to achieve so far.
Also, thanks for your feedbacks.
For the first question, I don't get precisely what you are trying to achieve. Are you trying to create a hierarchy between two layers (regions and subregions for example), each being cut into 4 pieces (North, West, ...) or to create a hierarchy between North, West, ... layers ?
For the second question, the extension is sadly not available yet on Lumira Cloud (I guess you are talking about Lumira For HANA as the product name is about to change). It only works with Lumira Desktop for now.
Thanks Vincent for the prompt reply. Bu first question, I think I did not explain it properly. What I have done is that I added two .json files in layers, one for zones and other for states. I am able to build charts using both of them individually, which basically means that I got them right.
However, my end goal is to create a hierarchy so that I start with 4 zones and then should be able to drill down to states. This is where it fails. It somehow uses Lumira standard terns for hierarchy. For example: In my scenario, Region should be Zone and Sub-Region should be State, but it does not even allow me to put Zone as Region value.
Trying to reproduce what you are trying to achieve this is what I end up with :
I guess you don't need to create a Geographical Hierarchy in order to make it work.
Still, with the current version of Galigeo for Lumira you have you won't be able to emulate "drill down" as no matter if you create a hierarchy or not, all layers from the hierarchy will be displayed at the same time.
What could really interest you is that we are about to realease a new version of Galigeo For Lumira which embeds "Smart Drill Down" feature, meaning it will automatically detect if the layers you put are hierarchical (no matter if they are from a hierarchy or not) and activate drill down/up tools on the map. So you won't have to create a hierarchy at all, you'll just keep the way you input your layers for the moment, and you'll be able to drill on them.
Vincent, thanks for your efforts. I tried that and like you said, it does not give the drill down functionionality which is important to us.
This is why you have to stay tuned for the Next Galigeo for Lumira release because it will fit your drill down needs without any configuration 🙂 .
Hi Bala. We've just release a new version of Galigeo for Lumira, which embeds drill down features out of the box.
I've just wrote an article about it, you can find every needed details there : Easily Drill Down into Your Geodata with Galigeo for Lumira
Awesome. Will try that out.
We are working with Galigeo to make their extensions available on Lumira Server for BI Platform and Lumira Server for Teams soon.
Awesome news. Will this apply to any extensions? We are a customer, not a partner, but would like to make our in-house extensions also usable on LS4BIP.
Yes, any extension.
Hi Ty. Is making the extension available for Lumira Cloud also on the roadmap? If so, any idea of timeline we're looking at?
No, we are not planning to support extensions on Lumira Cloud. We have a larger cloud strategy that we are working on that we will be able to communicate soon.
Great article, really useful!
I thought it would be much more complicated when in fact it was done in less than 20 minutes. Big thanks!
Thanks for the tutorial. Are you able to customize the values ranges or is everything default?
The value ranges are not customizable for the moment, but this is something which is planned in the product roadmap.
In details, the 4 (or less if there is less than 4 different values) ranges are calculated using a quantile classification, each range has the same amount of values in it. Note that the calculus can be slighlty modified if there is a value way bigger than all the other one, only to avoid ranges like [0,1], [1,3[, [3,5[, [5, 7800]. In this particular case 7800 will be alone in a range.
Can I edit the code directly using the extension SDK? Would I be able to easily customize the variables directly in the code or would it be a lot of effort in order to make it happen?
Thank you for your interest. The only people who can edit the SDK extension are Galigeo developers 😉
As we are totally convinced that customer's needs/feedback is the most important source of inputs to improve our product, we can discuss this point specifically and give your more insight on when this feature would be available (among others, and prioritize if necessary). As Vincent said, this is already in the roadmap, but we also understand that you would expect more commitment. I will contact you directly.