Skip to content
Open
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- rapidsai-nightly
- conda-forge
dependencies:
- bokeh>=3.1,<=3.6.3
- bokeh>=3.1
- bokeh_sampledata
- cuda-version=12.9
- cudf==25.12.*,>=0.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- rapidsai-nightly
- conda-forge
dependencies:
- bokeh>=3.1,<=3.6.3
- bokeh>=3.1
- bokeh_sampledata
- cuda-version=12.9
- cudf==25.12.*,>=0.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-130_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- rapidsai-nightly
- conda-forge
dependencies:
- bokeh>=3.1,<=3.6.3
- bokeh>=3.1
- bokeh_sampledata
- cuda-version=13.0
- cudf==25.12.*,>=0.0.0a0
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-130_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- rapidsai-nightly
- conda-forge
dependencies:
- bokeh>=3.1,<=3.6.3
- bokeh>=3.1
- bokeh_sampledata
- cuda-version=13.0
- cudf==25.12.*,>=0.0.0a0
Expand Down
4 changes: 2 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ dependencies:
common:
- output_types: [conda, requirements]
packages:
- &bokeh bokeh>=3.1,<=3.6.3
- &bokeh bokeh>=3.1
- &bokeh_sampledata bokeh_sampledata
- &holoviews holoviews>=1.16.0,<1.21.0a0
- ipykernel
Expand Down Expand Up @@ -194,7 +194,7 @@ dependencies:
common:
- output_types: [conda, requirements, pyproject]
packages:
- bokeh>=3.1,<=3.6.3
- bokeh>=3.1
- datashader>=0.15
- geopandas>=0.11.0
- shapely<2.1.0
Expand Down
5 changes: 3 additions & 2 deletions python/cuxfilter/assets/cudf_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

import dask_cudf
import dask.dataframe as dd
from ..charts.constants import CUDF_DATETIME_TYPES
import dask_cudf


def get_min_max(df, col_name):
from cuxfilter.charts.constants import CUDF_DATETIME_TYPES

min, max = df[col_name].min(), df[col_name].max()
if isinstance(df, dask_cudf.DataFrame):
if df[col_name].dtype in CUDF_DATETIME_TYPES:
Expand Down
53 changes: 25 additions & 28 deletions python/cuxfilter/charts/bokeh/bokeh.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

from argparse import ArgumentError

from .plots import Bar, Histogram


Expand All @@ -19,48 +20,44 @@ def bar(
**library_specific_params,
):
"""
Create a bar chart or histogram using Bokeh backend.

Parameters
----------

x: str
x : str
x-axis column name from the gpu dataframe
y: str, default None
y : str
y-axis column name from the gpu dataframe
data_points: int, default None
data_points : int
when None, it means no custom number of bins are provided and
data_points will default to df[self.x].nunique()

add_interaction: {True, False}, default True

aggregate_fn: {'count', 'mean'}, default 'count'

step_size: int, default None

step_size_type: {int, float}, default int

title: str,

add_interaction : {True, False}
whether to add selection interaction to the chart
aggregate_fn : {'count', 'mean'}
aggregation function to apply when y is provided
step_size : int
step size for binning data
step_size_type : {int, float}
type of step size for binning
title : str
chart title

autoscaling: bool,

set whether chart scale is updated automatically for
y_axis when data updates

unselected_alpha: float, default 0.1

**library_specific_params:
autoscaling : bool
set whether chart scale is updated automatically for y_axis when data
updates
unselected_alpha : float
alpha value for unselected data points
**library_specific_params
additional library specific keyword arguments to be passed to
the function, a list of all the supported arguments can be found by
running
```python
running:

>>> import holoviews as hv
>>> hv.help(hv.Bars)
````

Returns
-------
A bokeh chart object of type vbar
Bar or Histogram
A bokeh chart object of type vbar (Bar) or histogram (Histogram)
"""

if y is not None:
Expand Down
35 changes: 16 additions & 19 deletions python/cuxfilter/charts/bokeh/plots/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# SPDX-License-Identifier: Apache-2.0

import holoviews as hv
import panel as pn
import param
from cuxfilter.charts.core.aggregate import BaseAggregateChart

from cuxfilter.assets.numba_kernels import calc_value_counts
import panel as pn
from cuxfilter.charts.core.aggregate import BaseAggregateChart


