class_docstr: Create a choropleth viz
docstr: Update map template variables specific to heatmap visual
docstr_tok: ["Update","map","template","variables","specific","to","heatmap","visual"]
code: def add_unique_template_variables(self, options):
      """Update map template variables specific to heatmap visual"""
  
      # set line stroke dash interval based on line_stroke property
      if self.line_stroke in ["dashed", "--"]:
          self.line_dash_array = [6, 4]
      elif self.line_stroke in ["dotted", ":"]:
          self.line_dash_array = [0.5, 4]
      elif self.line_stroke in ["dash dot", "-."]:
          self.line_dash_array = [6, 4, 0.5, 4]
      elif self.line_stroke in ["solid", "-"]:
          self.line_dash_array = [1, 0]
      else:
          # default to solid line
          self.line_dash_array = [1, 0]
  
      # check if choropleth map should include 3-D extrusion
      self.extrude = all(
          [bool(self.height_property), bool(self.height_stops)]
      )
  
      # common variables for vector and geojson-based choropleths
      options.update(
          dict(
              colorStops=self.color_stops,
              colorProperty=self.color_property,
              colorType=self.color_function_type,
              defaultColor=self.color_default,
              lineColor=self.line_color,
              lineDashArray=self.line_dash_array,
              lineStroke=self.line_stroke,
              lineWidth=self.line_width,
              lineOpacity=self.line_opacity,
              extrudeChoropleth=self.extrude,
              highlightColor=self.highlight_color,
          )
      )
      if self.extrude:
          options.update(
              dict(
                  heightType=self.height_function_type,
                  heightProperty=self.height_property,
                  heightStops=self.height_stops,
                  defaultHeight=self.height_default,
              )
          )
  
      # vector-based choropleth map variables
      if self.vector_source:
          options.update(
              vectorColorStops=self.generate_vector_color_map()
          )
  
          if self.extrude:
              options.update(
                  vectorHeightStops=self.generate_vector_numeric_map(
                      "height"
                  )
              )
  
      # geojson-based choropleth map variables
      else:
          options.update(
              geojson_data=json.dumps(self.data, ensure_ascii=False)
          )
  
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 ChoroplethViz obj's underlying member method code with example usage: obj.add_unique_template_variables(options) without return types