class_docstr: An abstract canvas representing the space in which to bin.
  
  Parameters
  ----------
  plot_width, plot_height : int, optional
      Width and height of the output aggregate in pixels.
  x_range, y_range : tuple, optional
      A tuple representing the bounds inclusive space ``[min, max]`` along
      the axis.
  x_axis_type, y_axis_type : str, optional
      The type of the axis. Valid options are ``'linear'`` [default], and
      ``'log'``.
class_docstr_tok: ["An","abstract","canvas","representing","the","space","in","which","to","bin",".","Parameters","--","--","--","--","--","plot_width",",","plot_height",":","int",",","optional","Width","and","height","of","the","output","aggregate","in","pixels",".","x_range",",","y_range",":","tuple",",","optional","A","tuple","representing","the","bounds","inclusive","space","``","[","min",",","max","]","``","along","the","axis",".","x_axis_type",",","y_axis_type",":","str",",","optional","The","type","of","the","axis",".","Valid","options","are","``","'linear","'","``","[","default","]",",","and","``","'log","'","``","."]
docstr: Compute a reduction by pixel, mapping data to pixels as points.
  
  Parameters
  ----------
  source : pandas.DataFrame, dask.DataFrame, or xarray.DataArray/Dataset
      The input datasource.
  x, y : str
      Column names for the x and y coordinates of each point. If provided,
      the geometry argument may not also be provided.
  agg : Reduction, optional
      Reduction to compute. Default is ``count()``.
  geometry: str
      Column name of a PointsArray of the coordinates of each point. If provided,
      the x and y arguments may not also be provided.
docstr_tok: ["Compute","a","reduction","by","pixel",",","mapping","data","to","pixels","as","points",".","Parameters","--","--","--","--","--","source",":","pandas.DataFrame",",","dask.DataFrame",",","or","xarray.DataArray\/Dataset","The","input","datasource",".","x",",","y",":","str","Column","names","for","the","x","and","y","coordinates","of","each","point",".","If","provided",",","the","geometry","argument","may","not","also","be","provided",".","agg",":","Reduction",",","optional","Reduction","to","compute",".","Default","is","``","count","(",")","``",".","geometry",":","str","Column","name","of","a","PointsArray","of","the","coordinates","of","each","point",".","If","provided",",","the","x","and","y","arguments","may","not","also","be","provided","."]
code: def points(self, source, x=None, y=None, agg=None, geometry=None):
      """Compute a reduction by pixel, mapping data to pixels as points.
  
      Parameters
      ----------
      source : pandas.DataFrame, dask.DataFrame, or xarray.DataArray/Dataset
          The input datasource.
      x, y : str
          Column names for the x and y coordinates of each point. If provided,
          the geometry argument may not also be provided.
      agg : Reduction, optional
          Reduction to compute. Default is ``count()``.
      geometry: str
          Column name of a PointsArray of the coordinates of each point. If provided,
          the x and y arguments may not also be provided.
      """
      from .glyphs import Point, MultiPointGeometry
      from .reductions import count as count_rdn
  
      validate_xy_or_geometry("Point", x, y, geometry)
  
      if agg is None:
          agg = count_rdn()
  
      if geometry is None:
          glyph = Point(x, y)
      else:
          if spatialpandas and isinstance(
              source, spatialpandas.dask.DaskGeoDataFrame
          ):
              # Downselect partitions to those that may contain points in viewport
              x_range = (
                  self.x_range
                  if self.x_range is not None
                  else (None, None)
              )
              y_range = (
                  self.y_range
                  if self.y_range is not None
                  else (None, None)
              )
              source = source.cx_partitions[
                  slice(*x_range), slice(*y_range)
              ]
              glyph = MultiPointGeometry(geometry)
          elif spatialpandas and isinstance(
              source, spatialpandas.GeoDataFrame
          ):
              glyph = MultiPointGeometry(geometry)
          elif (
              geopandas_source := self._source_from_geopandas(source)
          ) is not None:
              source = geopandas_source
              from datashader.glyphs.points import MultiPointGeoPandas
  
              glyph = MultiPointGeoPandas(geometry)
          else:
              raise ValueError(
                  "source must be an instance of spatialpandas.GeoDataFrame, "
                  "spatialpandas.dask.DaskGeoDataFrame, geopandas.GeoDataFrame, or "
                  "dask_geopandas.GeoDataFrame. Received objects of type {typ}".format(
                      typ=type(source)
                  )
              )
  
      return bypixel(source, self, glyph, agg)
  
imports: from __future__ import annotations
  from numbers import Number
  from math import log10
  import warnings
  import numpy
  import pandas
  import dask.dataframe
  import dask.array
  from xarray import DataArray, Dataset
  from .utils import Dispatcher, ngjit, calc_res, calc_bbox, orient_array, dshape_from_xarray_dataset
  from .utils import get_indices, dshape_from_pandas, dshape_from_dask
  from .utils import Expr
  from .resampling import resample_2d, resample_2d_distributed
  from .None import reductions
label_desc: Use image node_id 2 for calling the Canvas obj's underlying member method code with example usage: obj.points(source, x, y, agg, geometry) and returns: bypixel