docstr: Build the HTML representation for the mapviz.
docstr_tok: ["Build","the","HTML","representation","for","the","mapviz","."]
code: def as_iframe(self, html_data):
      """Build the HTML representation for the mapviz."""
  
      srcdoc = html_data.replace('"', "'")
      return (
          '<iframe id="{div_id}", srcdoc="{srcdoc}" style="width: {width}; '
          'height: {height};"></iframe>'.format(
              div_id=self.div_id,
              srcdoc=srcdoc,
              width=self.width,
              height=self.height,
          )
      )
  
imports: import codecs
  import json
  import os
  from IPython.core.display import HTML, display
  import numpy
  import requests
  from mapboxgl.errors import TokenError, LegendError
  from mapboxgl.utils import color_map, numeric_map, img_encode, geojson_to_dict_list
  from mapboxgl import templates
label_desc: Use image node_id 2 for calling the MapViz obj's underlying member method code with example usage: obj.as_iframe(html_data) and returns: str