Skip to main content

scattered: a composable library for 3D scatterplots

3D scatterplots probably suck, but they're much more fun than regular scatterplots!

[!CAUTION] This project is as Work-In-Progress as it gets.

teaser

The basic idea is:

  • arrow/dataframe as input (with 'x', 'y', 'z' columns)
  • minimal dependencies & small bundle size
  • webgpu rendering
  • javascript library (npm), jupyter widget (pypi), web page (like quak)

use in python

Install:

uv add scattered

or: pip install scattered

Then use:

import scattered
import numpy as np
import pandas as pd

df = pd.DataFrame({
    "x": np.random.rand(5),
    "y": np.random.rand(5),
    "z": np.random.rand(5),
})

scattered.Widget(df)

use in javascript

Install:

pnpm add scattered

or: npm install scattered or yarn add scattered

Then use:

import * as sctrd from "scattered";

const url = "https://raw.githubusercontent.com/dvdkouril/sample-3d-scatterplot-data/main/penguins.arrow";
const c = sctrd.display(url,
    { // encoding
        x: "x",
        y: "y",
        z: "z",
        color: "category",
    });

let appEl = document.querySelector('#app');
if (c) {
    appEl.appendChild(c);
}

about

This project is developed by David Kouřil (web, bsky).

why

I think we're missing a modern, simple to use library for interactive 3D scatterplots. Visualization libraries are typically centered around 2D plots to make exporting as vector graphics easier.

However, learning is the primary motivation:

  1. learn a bit of webgpu
  2. explore the composability principles for visualization tools
  3. learn about bundling, and how to maintain multi-package project

scattered is very much inspired by quak and also follow the structure of that repo.

related and inspo

From researching 3D scatterplots in the wild.

Metadata

Release files for scattered 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scattered 0.1.0
File Size Uploaded
scattered-0.1.0.tar.gz 290.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scattered 0.1.0
File Interpreter ABI Platform
scattered-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 295.2 kB

Release files / scattered-0.1.0.tar.gz

Download URL scattered-0.1.0.tar.gz
Size 290.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8e54603cde048dc01c8df1e4fd48c4682e111a8e596863fe187eff8d865019a3
BLAKE2b-256 checksum
How to use checksums
f21ba24cd15cdc86680f0ed9ecb6af79cd3a1172f4e54ab5e8b8f104cc2fd99c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scattered-0.1.0-py3-none-any.whl

Download URL scattered-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eecef56edfaa67d235e08bb23bc253934f11894ce22ee14a5edaa89f2acc1ace
BLAKE2b-256 checksum
How to use checksums
a100127e50e326cf47cf3f5a1e995ae338c33e565f0c62e2f387faeafc90feb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page