By using AWS re:Post, you agree to the AWS re:Post Terms of Use

EMR notebooks: Display / visualise data

0

We use managed EMR notebooks for analysis of data stored on S3 using Spark. However whenever we render any HTML data e.g. KeplerGL / JSON display etc, it renders the IPython object reference instead of the actual html content. This prevents us from visualising data easily using EMR notebooks. There are a lot of documented examples for matlabplotlib but we couldn't find anything for JSON / HTML / KeplerGL / Other geo visualisation libraries.

Example:

from IPython.display import JSON

JSON({
    'string': 'string',
    'array': [1, 2, 3],
    'bool': True,
    'object': {
        'foo': 'bar'
    }
})

Output:

<IPython.core.display.JSON object>

Similar question from Stackoverflow: https://stackoverflow.com/questions/66524337/produce-html-output-from-aws-emr-jupyter-notebook

Env details:

  1. Jupyterlab: Version 3.1.4
  2. EMR release label: emr-5.34.0 (also reproducible on emr-5.33.1)
asked 3 years ago525 views
1 Answer
0

Did you try importing HTML? Your example only imports JSON.

from IPython.core.display import HTML

Then you can try:

display(HTML('<h1>Hello, world!</h1>'))

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions