Skip to content

[ZEPPELIN-157] Adding Map Visualization for Zeppelin - #765

Closed
Madhuka wants to merge 6 commits into
apache:masterfrom
Madhuka:leaflet-map
Closed

[ZEPPELIN-157] Adding Map Visualization for Zeppelin#765
Madhuka wants to merge 6 commits into
apache:masterfrom
Madhuka:leaflet-map

Conversation

@Madhuka

Copy link
Copy Markdown
Contributor

What is this PR for?

Adding Map Visualization for Zeppelin using Leaflet[1]. Updated version of #152
Implemented details can be found in here[2]

[1] http://leafletjs.com/
[2] http://madhukaudantha.blogspot.com/2015/08/introducing-new-chart-library-and-types.html

What type of PR is it?

Improvement

Todos

  • Checking compatible license
  • Adding chart library (leafletjs)
  • Adding new button for chart mapping
  • Loading GIS Mapp in Zeppelin

What is the Jira issue?

ZEPPELIN-157

How should this be tested?

`import org.apache.commons.io.IOUtils
import java.net.URL
import java.nio.charset.Charset

// Zeppelin creates and injects sc (SparkContext) and sqlContext (HiveContext or SqlContext)
// So you don't need create them manually

// load map data
val myMapText = sc.parallelize(
IOUtils.toString(
new URL("https://gist.githubusercontent.com/Madhuka/74cb9a6577c87aa7d2fd/raw/2f758d33d28ddc01c162293ad45dc16be2806a6b/data.csv"),
Charset.forName("utf8")).split("\n"))

case class Map(Country:String, Name:String, lat : Float, lan : Float, Altitude : Float)

val myMap = myMapText.map(s=>s.split(",")).filter(s=>s(0)!="Country").map(
s=>Map(s(0),
s(1),
s(2).toFloat,
s(3).toFloat,
s(4).toFloat
)
)

// Below line works only in spark 1.3.0.
// For spark 1.1.x and spark 1.2.x,\n// use myMap.registerTempTable("myMap") instead.\n
myMap.toDF().registerTempTable("myMap")`

More details can be found in here.

Screenshots (if appropriate)

Can found in #152

Questions:

@MadhukaMadhuka changed the title [ZEPPELIN-157] GAdding Map Visualization for Zeppelin[ZEPPELIN-157] Adding Map Visualization for ZeppelinMar 7, 2016
for (var i = 0; i < data.rows.length; i++) {
var row = data.rows[i];
var rowMarker = mapChartModel(row);
newmarkers = $.extend(newmarkers, rowMarker);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use angular.extend instead ?

@randerzander

Copy link
Copy Markdown
Contributor

How to specify which columns should be used for lat/long/description? Should there be a settings option we can use like other charts have?

Also, I notice this breaks the RealTime maps example by @granturing, which manually embeds a leaflet div into a paragraph. Can you tell if either this PR or the example needs an update? It doesn't look like the example div has any conflicting IDs

@Madhuka

Copy link
Copy Markdown
ContributorAuthor
  1. You have do it from script for now. (more thing we can add later as you explain)
  2. It is not about embeds a leaflet div into a paragraph.This will help you to understand map tutorial

@randerzander

Copy link
Copy Markdown
Contributor

@corneadoug@prabhjyotsingh any additional comments? Several people waiting to use and build on top of this PR once it merges.

@corneadoug

Copy link
Copy Markdown
Contributor

@muxfemuxfe mentioned this pull request Mar 27, 2016
41 tasks
@ankurmitujjain

Copy link
Copy Markdown

@Madhuka any update on this?

@felixcheung

Copy link
Copy Markdown
Member

@Madhuka let us know if we could help!

@Dinduks

Copy link
Copy Markdown

@Madhuka Any news on this? How can we help?

@Madhuka

Copy link
Copy Markdown
ContributorAuthor

@Dinduks: You are welcome. I was waiting on ping from corneadoug
@corneadoug : Can we finish it with fixed above errors, and merge it to master as lot of devs waiting for this?

@vinayshukla

Copy link
Copy Markdown
Contributor

@corneadoug Can you please provide any update on this?

@asfgitasfgit closed this in c38a0a0May 9, 2018
asfgit pushed a commit that referenced this pull request May 9, 2018
close#83close#86close#125close#133close#139close#146close#193close#203close#246close#262close#264close#273close#291close#299close#320close#347close#389close#413close#423close#543close#560close#658close#670close#728close#765close#777close#782close#783close#812close#822close#841close#843close#878close#884close#918close#989close#1076close#1135close#1187close#1231close#1304close#1316close#1361close#1385close#1390close#1414close#1422close#1425close#1447close#1458close#1466close#1485close#1492close#1495close#1497close#1536close#1545close#1561close#1577close#1600close#1603close#1678close#1695close#1739close#1748close#1765close#1767close#1776close#1783close#1799
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@Madhuka@randerzander@corneadoug@ankurmitujjain@felixcheung@Dinduks@vinayshukla@prabhjyotsingh