热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

AddingMapVisualizationforZeppelin

WhatisthisPRfor?AddingMapVisualizationforZeppelinusingLeaflet[1].


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


  • [x] Checking compatible license

  • [x] Adding chart library (leafletjs)

  • [x] Adding new button for chart mapping

  • [x] 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:


  • Does the licenses files need update?No

  • Is there breaking changes for older versions?No

  • Does this needs documentation? #152 contains documentation (I will add new doc and sample in new PR)

该提问来源于开源项目:apache/zeppelin

Can you please provide any update on this?


推荐阅读
author-avatar
周俊瑶zjy_963
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有