HERE インスペクタパッケージを使用して、 Jupyter ノートブック内のデータを視覚化できます。 インスペクタを使用すると、 HERE platform などのさまざまなソースからのデータを表示できます。 複数のバックエンドをサポートするように設計されたインターフェイスを提供します。 現在サポートされているバックエンドは次のとおりです。
import json
from here.inspector import inspect
# Dataset type = GeoJSON file# This file contains polygon features describing neighborhood boundaries in Chicagowithopen('sample_datasets/neighborhood_boundaries.geojson')as f:
area_boundaries = json.load(f)#By default if no inspector class is set , sdk will take HERE Map widget for map visualization.#user can manually set it as follows:-from here.inspector import options,HEREMapInspector
options.inspector_class = HEREMapInspector
options.api_key ='Your actual HERE API key'
inspect(area_boundaries)
イピリーフレットウィジェット
import json
from here.inspector import inspect
# Dataset type = GeoJSON file# This file contains polygon features describing neighborhood boundaries in Chicagowithopen('sample_datasets/neighborhood_boundaries.geojson')as f:
area_boundaries = json.load(f)from here.inspector import options,IpyleafletInspector
options.inspector_class = IpyleafletInspector
options.api_key =None
inspect(area_boundaries)
Kepler ウィジェット
import json
from here.inspector import inspect
# Dataset type = GeoJSON file# This file contains polygon features describing neighborhood boundaries in Chicagowithopen('sample_datasets/neighborhood_boundaries.geojson')as f:
area_boundaries = json.load(f)from here.inspector import options,KeplerInspector
options.inspector_class = KeplerInspector
options.api_key =None
inspect(area_boundaries)
複数のデータセットを検査します
import geopandas as gpd
# Dataset type = GeoDataFrame# This dataframe contains all Chicago Transit Authority rail station entrance locations
cta_df = gpd.read_file('sample_datasets/cta_entrances.geojson')
cta_df.head()
名前
代理店
直線
形状
0
18
CTA
ピンクの線
ポイント (-87.669144 41.857849)
1
35 階建てのアーチャー
CTA
オレンジ色の線
ポイント (-87.680632 41.829274)
2
95 歳のお子様は Dan Ryan です
CTA
赤い線
ポイント (-87.62441 41.722729)
3
アダムス / ワバッシュ
CTA
茶、紫、オレンジ、ピンク、緑の線
ポイント (-87.625997 41.879715)
4
アディソン
CTA
青い線
ポイント (-87.718406 41.946604)
HERE 地図ウィジェット
from here.inspector import options,HEREMapInspector
options.inspector_class = HEREMapInspector
options.api_key ='Your actual HERE API key'
inspect(layers={'Neighborhoods': area_boundaries,'Stations': cta_df})