Visualization

HERE Inspector

You can visualize data in Jupyter notebooks using the HERE Inspector package. The inspector allows you to visualize data from various sources, including the HERE platform. It provides an interface designed to support multiple backends. Currently, supported backends are:

Capabilities include:

  • Display interactive maps
  • Set basemap
  • Add layers
  • Center and zoom
  • Display interactive charts
  • Simple programmatic interface
  • Support for displaying heatmaps, choropleths, markers, clustering, and styling
  • UI controls for interactive applications

Data formats supported:

Basic Visualization

The simplest usage of Inspector is to call its inspect function for immediate one-line visualization of georeferenced data within a Jupyter notebook.

Inspect Single Dataset

import json
from here.inspector import inspect

# Dataset type = GeoJSON file
# This file contains polygon features describing neighborhood boundaries in Chicago
with open('sample_datasets/neighborhood_boundaries.geojson') as f:
    area_boundaries = json.load(f)

inspect(area_boundaries)

Inspect Multiple Datasets

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()
name agency line geometry
0 18th CTA Pink Line POINT (-87.669144 41.857849)
1 35th/Archer CTA Orange Line POINT (-87.680632 41.829274)
2 95th-Dan Ryan CTA Red Line POINT (-87.62441 41.722729)
3 Adams/Wabash CTA Brown, Purple, Orange, Pink, Green Lines POINT (-87.625997 41.879715)
4 Addison CTA Blue Line POINT (-87.718406 41.946604)
inspect(layers={'Neighborhoods': area_boundaries, 'Stations': cta_df})

Custom styles can be specified by passing the additional layers_style parameter or by simply passing tuples:

from here.inspector import Color

inspect(layers=[
    ('Neighborhoods', area_boundaries, Color.AQUA),
    ('Stations', cta_df, Color.RED)
])

Advanced Styling

The Inspect interface provides basic configuration options including:

Advanced styling capabilities are available for supported rendering backends (ipyleaflet and HERE Map Widget for Jupyter). The Inspector.backend function provides access to all advanced functionalities of the rendering backend, allowing unlimited customization.

Please see the Tutorial Notebooks named ExploreInspector_ipyleaflet.ipynb and ExploreInspector_HereMapWidgetForJupyter.ipynb for comprehensive examples of all visualization options.

results matching ""

    No results matching ""