Custom Map Widget

Comments

26 comments

  • Avatar
    Jason Sweezey

    I managed to get my map loaded with a series of neighborhood boundaries across major cities in the U.S.  People can perform searches in our system using a neighborhood as a reference.  We'll aggregate the number of searches per neighborhood daily.  What we'd like to show is how many searches were performed by neighborhood for a given time frame.  I've got that part working so that neighborhoods are highlighted and the tooltip shows the search count.

    But it only shows the neighborhoods that have transactions.  What I'd prefer is to show all neighborhoods then color-code those with transactions (kind of like the example above where all of the counties in New England are in blue but a couple of counties are highlighted in green).  Is there a way to do that without creating a record for each neighborhood in my Elasticube?

     

    Thanks,

    Jason

  • Avatar
    Takashi Binns

    Hi Jason,

    It sounds like this is more of a data modelling exercise than anything else.  Can you try modeling your Elasticube to include a LEFT JOIN between your neighborhoods table and transactions table?  This will ensure all neighborhoods will be shown, regardless of whether or not there is a transaction.  Then you can add conditional coloring in the widget, to differentiate visually.

  • Avatar
    Jason Sweezey

    Thanks Takashi.  Right now I have a table of transactions, with each transaction containing a date, a neighborhood and an ID.  I then use the chart to summarize the number of transactions by neighborhood.  I'm not quite sure where I would insert the LEFT JOIN.  Could you provide a bit more color on what you had in mind?

  • Avatar
    Takashi Binns

    Hi Jason,

    Lets assume your Elasticube has a table [Transactions] and [Neighborhoods], and they are linked off a [neighborhoodId].  You can create a Custom SQL Expression in your Elasticube that looks like this

    SELECT *, COALESCE(t.transactionId,1,0) as [Transaction Count]

    FROM [Neighborhoods] n

         LEFT JOIN [Transactions] t ON t.neighborhoodId = n.Id

    This will create a new result set that has all transactions, but also lists neighborhoods with no transactions.  The new [TransactionCount] column will have a value of 1 for every transaction and 0 when there is no transaction, so your dashboard can just SUM this field.

    Hope this helps!

    -Takashi

  • Avatar
    James Matthiesen (Edited )

    Hello!

    I'm a relatively new user working with the custom map plugin for the first time. Is there any way allow a viewer to dynamically change the value displayed on the map, ex. to switch from "total population" to "average income", in a way similar to the Measure Changer plugin?

    Currently I am using the Measure Changer plugin in other dashboards and I think it adds critical functionality to my dashboards.

    It would be really nice to be able to do the same thing with the map widget. In my experience with map visualizations, particularly exploratory analysis, users are often interested in multiple values, but displaying/creating a map for each value (perhaps through the Tabber) becomes cumbersome as the number of values increase. Does anyone know how to solve this bottleneck?

  • Avatar
    Yoni Lerner

    Hi James,

    There is no option within the plugin, what I will suggest is to create two different widget and "combine" them into one widget using the TABBER widget 

  • Avatar
    Luke Evans

    I'm having a problem converting custom shape files (we have ESRI GIS tools) into geoJSON files for this widget.  Does anyone have a reference guide on how to properly export it for Sisense consumption. 

  • Avatar
    Ramon Lopez

    Hi Luke:

    I've used various internet converters to make this transformation succesfully.  The one thing to look for is ensure that there is only one feature in the file (one layer).  I had some scenarios where i manually cleaned up the file to have one feature. 

    Also make sure that you add the file location to the config and define the Key attribute.

    Let me know if this helps.

    Thanks

  • Avatar
    Brian Wilson (Edited )

    This is a really awesome widget. I've successfully got a 5Digit ZipCode shapefile working!

    It looks like there are a ton of plugins for Leaflet -- Is there any way to get those working? Specifically, I was hoping to insert some pins showing store locations on top of my zip code map or select a different basemap.

  • Avatar
    Sisense License

    I can't get a base map to load for some reason. I am using the public key available from Mapbox API. Here's the configuration file preview:

    prism.customMap = {
    settings: {
    mapboxKey: 'pk.eyJ1Ijoic2FpbWFtb2hzaW4iLCJhIjoiY2o5cXZjNWdrNXpzdTJxbGdlNXp1MTA0NiJ9.QCstTOTyOECsdZ6Sny-jeA',
    urlTemplate: 'https://api.mapbox.com/v4/mapbox.streets/1/0/0@2x.png',
    mapboxId: 'mapbox.streets',
    shapeSeparatorColor: 'white',
    shapeHighlightColor: '#C0C0C0'
    },

  • Avatar
    Vania Charles

    Hello,

    Thank you for this widget. I'm new in Sisense and I want to use this pluggin to create a map. I already create my GeoJSON file and right now I have to modify the config.js. But Where can I find this file?

    Any help will be greatly appreciated. 

    Thanks.

  • Avatar
    Oxana Noa Umansky

    Hi Vania, you can find the file here: C:\Program Files\Sisense\PrismWeb\plugins\customMapWidget\config.js

  • Avatar
    Sam Ovenshine

    @Sisense License

    Were you able to get the default base map for the plugin to load (before making any changes to config.js)?

  • Avatar
    nagdev Amruthnath

    This is a great widget. I was wondering if anyone tried this plugin with floor plans or layout plans? I have posted this question in community.

    https://support.sisense.com/hc/en-us/community/posts/115008356687-Floor-plans-as-custom-map-for-KPI-visualization

     

  • Avatar
    Trevis Thomas

    Has anyone found a way to customize the zoom level or positioning of this widget? I have a basic knowledge of JavaScript but I've been unsuccessful so far, and everything I've found on the internet is in relation to the Scatter Map widget. Any help would be fantastic. Thanks!

  • Avatar
    Todd Nash

    This is a great plugin.  We are however experiencing an issue when filtering on the Canadian Map via the widget.  "No Results" are displayed when selecting a territory because our data is in Upper Case and the widget seems to only recognize lower case.  We tested this by changing our source fields to lowercase and were successful under those conditions but would prefer to remain in uppercase if possible.  Is there an easy fix for that by chance?  Thanks in advance for any assistance with this.

  • Avatar
    Andy Son

    Hi all,

    Here's a geojson file you can use for any 3-digit Canadian postal code.

    You can download it here: https://github.com/andyson23/Custom-Map-Widget.git

    Cheers

  • Avatar
    Matt MacIntosh

    Hello,

    Awesome widget!! Is there any way to add more Labels instead of using the tabber?  I'd like to add more info on the areas I'm hovering on.

  • Avatar
    Marc Saunders

    Has anyone in the community created a geojson file for the UK?

  • Avatar
    Albeiro Florez

    How do I use regular 5 digit zip codes with this plugin?

  • Avatar
    Brian Wilson

    Hey Albiero,

    I created this 5-digit zip file which works well for me. The polygons are simplified to keep the file size down.

     

     

  • Avatar
    Albeiro Florez

    @Brian Wilson, 

    I have copied the file to C:\Program Files\Sisense\app\plugins\customMapWidget\geojson and modify the config.js to show the map menu on the widget as shown below, but when I add my zip codes to the map nothing displays. Could you help me, please?

     

  • Avatar
    Brian Wilson (Edited )

    @Alveiro Florez

    I think that should be it - try adding something into the Values area to see if data pops up.

    Also, I think you'll need the Zip Codes as Strings instead of Ints since some zipcodes have leading zeroes. 

  • Avatar
    Albeiro Florez

    @Brian Wilson,

    I tried to put the ZIP Codes on all possible areas but I get nothing. I have submitted a Helpdesk ticket, hopefully, I get something back.

    Thank you for your help!

  • Avatar
    Brian Wilson

    @Albeiro

    Hey Albeiro -- You've got the Zip Codes in the right place on the screenshot, but you need to add some aggregate in the value area for the dashboard such as SUM([Population]).

  • Avatar
    Alex Martz

    Hello, I cannot make it works, only gray screen at all, no mapbox and no local geoserver, I'm new o sisense, and I can't find the plugin logs to check the errors, someone can help to configure the plugin, mapbox and local geoserver?

Please sign in to leave a comment.