class_docstr: Create a choropleth viz
docstr: Construct a Mapviz object
  
  :param data: can be either GeoJSON (containing polygon features) or JSON for data-join technique with vector polygons
  :param vector_url: optional property to define vector polygon source
  :param vector_layer_name: property to define target layer of vector source
  :param vector_join_property: property to aid in determining color for styling vector polygons
  :param data_join_property: property to join json data to vector features
  :param color_property: property to determine polygon color
  :param color_stops: property to determine polygon color
  :param color_default: property to determine default polygon color if match lookup fails
  :param color_function_type: property to determine `type` used by Mapbox to assign color
  :param line_color: property to determine choropleth line color
  :param line_stroke: property to determine choropleth line stroke (solid, dashed, dotted, dash dot)
  :param line_width: property to determine choropleth line width
  :param line_opacity: opacity of choropleth line layer
  :param height_property: feature property for determining polygon height in 3D extruded choropleth map
  :param height_stops: property for determining 3D extrusion height
  :param height_default: default height for 3D extruded polygons
  :param height_function_type: property to determine `type` used by Mapbox to assign height
  :param highlight_color: color for feature selection, hover, or highlight
docstr_tok: ["Construct","a","Mapviz","object",":","param","data",":","can","be","either","GeoJSON","(","containing","polygon","features",")","or","JSON","for","data-join","technique","with","vector","polygons",":","param","vector_url",":","optional","property","to","define","vector","polygon","source",":","param","vector_layer_name",":","property","to","define","target","layer","of","vector","source",":","param","vector_join_property",":","property","to","aid","in","determining","color","for","styling","vector","polygons",":","param","data_join_property",":","property","to","join","json","data","to","vector","features",":","param","color_property",":","property","to","determine","polygon","color",":","param","color_stops",":","property","to","determine","polygon","color",":","param","color_default",":","property","to","determine","default","polygon","color","if","match","lookup","fails",":","param","color_function_type",":","property","to","determine","`","type","`","used","by","Mapbox","to","assign","color",":","param","line_color",":","property","to","determine","choropleth","line","color",":","param","line_stroke",":","property","to","determine","choropleth","line","stroke","(","solid",",","dashed",",","dotted",",","dash","dot",")",":","param","line_width",":","property","to","determine","choropleth","line","width",":","param","line_opacity",":","opacity","of","choropleth","line","layer",":","param","height_property",":","feature","property","for","determining","polygon","height","in","3D","extruded","choropleth","map",":","param","height_stops",":","property","for","determining","3D","extrusion","height",":","param","height_default",":","default","height","for","3D","extruded","polygons",":","param","height_function_type",":","property","to","determine","`","type","`","used","by","Mapbox","to","assign","height",":","param","highlight_color",":","color","for","feature","selection",",","hover",",","or","highlight"]
code: def __init__(
      self,
      data,
      color_property=None,
      color_stops=None,
      color_default="grey",
      color_function_type="interpolate",
      line_color="white",
      line_stroke="solid",
      line_width=1,
      line_opacity=1,
      height_property=None,
      height_stops=None,
      height_default=0.0,
      height_function_type="interpolate",
      legend_key_shape="rounded-square",
      highlight_color="black",
      *args,
      **kwargs,
  ):
      """Construct a Mapviz object
  
      :param data: can be either GeoJSON (containing polygon features) or JSON for data-join technique with vector polygons
      :param vector_url: optional property to define vector polygon source
      :param vector_layer_name: property to define target layer of vector source
      :param vector_join_property: property to aid in determining color for styling vector polygons
      :param data_join_property: property to join json data to vector features
      :param color_property: property to determine polygon color
      :param color_stops: property to determine polygon color
      :param color_default: property to determine default polygon color if match lookup fails
      :param color_function_type: property to determine `type` used by Mapbox to assign color
      :param line_color: property to determine choropleth line color
      :param line_stroke: property to determine choropleth line stroke (solid, dashed, dotted, dash dot)
      :param line_width: property to determine choropleth line width
      :param line_opacity: opacity of choropleth line layer
      :param height_property: feature property for determining polygon height in 3D extruded choropleth map
      :param height_stops: property for determining 3D extrusion height
      :param height_default: default height for 3D extruded polygons
      :param height_function_type: property to determine `type` used by Mapbox to assign height
      :param highlight_color: color for feature selection, hover, or highlight
      """
      super(ChoroplethViz, self).__init__(data, *args, **kwargs)
  
      self.template = "choropleth"
      self.check_vector_template()
  
      self.color_property = color_property
      self.color_stops = color_stops
      self.color_default = color_default
      self.color_function_type = color_function_type
      self.line_color = line_color
      self.line_stroke = line_stroke
      self.line_width = line_width
      self.line_opacity = line_opacity
      self.height_property = height_property
      self.height_stops = height_stops
      self.height_default = height_default
      self.height_function_type = height_function_type
      self.legend_key_shape = legend_key_shape
      self.highlight_color = highlight_color
  
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 1 to create a new ChoroplethViz object from inherited base classes: VectorMixin, MapViz with example: obj = ChoroplethViz(data, color_property, color_stops, color_default, color_function_type, line_color, line_stroke, line_width, line_opacity, height_property, height_stops, height_default, height_function_type, legend_key_shape, highlight_color)