enso-org / enso

Enso Analytics is a self-service data prep and analysis platform designed for data teams.
https://ensoanalytics.com
Apache License 2.0
7.39k stars 323 forks source link

Visualization: Geo Maps #2442

Closed wdanilo closed 3 years ago

wdanilo commented 4 years ago

Summary

Integration of the deck.gl which allows interactive maps visualizations with a lot of possible, predefined layers, like heat maps, transportation paths, and more. Examples: image

Specification

Acceptance Criteria & Test Cases

BinarySoftware commented 4 years ago

Some test code provided, should also be tested when ability to read files come:

mapExampleSanFrancisco = "{latitude: 37.8, longitude: -122.45, zoom: 10, mapStyle: 'mapbox://styles/mapbox/light-v9'}"

mapExampleScatterPlot = "{latitude:37.8,longitude:-122.45,zoom:12,controller:true,layers:[new deck.ScatterplotLayer({data:[{position: [-122.44, 37.8], color: [255, 0, 0], radius: 100},{position: [-122.45, 37.8], color: [0, 255, 0], radius: 100},{position: [-122.46, 37.8], color: [0, 0, 255], radius: 100}],getColor:d => d.color,getRadius:d => d.radius})]}"

mapExampleNewYork = "{longitude: -74,latitude: 40.76,controller: true,layers: [new deck.ScatterplotLayer({data: 'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/scatterplot/manhattan.json',radiusScale: 10,radiusMinPixels: 0.5,getPosition: d => [d[0], d[1], 0],getColor: d => (d[2] === 1 ? [0, 128, 255] :  [255, 0, 128])})]}"

mapExampleGeoJsonLayer = "{latitude: 49.254,longitude: -123.13,pitch: 45,zoom:9,controller: true,layers:[new deck.GeoJsonLayer({data: 'https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/geojson/vancouver-blocks.json',opacity: 0.6,stroked: false,filled: true,extruded: true,wireframe: true,fp64: true,getElevation: f => Math.sqrt(f.properties.valuePerSqm) * 10,getFillColor: f => [100, 100, 100],getLineColor: f => [255, 255, 255],pickable: true})]}"

Zrzut ekranu 2020-09-23 o 14.26.13.png Zrzut ekranu 2020-09-23 o 14.27.24.png Zrzut ekranu 2020-09-23 o 14.37.25.png

sylwiabr commented 4 years ago

It doesn't work with minimal example "{longitude: 53.15, latitude: 13.4}" -> map doesn't show up. also if I define datatype type Geo_Point latitude longitude and then call

main = Geo_Point 13.4 53.15

the visualisation does not work @BinarySoftware

sylwiabr commented 4 years ago

When opening 2 maps visualizations in IDE in best scenario I have wrong content in the visualization, worst scenario - all nodes disappear.