class InteractiveHistogram(param.Parameterized):
Expand Down Expand Up @@ -88,14 +89,7 @@ def view(self):


class Histogram(BaseAggregateChart):
"""
Description:
"""

def generate_chart(self, **kwargs):
"""
returns a histogram chart
"""
self.chart = InteractiveHistogram(
x=self.x,
source_df=self.calculate_source(),
Expand All @@ -106,14 +100,17 @@ def generate_chart(self, **kwargs):

def calculate_source(self, data=None):
"""
Description:
Calculate the binned counts for the histogram for the x column
-------------------------------------------
Input:
data = cudf.DataFrame
-------------------------------------------
Output:
cudf.DataFrame
Calculate the binned counts for the histogram for the x column.

Parameters
----------
data : cudf.DataFrame, optional
Input dataframe. If None, uses self.source.

Returns
-------
cudf.DataFrame
DataFrame with binned counts for the x column.
"""
data = self.source if data is None else data
return calc_value_counts(
Expand All @@ -125,7 +122,7 @@ def calculate_source(self, data=None):

def reload_chart(self, data):
"""
reload chart with new data
Reload chart with new data
"""
self.chart.update_data(self.calculate_source(data))

Expand All @@ -138,7 +135,7 @@ def view(self, width=800, height=400):

def apply_theme(self, theme):
"""
apply thematic changes to the chart based on the theme
Apply thematic changes to the chart based on the theme
"""
if "fill_color" not in self.library_specific_params:
self.library_specific_params["fill_color"] = theme.chart_color
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
this.define<CustomInspectTool.Props>(({Boolean}) => ({
_active: [ Boolean, true ]
}))

this.register_alias("customInspect", () => new CustomInspectTool())
}

}
Expand Down
33 changes: 22 additions & 11 deletions python/cuxfilter/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

import os
import urllib
import warnings
from collections import Counter
from typing import Dict, Union

import bokeh.embed.util as u
import cudf
import dask_cudf
import panel as pn
from panel.io.server import get_server
from bokeh.embed import server_document
import os
import urllib
import warnings
from collections import Counter
from panel.io.server import get_server

from cuxfilter.assets import cudf_utils, get_open_port
from cuxfilter.charts.core import BaseChart, BaseWidget, ViewDataFrame
from cuxfilter.layouts import single_feature
from cuxfilter.charts.panel_widgets import data_size_indicator
from cuxfilter.assets import get_open_port, cudf_utils
from cuxfilter.layouts import single_feature
from cuxfilter.themes import default

DEFAULT_NOTEBOOK_URL = "http://localhost:8888"
Expand Down Expand Up @@ -69,6 +70,18 @@ def _check_if_duplicates(charts):
class DashBoard:
"""
A cuxfilter GPU DashBoard object.

Methods
-------
.. autosummary::
:toctree: generated/

add_charts
app
export
show
stop

Examples
--------

Expand Down Expand Up @@ -493,10 +506,8 @@ def show(
----------

notebook_url: str, optional, default localhost:8888
- URL where you want to run the dashboard as a web-app,
including the port number.

- Can use localhost instead of ip if running locally.
URL where you want to run the dashboard as a web-app, including the
port number. Can use localhost instead of ip if running locally.

port: int, optional
Has to be an open port
Expand Down
17 changes: 14 additions & 3 deletions python/cuxfilter/dataframe.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

from typing import Type

import cudf
import dask_cudf
import pyarrow as pa
from typing import Type

from cuxfilter.assets import notebook_assets
from cuxfilter.dashboard import DashBoard
from cuxfilter.layouts import single_feature
from cuxfilter.themes import default
from cuxfilter.assets import notebook_assets


def read_arrow(source):
Expand All @@ -22,7 +23,17 @@ def read_arrow(source):
# class DataFrame:
class DataFrame:
"""
A cuxfilter GPU DataFrame object
A cuxfilter GPU DataFrame object.

Methods
-------
.. autosummary::
:toctree: generated/

from_arrow
from_dataframe
load_graph
dashboard
"""

data: Type[cudf.DataFrame] = None
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ authors = [
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
dependencies = [
"bokeh>=3.1,<=3.6.3",
"bokeh>=3.1",
"cudf==25.12.*,>=0.0.0a0",
"cupy-cuda13x>=13.6.0",
"dask-cudf==25.12.*,>=0.0.0a0",
Expand Down