Human Capital Management Blogs by SAP
Get insider info on HCM solutions for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
yogananda
Product and Topic Expert
Product and Topic Expert

Previous Article

In this article, you can make interactive maps with folium and pandas library using SAP Commission API's to find out heatmap of Payments been generated in different location


Sample Code

 

def index():
    start_coords = [48.218871184761596, 11.624819877497147]
    folium_map = folium.Map(location=start_coords,tiles = "Stamen Terrain", zoom_start=15)
   
    #tiles='OpenStreetMap' , tiles='Stamen Toner' , tiles='Cartodb dark_matter'

    tooltip = "Click Here For More Info"

    marker = folium.Marker(
    location=[48.218871184761596, 11.624819877497147],
    popup="<stong>Allianz Arena</stong>",
    tooltip=tooltip)
    marker.add_to(folium_map)
   
    return folium_map._repr_html_()

 

How to make Geospatial map (Geographic location) ?


Folium provides a python interface for leaflet.js. Leaflet.js is a Javascript library for interactive maps and can be useful to know on its own. The benefit of using this library via Folium is that Folium makes it very easy to use

Python libraries


In participant workspace, you can find out location and country info for each Sales rep we have captured to imagine in the map how the business is going..


Let's find out an example how to find latitude and longtitude with manual input ..

But in the real world , you can automate using Participant API along joining with Payments API to get each sales rep the location and country as shown in above screenshot.



Using the final SAP Commissions API's (Payments & Participant API endpoint), we acheived the final solution to find out the productivity of business happening around the location. 

Final look at a map below where we can see all the payments are coming from and how much of the sales rep are surrounded to the location making impact on business revenues can be fully visualized and Sales Directors of the orginazation can plan very well to add more sales rep to different locations can be thought through..

Developers Motivation

Get inspired watching movie on how map evolved.