Skip to main content

scattered: a composable library for 3D scatterplots

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

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.

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 Provenance Actions
scattered-0.1.0.tar.gz 290.6 kB Without provenance Details for scattered-0.1.0.tar.gz

Built distribution (wheel)

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

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}

Security for scattered 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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