Skip to Content

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:

C:\Users\[username]\.sapvi\extensions\bundles\galigeo\viz\ext\map\galigeo_viz_ext_map-src\map\layers\


2. Edit the catalog

For SapLumira 1.25, open the file located here:

C:\Users\[username]\.sapvi\extensions\bundles\galigeo\viz\ext\map\galigeo_viz_ext_map-src\map\layers\catalog.json


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”,

            “label”:”NYC precincts”,

            “field”:”precinct”,

            “url”:”$layers/precinct.geojson”,

            “keywords”:[“Precinct”],

            “geometryType”:”polygon”,

            “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 sectionAvailable 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.

    Sébastien

    To report this post you need to login first.

    29 Comments

    You must be Logged on to comment or reply to a post.

    1. Vincent Dechandon

      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.

      (0) 
    2. M. van Foeken

      Hi Sébastien,

      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!

      lumira_galigeo.PNG

      Thanks for your reply!

      With kind regards,

      Martijn van Foeken

      (0) 
      1. Vincent Dechandon

        Hello !

        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 ?

        Br,

        Vincent

        (0) 
        1. M. van Foeken

          Hi Vincent,

          Thanks for your swift response! When I empty the Indicators and the Geolayer fields i get the following displayed:

          lumira_galigeo1.PNG

          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,

          Martijn

          (0) 
          1. Vincent Dechandon

            Ok.

            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.

            (0) 
            1. M. van Foeken

              Hi Vincent,

              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,

              Martijn

              (0) 
    3. Bala D

      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.

      Bala

      (0) 
      1. Vincent Dechandon

        Hi Bala.

        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.

        Br,

        Vincent

        (0) 
        1. Bala D

          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.

          (0) 
          1. Vincent Dechandon

            Trying to reproduce what you are trying to achieve this is what I end up with :

            /wp-content/uploads/2015/07/screenshot_752317.png

            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.

            Br,

            Vincent

            (0) 
            1. Bala D

              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.

              (0) 
              1. Vincent Dechandon

                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 🙂 .

                (0) 
        2. Ty Miller

          We are working with Galigeo to make their extensions available on Lumira Server for BI Platform and Lumira Server for Teams soon.

          (0) 
          1. Mike Howles

            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.

            (0) 
            1. Ty Miller

              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.

              (0) 
      1. Vincent Dechandon

        Hi Hanks.

        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.

        Br,

        Vincent

        (0) 
        1. Hanks Wang

          Thanks Vincent.

          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?

          Thanks,

          Hanks

          (0) 
          1. Olivia Sedant

            Hello Hanks,

            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.

            Olivia

            (0) 

    Leave a Reply