GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - koaning/drawdata: Draw datasets from within Python notebooks.

BranchesTags
Open more actions menu

Latest commit

 

History

108 Commits
108 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
drawdata
drawdata
 
 
js
js
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
bar-demo.py
bar-demo.py
 
 
conductor.json
conductor.json
 
 
demo.py
demo.py
 
 
pyproject.toml
pyproject.toml
 
 
readme.md
readme.md
 
 
scatter-demo.py
scatter-demo.py
 
 

Repository files navigation

drawdata

"Just draw some data and get on with your day."

This small Python library contains widgets that allow you to draw a dataset in a Python notebook. This should be very useful when teaching machine learning algorithms.

drawdata demo

For a live demo without installing anything, check out the demo page.

You can really get creative with this in a notebook, so feel free to give it a spin!

Installation

Installation occurs via pip.

uv pip install drawdata

Usage:

You can load the scatter widget to start drawing immediately.

from drawdata import ScatterWidget

widget = ScatterWidget()
widget

If you want to use the dataset that you've just drawn you can do so via:

# Get the drawn data as a list of dictionaries
widget.data

# Get the drawn data as a dataframe
widget.data_as_pandas
widget.data_as_polars

If you're eager to do scikit-learn stuff with your drawn data you may appreciate this property instead:

X, y = widget.data_as_X_y

The assumption for this property is that if you've used multiple colors that you're interested in doing classification and if you've only drawn one color you're interested in regression. In the case of regression y will refer to the y-axis.

Under the hood

The project uses anywidget under the hood so our tools should work in marimo, Jupyter, VSCode and Colab. You could use this to even interact with ipywidgets natively. Here is an example where updating a drawing triggers a new scikit-learn model to train (code).

About

Draw datasets from within Python notebooks.

koaning.github.io/drawdata/

Topics

anywidgetdatadrawdatamarimo

Resources

Readme
MIT license
Activity

Stars

1.7k stars

Watchers

14 watching

Forks

153 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.