Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 6 commits into from

Conversation

Madhuka
Copy link
Contributor

@Madhuka Madhuka commented Mar 7, 2016

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:

@Madhuka Madhuka changed the title [ZEPPELIN-157] GAdding Map Visualization for Zeppelin [ZEPPELIN-157] Adding Map Visualization for Zeppelin Mar 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
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
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
Contributor Author

Madhuka commented Mar 13, 2016

  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
Contributor

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

@corneadoug
Copy link
Contributor

@muxfe muxfe mentioned this pull request Mar 27, 2016
41 tasks
@ankurmitujjain
Copy link

@Madhuka any update on this?

@felixcheung
Copy link
Member

@Madhuka let us know if we could help!

@Dinduks
Copy link

Dinduks commented Nov 14, 2016

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

@Madhuka
Copy link
Contributor Author

Madhuka commented Nov 16, 2016

@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
Contributor

@corneadoug Can you please provide any update on this?

@asfgit asfgit closed this in c38a0a0 May 9, 2018
asfgit pushed a commit that referenced this pull request May 9, 2018
close #83
close #86
close #125
close #133
close #139
close #146
close #193
close #203
close #246
close #262
close #264
close #273
close #291
close #299
close #320
close #347
close #389
close #413
close #423
close #543
close #560
close #658
close #670
close #728
close #765
close #777
close #782
close #783
close #812
close #822
close #841
close #843
close #878
close #884
close #918
close #989
close #1076
close #1135
close #1187
close #1231
close #1304
close #1316
close #1361
close #1385
close #1390
close #1414
close #1422
close #1425
close #1447
close #1458
close #1466
close #1485
close #1492
close #1495
close #1497
close #1536
close #1545
close #1561
close #1577
close #1600
close #1603
close #1678
close #1695
close #1739
close #1748
close #1765
close #1767
close #1776
close #1783
close #1799
Sign up for free to 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