holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.59k stars 499 forks source link

Support point selections in VegaLite/Altair #3398

Closed joelostblom closed 2 years ago

joelostblom commented 2 years ago

Thanks for adding support for Altair/Vega events in this release, that’s very exciting! And congrats on releasing 0.13, I'm very excited about the future wasm support and possibility of standalone desktop installers as well.

I noticed that the Altair examples in the docs does not work if I change the Altair selection from interval to a point selection (single or multi). These return an empty dictionary, whereas an interval selections returns something like

{'Beak Length (mm)': [51.824, 53.952], 'Beak Depth (mm)': [18.796, 18.904]}

It would be great if point selections were also supported. Maybe they are and there is just a different syntax needed (then an example in the docs would be great). Also note that selection_multi and selection_single will be merged to selection_point in the next version of Altair and behave like selection_multi by default (so it shouldn't have a big impact on the implementation of this feature in panel).

image

Full example:

import pandas as pd
import panel as pn
import altair as alt
from vega_datasets import data

pn.extension('vega')
penguins_url = "https://raw.githubusercontent.com/vega/vega/master/docs/data/penguins.json"

brush = alt.selection_multi(name='brush') 

chart = alt.Chart(penguins_url).mark_point().encode(
    x=alt.X('Beak Length (mm):Q', scale=alt.Scale(zero=False)),
    y=alt.Y('Beak Depth (mm):Q', scale=alt.Scale(zero=False)),
    color=alt.condition(brush, 'Species:N', alt.value('lightgray'))
).properties(
    width=250,
    height=250
).add_selection(
    brush
)

df = pd.read_json(penguins_url)

def filtered_table(selection):
    if selection is None:
        return '## No selection'
    print(selection)
    query = selection.items()
    return pn.Column(
        f'Query: {query}',
    )

vega_pane = pn.pane.Vega(chart, debounce=10)
pn.Row(vega_pane, pn.bind(filtered_table, vega_pane.selection.param.brush)).show()

Ref https://github.com/holoviz/panel/issues/3397

dkliu1 commented 1 year ago

I can't get single and multi selection to work. Following the example on Vega Reference Gallery

import altair as alt
from vega_datasets import data

penguins_url = "https://raw.githubusercontent.com/vega/vega/master/docs/data/penguins.json"
df = pd.read_json(penguins_url)

multi = alt.selection_multi(name='multi')  # selection of type "multi"

multi_chart = alt.Chart(df).mark_point().encode(
    x=alt.X('Beak Length (mm):Q', scale=alt.Scale(zero=False)),
    y=alt.Y('Beak Depth (mm):Q', scale=alt.Scale(zero=False)),
    color=alt.condition(multi, 'Species:N', alt.value('lightgray'))
).properties(
    width=250,
    height=250
).add_selection(
    multi
)

vega_multi = pn.pane.Vega(multi_chart, debounce=10)

vega_multi

firefox_NYwU7nes8z

I'm using the following versions panel=0.13.1 altair=4.2.0

hoxbro commented 1 year ago

This works fine for me. Same versions as you. Two things could cause the problem: You haven't added vega to the extension: pn.extension("vega"). Your cell count is pretty high, try to restart and run all cells in the notebook.

https://user-images.githubusercontent.com/19758978/191209487-27536e01-2c9e-4126-9244-3ca0fbc7c2b8.mp4

dkliu1 commented 1 year ago

I tested again:

but it still doesn't work.

environment.yml ```yml name: altair channels: - pyviz - defaults dependencies: - altair=4.1.0=py_1 - asttokens=2.0.5=pyhd3eb1b0_0 - attrs=21.4.0=pyhd3eb1b0_0 - backcall=0.2.0=pyhd3eb1b0_0 - blas=1.0=mkl - bleach=4.1.0=pyhd3eb1b0_0 - bokeh=2.4.3=py38haa95532_0 - bottleneck=1.3.5=py38h080aedc_0 - brotlipy=0.7.0=py38h2bbff1b_1003 - ca-certificates=2022.07.19=haa95532_0 - certifi=2022.9.14=py38haa95532_0 - cffi=1.15.1=py38h2bbff1b_0 - charset-normalizer=2.0.4=pyhd3eb1b0_0 - colorama=0.4.5=py38haa95532_0 - cryptography=37.0.1=py38h21b164f_0 - debugpy=1.5.1=py38hd77b12b_0 - decorator=5.1.1=pyhd3eb1b0_0 - entrypoints=0.4=py38haa95532_0 - executing=0.8.3=pyhd3eb1b0_0 - freetype=2.10.4=hd328e21_0 - idna=3.3=pyhd3eb1b0_0 - importlib-metadata=4.11.3=py38haa95532_0 - importlib_resources=5.2.0=pyhd3eb1b0_1 - intel-openmp=2021.4.0=haa95532_3556 - ipykernel=6.15.2=py38haa95532_0 - ipython=8.4.0=py38haa95532_0 - jedi=0.18.1=py38haa95532_1 - jinja2=3.0.3=pyhd3eb1b0_0 - jpeg=9e=h2bbff1b_0 - jsonschema=4.4.0=py38haa95532_0 - jupyter_client=7.3.5=py38haa95532_0 - jupyter_core=4.10.0=py38haa95532_0 - lerc=3.0=hd77b12b_0 - libdeflate=1.8=h2bbff1b_5 - libpng=1.6.37=h2a8f88b_0 - libsodium=1.0.18=h62dcd97_0 - libtiff=4.4.0=h8a3f274_0 - libwebp=1.2.2=h2bbff1b_0 - lz4-c=1.9.3=h2bbff1b_1 - markdown=3.3.4=py38haa95532_0 - markupsafe=2.1.1=py38h2bbff1b_0 - matplotlib-inline=0.1.6=py38haa95532_0 - mkl=2021.4.0=haa95532_640 - mkl-service=2.4.0=py38h2bbff1b_0 - mkl_fft=1.3.1=py38h277e83a_0 - mkl_random=1.2.2=py38hf11a4ad_0 - nest-asyncio=1.5.5=py38haa95532_0 - numexpr=2.8.3=py38hb80d3ca_0 - numpy=1.23.1=py38h7a0a035_0 - numpy-base=1.23.1=py38hca35cd5_0 - openssl=1.1.1q=h2bbff1b_0 - packaging=21.3=pyhd3eb1b0_0 - pandas=1.4.3=py38hd77b12b_0 - panel=0.13.1=py_0 - param=1.12.2=py_0 - parso=0.8.3=pyhd3eb1b0_0 - pickleshare=0.7.5=pyhd3eb1b0_1003 - pillow=9.2.0=py38hdc2b20a_1 - pip=22.1.2=py38haa95532_0 - prompt-toolkit=3.0.20=pyhd3eb1b0_0 - psutil=5.9.0=py38h2bbff1b_0 - pure_eval=0.2.2=pyhd3eb1b0_0 - pycparser=2.21=pyhd3eb1b0_0 - pyct=0.4.8=py_0 - pyct-core=0.4.8=py_0 - pygments=2.11.2=pyhd3eb1b0_0 - pyopenssl=22.0.0=pyhd3eb1b0_0 - pyparsing=3.0.9=py38haa95532_0 - pyrsistent=0.18.0=py38h196d8e1_0 - pysocks=1.7.1=py38haa95532_0 - python=3.8.13=h6244533_0 - python-dateutil=2.8.2=pyhd3eb1b0_0 - pytz=2022.1=py38haa95532_0 - pyviz_comms=2.2.1=py_0 - pywin32=302=py38h2bbff1b_2 - pyyaml=6.0=py38h2bbff1b_1 - pyzmq=23.2.0=py38hd77b12b_0 - requests=2.28.1=py38haa95532_0 - setuptools=63.4.1=py38haa95532_0 - six=1.16.0=pyhd3eb1b0_1 - sqlite=3.39.2=h2bbff1b_0 - stack_data=0.2.0=pyhd3eb1b0_0 - tk=8.6.12=h2bbff1b_0 - toolz=0.11.2=pyhd3eb1b0_0 - tornado=6.2=py38h2bbff1b_0 - tqdm=4.64.0=py38haa95532_0 - traitlets=5.1.1=pyhd3eb1b0_0 - typing_extensions=4.3.0=py38haa95532_0 - urllib3=1.26.11=py38haa95532_0 - vc=14.2=h21ff451_1 - vega_datasets=0.7.0=py_0 - vs2015_runtime=14.27.29016=h5e58377_2 - wcwidth=0.2.5=pyhd3eb1b0_0 - webencodings=0.5.1=py38_1 - wheel=0.37.1=pyhd3eb1b0_0 - win_inet_pton=1.1.0=py38haa95532_0 - wincertstore=0.2=py38haa95532_2 - xz=5.2.5=h8cc25b3_1 - yaml=0.2.5=he774522_0 - zeromq=4.3.4=hd77b12b_0 - zipp=3.8.0=py38haa95532_0 - zlib=1.2.12=h8cc25b3_3 - zstd=1.5.2=h19a0ad4_0 prefix: C:\ProgramData\Anaconda3\envs\altair ```
base environment from which jupyter lab is launched ```yml - jupyter=1.0.0=py37_7 - jupyter_client=7.3.5=py37haa95532_0 - jupyter_console=6.4.4=pyhd8ed1ab_0 - jupyter_core=4.11.1=py37h03978a9_0 - jupyter_server=1.18.1=py37haa95532_0 - jupyterlab=3.4.4=py37haa95532_0 - jupyterlab_pygments=0.2.2=pyhd8ed1ab_0 - jupyterlab_server=2.12.0=py37haa95532_0 - jupyterlab_widgets=1.1.1=pyhd8ed1ab_0 ``` ```yml name: base channels: - plotly - pyviz - conda-forge - defaults dependencies: - _pytorch_select=0.1=cpu_0 - _r-mutex=1.0.1=anacondar_1 - altair=4.2.0=pyhd8ed1ab_1 - altair_data_server=0.4.1=py_0 - altair_saver=0.5.0=py_0 - altair_viewer=0.4.0=pyhd8ed1ab_0 - anaconda-client=1.11.0=py37haa95532_0 - anaconda-navigator=1.9.7=py37_0 - anyio=3.6.1=py37h03978a9_0 - argon2-cffi=21.3.0=pyhd3eb1b0_0 - argon2-cffi-bindings=21.2.0=py37hcc03f2d_2 - astropy=4.3.1=py37hc7d831d_0 - async_generator=1.10=py37h28b3542_0 - atomicwrites=1.4.1=pyhd8ed1ab_0 - attrs=21.4.0=pyhd3eb1b0_0 - babel=2.10.3=pyhd8ed1ab_0 - backcall=0.2.0=pyhd3eb1b0_0 - backports=1.1=pyhd3eb1b0_0 - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0 - beautifulsoup4=4.11.1=py37haa95532_0 - blas=1.0=mkl - bleach=5.0.1=pyhd8ed1ab_0 - bokeh=2.4.2=py37haa95532_0 - boltons=21.0.0=pyhd8ed1ab_0 - boost-cpp=1.74.0=h54f0996_2 - branca=0.5.0=pyhd8ed1ab_0 - brotli=1.0.9=h2bbff1b_7 - brotli-bin=1.0.9=h2bbff1b_7 - brotlipy=0.7.0=py37hcc03f2d_1004 - bzip2=1.0.8=h8ffe710_4 - ca-certificates=2022.07.19=haa95532_0 - cairo=1.16.0=he04af86_2 - cairocffi=1.3.0=pyhd8ed1ab_0 - cairosvg=2.5.2=pyhd8ed1ab_0 - cartopy=0.17.0=py37h21f5c67_1015 - certifi=2022.9.14=py37haa95532_0 - cffi=1.15.1=py37h2bbff1b_0 - cfitsio=3.470=h2bbff1b_7 - cftime=1.5.1.1=py37h080aedc_0 - chardet=5.0.0=py37h03978a9_0 - charset-normalizer=2.1.0=pyhd8ed1ab_0 - click=7.1.2=pyhd3eb1b0_0 - click-plugins=1.1.1=pyhd3eb1b0_0 - cligj=0.7.2=pyhd8ed1ab_1 - cloudpickle=2.1.0=pyhd8ed1ab_0 - clyent=1.2.2=py37_1 - colorama=0.4.5=py37haa95532_0 - colorcet=3.0.0=py_0 - colour-science=0.3.16=pyh44b312d_1 - comtypes=1.1.9=py37h03978a9_0 - conda=4.14.0=py37haa95532_0 - conda-build=3.18.7=py37_1 - conda-env=2.6.0=1 - conda-package-handling=1.9.0=py37h8cc25b3_0 - conda-verify=3.1.1=py37_0 - console_shortcut=0.1.1=3 - cryptography=37.0.4=py37h65266a2_0 - cssselect2=0.2.1=pyh9f0ad1d_1 - curl=7.84.0=h2bbff1b_0 - cycler=0.11.0=pyhd3eb1b0_0 - cytoolz=0.12.0=py37hcc03f2d_0 - dask=2.30.0=py_0 - dask-core=2.30.0=py_0 - datashader=0.14.2=py_0 - datashape=0.5.4=py37haa95532_1 - decorator=5.1.1=pyhd3eb1b0_0 - defusedxml=0.7.1=pyhd8ed1ab_0 - diskcache=5.4.0=pyhd8ed1ab_0 - distributed=2.30.1=py37haa95532_0 - double-conversion=3.1.7=h0e60522_0 - eigen=3.4.0=h2d74725_0 - entrypoints=0.4=py37haa95532_0 - et_xmlfile=1.1.0=py37haa95532_0 - expat=2.4.8=h39d44d4_0 - ezdxf=0.16.3=py37h8c56517_0 - face=20.1.1=py_0 - fastparquet=0.4.0=py37h44b1f71_0 - ffmpeg=4.3.1=ha925a31_0 - filelock=3.7.1=pyhd8ed1ab_0 - fiona=1.8.13.post1=py37h758c064_0 - firefox=97.0.1=h0e60522_0 - flake8=4.0.1=pyhd3eb1b0_1 - flake8-quotes=3.3.1=pyhd8ed1ab_0 - flask=1.1.1=py_1 - fluids=0.1.75=py_1 - folium=0.10.1=py_0 - font-ttf-dejavu-sans-mono=2.37=hd3eb1b0_0 - font-ttf-inconsolata=3.000=h77eed37_0 - font-ttf-source-code-pro=2.038=h77eed37_0 - font-ttf-ubuntu=0.83=hab24e00_0 - fontconfig=2.14.0=hce3cb01_0 - fonts-anaconda=1=h8fa9717_0 - fonts-conda-ecosystem=1=hd3eb1b0_0 - fonttools=4.25.0=pyhd3eb1b0_0 - freeimage=3.18.0=h33f27b4_0 - freetype=2.10.4=h546665d_1 - freexl=1.0.6=ha8e266a_0 - fsspec=2022.7.1=py37haa95532_0 - future=0.18.2=py37h03978a9_5 - fuzzywuzzy=0.18.0=py37haa95532_0 - gdal=3.0.4=py37hd44be9e_9 - geckodriver=0.30.0=hdb13177_0 - geocoder=1.38.1=py_1 - geographiclib=1.52=pyhd8ed1ab_0 - geopandas=0.6.1=py_0 - geopy=1.20.0=py_0 - geos=3.8.1=he025d50_0 - geotiff=1.5.1=h3d29ae3_10 - geoviews=1.6.5=py_0 - geoviews-core=1.6.5=py_0 - gettext=0.19.8.1=ha2e2712_1008 - gl2ps=1.4.2=hce2df77_1 - glew=2.1.0=hd77b12b_3 - glib=2.72.1=h7755175_0 - glib-tools=2.72.1=h7755175_0 - glob2=0.7=pyhd3eb1b0_0 - glom=20.11.0=pyhd3deb0d_0 - gmsh=4.8.4=h7544452_0 - h11=0.13.0=pyhd8ed1ab_1 - h5py=3.7.0=py37h3de5c98_0 - hdf4=4.2.15=h0e5069d_3 - hdf5=1.10.6=nompi_h5268f04_1114 - heapdict=1.0.1=pyhd3eb1b0_0 - holoviews=1.14.8=py_0 - holoviz=0.11.3=py_0 - hvplot=0.8.1=py_0 - icc_rt=2019.0.0=h0cc432a_1 - icu=64.2=he025d50_1 - idna=3.3=pyhd8ed1ab_0 - imageio=2.19.3=py37haa95532_0 - importlib-metadata=4.11.4=py37h03978a9_0 - importlib_metadata=4.11.4=hd8ed1ab_0 - importlib_resources=5.9.0=pyhd8ed1ab_0 - iniconfig=1.1.1=pyhd3eb1b0_0 - intel-openmp=2019.4=245 - ipykernel=5.1.3=py37h39e3cac_1 - ipython=7.33.0=py37h03978a9_0 - ipython_genutils=0.2.0=pyhd3eb1b0_1 - ipywidgets=7.7.1=pyhd8ed1ab_0 - itsdangerous=2.1.2=pyhd8ed1ab_0 - jdcal=1.4.1=pyhd3eb1b0_0 - jedi=0.17.2=py37haa95532_1 - jinja2=3.1.2=pyhd8ed1ab_1 - joblib=1.1.0=pyhd3eb1b0_0 - jpeg=9e=h8ffe710_2 - json5=0.9.6=pyhd3eb1b0_0 - jsoncpp=1.8.4=h1ad3211_1002 - jsonschema=4.7.2=pyhd8ed1ab_0 - jupyter=1.0.0=py37_7 - jupyter_client=7.3.5=py37haa95532_0 - jupyter_console=6.4.4=pyhd8ed1ab_0 - jupyter_core=4.11.1=py37h03978a9_0 - jupyter_server=1.18.1=py37haa95532_0 - jupyterlab=3.4.4=py37haa95532_0 - jupyterlab_pygments=0.2.2=pyhd8ed1ab_0 - jupyterlab_server=2.12.0=py37haa95532_0 - jupyterlab_widgets=1.1.1=pyhd8ed1ab_0 - kealib=1.4.14=hde4a422_1 - kiwisolver=1.4.4=py37h8c56517_0 - krb5=1.19.3=h1176d77_0 - lerc=3.0=hd77b12b_0 - libblas=3.8.0=14_mkl - libbrotlicommon=1.0.9=h2bbff1b_7 - libbrotlidec=1.0.9=h2bbff1b_7 - libbrotlienc=1.0.9=h2bbff1b_7 - libcurl=7.84.0=h86230a5_0 - libdeflate=1.8=h2bbff1b_5 - libffi=3.4.2=h8ffe710_5 - libgdal=3.0.4=h6f60a84_9 - libglib=2.72.1=h3be07f2_0 - libgpuarray=0.7.6=h8ffe710_1003 - libiconv=1.16=h2bbff1b_2 - libkml=1.3.0=h9859afa_1014 - liblapack=3.8.0=14_mkl - liblief=0.11.5=hd77b12b_1 - libmklml=2019.0.5=haa95532_0 - libnetcdf=4.7.4=nompi_h3a9aa94_107 - libogg=1.3.5=h2bbff1b_1 - libpng=1.6.37=h1d00b33_3 - libpq=12.9=hb652d5d_3 - libsodium=1.0.18=h8d14728_1 - libspatialindex=1.9.3=h39d44d4_4 - libspatialite=4.3.0a=h51df0ed_1038 - libssh2=1.10.0=h680486a_2 - libtheora=1.1.1=h8d14728_1005 - libtiff=4.4.0=h8a3f274_0 - libwebp=1.2.3=h8ffe710_1 - libwebp-base=1.2.3=h8ffe710_2 - libxml2=2.9.14=hf5bbc77_3 - libxslt=1.1.35=h2bbff1b_0 - libzlib=1.2.12=h8ffe710_2 - llvmlite=0.35.0=py37habb0c8c_1 - locket=1.0.0=py37haa95532_0 - loguru=0.6.0=py37h03978a9_1 - lxml=4.9.1=py37h1985fb9_0 - lz4-c=1.9.2=h62dcd97_2 - m2w64-bwidget=1.9.10=2 - m2w64-bzip2=1.0.6=6 - m2w64-expat=2.1.1=2 - m2w64-fftw=3.3.4=6 - m2w64-flac=1.3.1=3 - m2w64-gcc-libgfortran=5.3.0=6 - m2w64-gcc-libs=5.3.0=7 - m2w64-gcc-libs-core=5.3.0=7 - m2w64-gettext=0.19.7=2 - m2w64-gmp=6.1.0=2 - m2w64-gsl=2.1=2 - m2w64-libiconv=1.14=6 - m2w64-libjpeg-turbo=1.4.2=3 - m2w64-libogg=1.3.2=3 - m2w64-libpng=1.6.21=2 - m2w64-libsndfile=1.0.26=2 - m2w64-libtiff=4.0.6=2 - m2w64-libvorbis=1.3.5=2 - m2w64-libwinpthread-git=5.0.0.4634.697f757=2 - m2w64-libxml2=2.9.3=3 - m2w64-mpfr=3.1.4=4 - m2w64-openblas=0.2.19=1 - m2w64-pcre=8.38=2 - m2w64-speex=1.2rc2=3 - m2w64-speexdsp=1.2rc3=3 - m2w64-tcl=8.6.5=3 - m2w64-tk=8.6.5=3 - m2w64-tktable=2.10=5 - m2w64-wineditline=2.101=5 - m2w64-xz=5.2.2=2 - m2w64-zlib=1.2.8=10 - mako=1.2.1=pyhd8ed1ab_0 - markdown=3.4.1=pyhd8ed1ab_0 - markupsafe=2.1.1=py37hcc03f2d_1 - matplotlib=3.0.3=py37hc8f65d3_0 - matplotlib-base=3.5.2=py37hd77b12b_0 - matplotlib-inline=0.1.6=py37haa95532_0 - mccabe=0.7.0=pyhd3eb1b0_0 - menuinst=1.4.19=py37h59b6b97_0 - mistune=0.8.4=py37hcc03f2d_1005 - mkl=2019.4=245 - mkl-service=2.3.0=py37hfa6e2cd_0 - mkl_fft=1.3.0=py37h46781fe_0 - mkl_random=1.0.4=py37h343c172_0 - mpmath=1.2.1=py37haa95532_0 - msgpack-python=1.0.4=py37h8c56517_0 - msys2-conda-epoch=20160418=1 - multipledispatch=0.6.0=py37_0 - munch=2.5.0=pyhd3eb1b0_0 - munkres=1.1.4=py_0 - navigator-updater=0.2.1=py37_0 - nbclassic=0.4.3=pyhd8ed1ab_0 - nbclient=0.5.13=py37haa95532_0 - nbconvert=6.5.0=pyhd8ed1ab_0 - nbconvert-core=6.5.0=pyhd8ed1ab_0 - nbconvert-pandoc=6.5.0=pyhd8ed1ab_0 - nbformat=5.4.0=pyhd8ed1ab_0 - nest-asyncio=1.5.5=py37haa95532_0 - netcdf4=1.5.6=nompi_py37hf61131d_102 - networkx=2.3=py_0 - ninja=1.11.0=h2d74725_0 - nodejs=14.15.1=h57928b3_0 - notebook=6.0.2=py37_0 - notebook-shim=0.1.0=pyhd8ed1ab_0 - numba=0.52.0=py37h08fd248_0 - numpy=1.19.2=py37hadc3359_0 - numpy-base=1.19.2=py37ha3acd2a_0 - occt=7.5.3=hbda0a55_1 - olefile=0.46=pyh9f0ad1d_1 - openjdk=11.0.15=h57928b3_0 - openjpeg=2.3.1=h48faf41_3 - openpyxl=3.0.7=pyhd8ed1ab_0 - openssl=1.1.1q=h2bbff1b_0 - outcome=1.2.0=pyhd8ed1ab_0 - owslib=0.26.0=pyhd8ed1ab_0 - packaging=21.3=pyhd3eb1b0_0 - pandas=0.24.1=py37h6538335_0 - pandoc=2.18=h57928b3_0 - pandocfilters=1.5.0=pyhd3eb1b0_0 - panel=0.13.1=py_0 - param=1.12.2=py_0 - parso=0.7.0=py_0 - partd=1.2.0=pyhd3eb1b0_1 - patsy=0.5.2=py37haa95532_1 - pcre=8.45=hd77b12b_0 - pep8-naming=0.13.1=pyhd8ed1ab_0 - phantomjs=2.1.1=1 - pickleshare=0.7.5=pyhd3eb1b0_1003 - pillow=8.4.0=py37hd45dc43_0 - pint=0.18=pyhd8ed1ab_0 - pip=19.3.1=py37_0 - pixman=0.40.0=h2bbff1b_1 - pkginfo=1.8.3=pyhd8ed1ab_0 - plotly=5.6.0=py_0 - pluggy=1.0.0=py37h03978a9_3 - poppler=0.87.0=h0cd1227_1 - poppler-data=0.4.11=hd8ed1ab_0 - portpicker=1.5.2=pyhd8ed1ab_0 - postgresql=12.9=hb652d5d_3 - powershell_shortcut=0.0.1=2 - proj=7.0.0=haa36216_5 - prometheus_client=0.14.1=py37haa95532_0 - prompt-toolkit=3.0.30=pyha770c72_0 - prompt_toolkit=3.0.30=hd8ed1ab_0 - psutil=5.9.1=py37hcc03f2d_0 - pugixml=1.10=ha925a31_1 - py=1.11.0=pyhd3eb1b0_0 - py-lief=0.11.5=py37hd77b12b_1 - pycairo=1.21.0=py37h43013c1_1 - pycodestyle=2.8.0=pyhd3eb1b0_0 - pycosat=0.6.3=py37hcc03f2d_1010 - pycparser=2.21=pyhd3eb1b0_0 - pyct=0.4.8=py_0 - pyct-core=0.4.8=py_0 - pyepsg=0.4.0=py37_0 - pyerfa=2.0.0.1=py37hec80d1f_1 - pyfinance=1.2.7=py_0 - pyflakes=2.4.0=pyhd3eb1b0_0 - pygments=2.12.0=pyhd8ed1ab_0 - pygpu=0.7.6=py37hec80d1f_1003 - pykdtree=1.3.4=py37h080aedc_1002 - pymc3=3.7=py_0 - pyodbc=4.0.30=py37ha925a31_0 - pyopenssl=22.0.0=pyhd3eb1b0_0 - pyparsing=3.0.9=py37haa95532_0 - pypdf2=1.26.0=py_2 - pyproj=2.6.1.post1=py37h1d8b288_0 - pyqt=5.9.2=py37hd77b12b_6 - pyrsistent=0.18.1=py37hcc03f2d_1 - pyshp=2.3.0=pyhd8ed1ab_0 - pysocks=1.7.1=py37h03978a9_5 - pytesseract=0.3.4=pyh9f0ad1d_0 - pytest=7.1.2=py37haa95532_0 - python=3.7.3=h8c8aaf0_0 - python-dateutil=2.8.2=pyhd3eb1b0_0 - python-fastjsonschema=2.16.2=py37haa95532_0 - python-gmsh=4.8.4=hd8ed1ab_0 - python-levenshtein=0.12.2=py37hcc03f2d_2 - python-snappy=0.6.0=py37hd77b12b_3 - python_abi=3.7=2_cp37m - pytorch=1.6.0=cpu_py37h538a6d7_0 - pytz=2022.1=py37haa95532_0 - pyviz_comms=2.2.1=py_0 - pywavelets=1.3.0=py37h2bbff1b_0 - pywin32=303=py37hcc03f2d_0 - pywinauto=0.6.8=py37hc8dfbb8_1 - pywinpty=2.0.6=py37h7f67f24_0 - pyyaml=6.0=py37hcc03f2d_4 - pyzmq=23.2.0=py37hd77b12b_0 - qt=5.9.7=h506e8af_3 - qtconsole=5.3.2=py37haa95532_0 - qtpy=2.2.0=py37haa95532_0 - r-base=3.6.1=hf18239d_1 - rapidjson=1.1.0=ha925a31_1002 - ratelim=0.1.6=py_2 - reportlab=3.5.68=py37h375b626_1 - requests=2.28.1=py37haa95532_0 - rise=5.7.1=py37h03978a9_1 - rtree=1.0.0=py37h13cc57e_1 - ruamel_yaml=0.15.100=py37h2bbff1b_0 - scikit-image=0.19.2=py37hf11a4ad_0 - scikit-learn=0.22.1=py37h6288b17_0 - scipy=1.6.2=py37h14eb087_0 - seaborn=0.9.0=py_2 - selenium=4.1.0=pyhd8ed1ab_0 - send2trash=1.8.0=pyhd3eb1b0_1 - setuptools=63.4.1=py37haa95532_0 - setuptools-scm=7.0.5=pyhd8ed1ab_0 - setuptools_scm=7.0.5=hd8ed1ab_0 - shapely=1.7.1=py37h9e4ceff_1 - sip=4.19.13=py37hd77b12b_0 - six=1.16.0=pyhd3eb1b0_1 - snappy=1.1.9=h82413e6_1 - sniffio=1.2.0=py37h03978a9_3 - sortedcontainers=2.4.0=pyhd3eb1b0_0 - soupsieve=2.3.2.post1=pyhd8ed1ab_0 - sqlite=3.39.2=h2bbff1b_0 - statsmodels=0.12.2=py37h2bbff1b_0 - streamz=0.6.3=pyhd3eb1b0_0 - svglib=1.3.0=pyhd8ed1ab_0 - sympy=1.10.1=py37haa95532_0 - tabula-py=2.2.0=py37h03978a9_0 - tbb=2020.2=h2d74725_4 - tbb-devel=2020.2=h2d74725_4 - tblib=1.7.0=pyhd3eb1b0_0 - tenacity=8.0.1=py37haa95532_1 - terminado=0.15.0=py37h03978a9_0 - theano=1.0.5=py37hf2a7229_3 - thrift=0.11.0=py37h6538335_1001 - tifffile=2020.10.1=py37h8c2d366_2 - tiledb=1.7.7=h0b90766_3 - tinycss2=1.1.1=pyhd8ed1ab_0 - tk=8.6.12=h2bbff1b_0 - tomli=2.0.1=py37haa95532_0 - toolz=0.12.0=pyhd8ed1ab_0 - tornado=6.2=py37h2bbff1b_0 - tqdm=4.64.0=py37haa95532_0 - traitlets=5.3.0=pyhd8ed1ab_0 - trio=0.21.0=py37h03978a9_0 - trio-websocket=0.9.2=pyhd8ed1ab_0 - typing-extensions=4.3.0=py37haa95532_0 - typing_extensions=4.3.0=py37haa95532_0 - ucrt=10.0.20348.0=haa95532_0 - uncertainties=3.1.2=py37_0 - urllib3=1.26.11=py37haa95532_0 - utfcpp=3.2.1=haa95532_0 - vc=14.2=hb210afc_6 - vega-cli=5.17.0=h0e60522_1 - vega-lite-cli=4.17.0=h57928b3_0 - vega_datasets=0.8.0=py_0 - vincent=0.4.4=py_1 - voila=0.3.5=pyhd8ed1ab_0 - vs2015_runtime=14.29.30037=h902a5da_6 - vs2017_win-64=19.16.27033=hb90652a_6 - vswhere=3.0.3=h57928b3_0 - vtk=9.0.1=no_osmesa_py37h35f1388_100 - wcwidth=0.2.5=pyh9f0ad1d_2 - webencodings=0.5.1=py37_1 - websocket-client=1.3.3=pyhd8ed1ab_0 - websockets=10.3=py37hcc03f2d_0 - wheel=0.37.1=pyhd3eb1b0_0 - widgetsnbextension=3.6.1=pyha770c72_0 - win32_setctime=1.1.0=pyhd3eb1b0_0 - win_inet_pton=1.1.0=py37h03978a9_4 - wincertstore=0.2=py37haa95532_2 - winpty=0.4.3=4 - wntr=0.3.0=py37h3b38789_0 - wsproto=1.1.0=py37h03978a9_1 - xarray=0.11.3=py37_0 - xerces-c=3.2.2=h6538335_1004 - xlrd=1.2.0=py37_0 - xmltodict=0.13.0=pyhd8ed1ab_0 - xz=5.2.5=h8cc25b3_1 - yaml=0.2.5=h8ffe710_2 - zeromq=4.3.4=h0e60522_1 - zict=2.2.0=pyhd8ed1ab_0 - zipp=3.8.0=py37haa95532_0 - zlib=1.2.12=h8ffe710_2 - zstd=1.4.8=h498f385_0 - pip: - amqp==2.5.2 - appdirs==1.4.3 - billiard==3.6.3.0 - camelot-py==0.7.3 - celery==4.4.2 - configparser==3.5.3 - excalibur-py==0.4.3 - fastscript==0.1.4 - kombu==4.6.8 - materials==0.1.5 - mcerp==0.12 - nbdev==0.2.7 - nbpresent==3.0.0 - opencv-python==4.2.0.34 - pandas-datareader==0.7.4 - pdfminer-six==20200402 - pipdate==0.3.5 - psychrochart==0.2.6 - psychrolib==2.1.1 - pycryptodome==3.9.7 - pywincalc==2.3.4 - sqlalchemy==1.3.17 - vine==1.3.0 - werkzeug==0.16.1 - xsect==1.1.2 prefix: C:\ProgramData\Anaconda3 ```
hoxbro commented 1 year ago

Try launching the jupyter lab from your fresh environment.

Though, this is more of a usage question and would be better to continue on Discourse.

cosmicfarmers commented 1 year ago

After clicking a point in the chart, I see vega_multi.selection collects index number of the data point. But if data points are plotted after "transform_aggregate" in Altair, then the re-indexed number of the aggregation are collected in the vega_multi.selection. But I don't know how I can relate the re-indexed number to my dataset because aggregation is performed by altair internally. Do you have any idea?

joelostblom commented 1 year ago

@jhyoo1982 Could you provide a minimal reproducible example of your issue? It would help the developers to quickly troubleshoot it by copy pasting your code and seeing what the issue is. It could also be a good idea to open a separate issue for this with all the details.