Your SlideShare is downloading.
×

Text the download link to your phone

Standard text messaging rates apply

Like this presentation? Why not share!

- Twittering with Python by Andreas Schreiber 18633 views
- Text analytics in Python and R with... by Ben Healey 8821 views
- Sugar Presentation - YULHackers Mar... by spierre 2445 views
- Retro - Web Services Made Easy by spierre 808 views
- Canada East by stanwood 451 views
- MDGs Provincial Status Report 2010 ... by United Nations in... 4019 views

No Downloads

Total Views

5,791

On Slideshare

0

From Embeds

0

Number of Embeds

2

Shares

0

Downloads

21

Comments

0

Likes

3

No embeds

No notes for slide

- Making Stream Graphs with Python Nathan Bergey April 29, 2010 Nathan Bergey Making Stream Graphs with Python
- Starting Point I said “Hey, I can do that” Then, later, I did that Nathan Bergey Making Stream Graphs with Python
- Python and Paper Working with Python was easy. http://leebyron.com/else/streamgraph/ Nathan Bergey Making Stream Graphs with Python
- Stacked Graphs Nathan Bergey Making Stream Graphs with Python
- Move it down Start at with g0 being some number other than 0. Nathan Bergey Making Stream Graphs with Python
- Symmetry Nathan Bergey Making Stream Graphs with Python
- A Simple Algorithm n 1 g0 = − fi 2 i=1 Nathan Bergey Making Stream Graphs with Python
- A More Complex Algorithm n 1 g0 = − (n − i + 1)fi n+1 i=1 Nathan Bergey Making Stream Graphs with Python
- Comparison Nathan Bergey Making Stream Graphs with Python
- pystreamgraph http://github.com/natronics/pystreamgraph Takes a list of a list of data points. You provide Colors, Labels, etc. Draws it, but with some options Nathan Bergey Making Stream Graphs with Python
- Preprocess Calculate the sum of the y values for i in range(0, n_points): y_sum = 0 for layer in range(0, n_layers): y_sum += data[layer][i][1] y_extent.append(y_sum) Nathan Bergey Making Stream Graphs with Python
- Step 1 Calculate g0 g_0 = [] for i in range(n_points): g_0.append(- y_extent[i] / 2.0) Nathan Bergey Making Stream Graphs with Python
- Draw it for layer in range(n_layers): points = [] point_range = range(n_points) for i in point_range: x = data[layer][i][0] y = data[layer][i][1] y_stacked = g_0[i] + y for l in range(layer): y_stacked += self.data[l][i][1] points.append((x, y_stacked)) Nathan Bergey Making Stream Graphs with Python
- Draw it point_range.reverse() for i in point_range: x = self.data[layer][i][0] y_stacked = g_0[i] for l in range(layer): y_stacked += self.data[l][i][1] points.append((x,y_stacked)) Nathan Bergey Making Stream Graphs with Python
- A Single Shape Nathan Bergey Making Stream Graphs with Python
- Labeling Not actually possible? Packing algorithms Make some random boxes Keep the largest one Nathan Bergey Making Stream Graphs with Python
- SVG Using SVGFig http://code.google.com/p/svgﬁg/ Could be better Custom interpolation? Nathan Bergey Making Stream Graphs with Python
- Resources Me: @natronics pystreamgraph: http://github.com/natronics/pystreamgraph Nathan Bergey Making Stream Graphs with Python

Be the first to comment