class_docstr: Sum unique values
  
  Useful for overplotting on scatterplots.
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
code: def compute_panel(cls, data, scales, **params):
      if "weight" not in data:
          data["weight"] = 1
  
      def count(df):
          """
          Do a weighted count
          """
          df["n"] = df["weight"].sum()
          return df.iloc[0:1]
  
      def ave(df):
          """
          Calculate proportion values
          """
          df["prop"] = df["n"] / df["n"].sum()
          return df
  
      # group by all present aesthetics other than the weight,
      # then sum them (i.e no. of uniques) to get the raw count
      # 'n', and the proportions 'prop' per group
      s: set[str] = set(data.columns) & ALL_AESTHETICS
      by = list(s.difference(["weight"]))
      counts = groupby_apply(data, by, count)
      counts = groupby_apply(counts, "group", ave)
      return counts
  
imports: from .._utils import groupby_apply
  from ..doctools import document
  from ..mapping.aes import ALL_AESTHETICS
  from ..mapping.evaluation import after_stat
  from .stat import stat
label_desc: Use image node_id 1 for calling the stat_sum obj's underlying member method code with example usage: obj.compute_panel(cls, data, scales) and returns: counts, df, df