code: def add(
      self,
      series_name: str,
      data_pair: types.Sequence,
      type_: str = "scatter",
      *,
      symbol: types.Optional[str] = None,
      symbol_size: types.Numeric = 12,
      blur_size: types.Numeric = 20,
      point_size: types.Numeric = 20,
      radius: types.Optional[types.Sequence] = None,
      color: types.Optional[str] = None,
      is_polyline: bool = False,
      is_large: bool = False,
      large_threshold: types.Numeric = 2000,
      progressive: types.Numeric = 400,
      progressive_threshold: types.Numeric = 3000,
      label_opts: types.Label = None,
      effect_opts: types.Effect = opts.EffectOpts(),
      linestyle_opts: types.LineStyle = opts.LineStyleOpts(),
      tooltip_opts: types.Tooltip = None,
      itemstyle_opts: types.ItemStyle = None,
      render_item: types.JsCode = None,
      encode: types.Union[types.JsCode, dict] = None,
  ):
      self._zlevel += 1
      data = self._feed_data(data_pair, type_)
  
      self._append_color(color)
      self._append_legend(series_name)
  
      if type_ == ChartType.SCATTER:
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "symbol": symbol,
                  "symbolSize": symbol_size,
                  "data": data,
                  "label": label_opts,
                  "tooltip": tooltip_opts,
                  "itemStyle": itemstyle_opts,
              }
          )
      elif type_ == ChartType.SCATTERGL:
          self.js_dependencies.add("echarts-gl")
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "symbol": symbol,
                  "symbolSize": symbol_size,
                  "data": data,
                  "itemStyle": itemstyle_opts,
              }
          )
      elif type_ == ChartType.EFFECT_SCATTER:
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "showEffectOn": "render",
                  "rippleEffect": effect_opts,
                  "symbol": symbol,
                  "symbolSize": symbol_size,
                  "data": data,
                  "label": label_opts,
                  "tooltip": tooltip_opts,
                  "itemStyle": itemstyle_opts,
              }
          )
      elif type_ == ChartType.FLOWGL:
          self.js_dependencies.add("echarts-gl")
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "data": data,
                  "itemStyle": itemstyle_opts,
              }
          )
      elif type_ == ChartType.HEATMAP:
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "data": data,
                  "tooltip": tooltip_opts,
                  "itemStyle": itemstyle_opts,
                  "pointSize": point_size,
                  "blurSize": blur_size,
              }
          )
      elif type_ == ChartType.LINES:
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "zlevel": self._zlevel,
                  "progressive": progressive,
                  "progressiveThreshold": progressive_threshold,
                  "effect": effect_opts,
                  "symbol": symbol or ["none", "arrow"],
                  "polyline": is_polyline,
                  "large": is_large,
                  "largeThreshold": large_threshold,
                  "symbolSize": symbol_size,
                  "data": data,
                  "lineStyle": linestyle_opts,
                  "tooltip": tooltip_opts,
                  "itemStyle": itemstyle_opts,
                  "label": label_opts,
              }
          )
      elif type_ == ChartType.LINESGL:
          self.js_dependencies.add("echarts-gl")
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "data": data,
                  "polyline": is_polyline,
                  "large": is_large,
                  "lineStyle": linestyle_opts,
              }
          )
      elif type_ == ChartType.CUSTOM:
          self.options.get("series").append(
              {
                  "type": type_,
                  "name": series_name,
                  "coordinateSystem": self._coordinate_system,
                  "renderItem": render_item,
                  "emphasis": {"itemStyle": itemstyle_opts},
                  "encode": encode,
                  "data": data,
              }
          )
      elif type_ == ChartType.PIE:
          if not radius:
              radius = ["0%", "5%"]
  
          if not tooltip_opts:
              tooltip_opts = {"formatter": "{b}: {c} ({d}%)"}
  
          if not isinstance(data[0], opts.PieItem):
              data = [{"name": n, "value": v} for n, v in data]
  
          self.options.get("series").append(
              {
                  "type": type_,
                  "coordinateSystem": self._coordinate_system,
                  "data": data,
                  "tooltip": tooltip_opts,
                  "label": label_opts,
                  "center": self.get_coordinate(series_name),
                  "radius": radius,
              }
          )
          # Legend (hard code here)
          legend = self.options.get("legend")[0]
          pie_series_name = [d.get("name") for d in data]
          if len(legend.get("data")) < len(pie_series_name):
              legend["data"] = pie_series_name
  
      return self
  
imports: import simplejson
  from ...None import options
  from ...None import types
  from ...charts.chart import Chart
  from ...datasets import COORDINATES
  from ...exceptions import NonexistentCoordinatesException
  from ...globals import ChartType
label_desc: Use image node_id 6 for calling the GeoChartBase obj's underlying member method code with example usage: obj.add(series_name, data_pair, type_) and returns: self