
Tangle
by marimo team
Interactive number manipulation with draggable values in text.
About this notebook
This notebook shows three interactive widgets from the wigglystuff library. It uses TangleSlider, TangleChoice, and TangleSelect. The widgets sit inside normal sentences as editable numbers and words. The notebook also imports marimo, altair, numpy, and pandas. It does not load an external dataset. Instead it computes small examples in code, such as a coffee cost and an Amdahl's law comparison of processor cores.
Each widget is a value that the reader edits directly in the text. The reader drags a TangleSlider number to change how many coffees to buy or the price of each coffee. The total cost updates in the same sentence. In one example, two sliders set the sync rate of two parallel programs. An altair line chart then compares processor cores against the actual speedup for both rates. The TangleChoice and TangleSelect widgets let the reader pick an emoji inside a sentence. The notebook then repeats that emoji the number of times the slider shows.
The widgets come from wigglystuff version 0.2.14 and run through marimo's anywidget wrapper. The chart data is built with numpy and pandas for cores 1 to 64. The chart uses altair. All values recompute when the reader changes a widget.











