☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Transformations IV

Community Support
malikarumi
malikarumi

from lesson 03_Data_ Sources_&_Transformations

# represent each value as an angle = value / total * 2pi
data['angle'] = data['value']/data['value'].sum() * 2*pi

Based on the result, I interpret this as:

  • Create a new column.
  • Call it ‘angle’.
  • Iterate through an implied for loop, creating for each row a cell with the value of its value column as a fraction of the total of all values times pi.
  • Color each resulting pie slice according to the color column,

But is this in the same implied for loop, or is this a second iteration?

p.wedge(x=0, y=1, radius=0.4,

We can infer what a wedge glyph is.

  • Is x = the center of the pie?
  • Thus making y the outer edge?
  • Radius is 0.4 of what?
⌁   Link to post

End of archived discussion · Replies are disabled