rougier/pyd3 — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2016-01-02
Map a data range like 10-130 onto pixel positions or chart coordinates automatically
Create smooth color gradients between two colors for heatmaps or charts
Automate chart generation in Python without manually computing bar positions or shades
| rougier/pyd3 | 2arons/llm-cli | adzza/guardium-dns | |
|---|---|---|---|
| Stars | 11 | 11 | 11 |
| Language | Python | Python | Python |
| Last pushed | 2016-01-02 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | easy | moderate |
| Complexity | 2/5 | 2/5 | 3/5 |
| Audience | data | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Work in progress, not all D3 modules have been ported yet.
pyd3 is a Python version of parts of D3, a popular JavaScript library for creating interactive visualizations. Instead of building charts in JavaScript, this project lets you use similar tools in Python, mainly for transforming and mapping data into visual properties like colors, positions, and sizes. The core idea is simpler than it sounds. Imagine you have data ranging from 10 to 130, and you want to position items on a screen from 0 to 960 pixels. A scale does that translation automatically. Feed it 10 and it returns 0, feed it 130 and it returns 960, feed it 70 and it returns somewhere in between. The library also handles color mapping, you can say "I want a gradient from brown to steelblue" and it smoothly blends between them. The interpolate module is the engine behind this: it knows how to smoothly transition between any two values, whether they're numbers, colors, or even nested dictionaries with mixed content inside. The project includes three main toolsets. The color module handles different color spaces (RGB, HSL, Lab, and others) so you can work with colors in whatever way makes sense for your work. The interpolate module does the blending, given a start and end point, it creates a function that returns intermediate values as you move from 0 to 1. The scale module combines these ideas to map abstract numbers or categories into visual encodings, which is essential for any chart or data visualization. This would be useful for anyone building data visualizations in Python, data scientists making custom plots, developers building interactive dashboards, or anyone automating chart generation. Rather than manually computing where each bar should go or what shade a heatmap cell should be, you define your data's range and your visual range, and the library handles the math. The README notes this is a work in progress, so not all D3 modules have been ported over yet.
A Python port of D3.js's scale, color, and interpolation tools for mapping data values into visual properties like position and color.
Mainly Python. The stack also includes Python.
Dormant — no commits in 2+ years (last push 2016-01-02).
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly data.
This repo across BitVibe Labs
double-check against the repo, no cap.