1c0433bcd6928e55ee70e582fd538c3bc854d04e,examples/embed/widget.py,,update_pyramid,#,108
Before Change
male_percent = -male.Value/total
female_percent = female.Value/total
groups = male.AgeGrpStart.tolist()
shifted = groups[1:] + [groups[-1] + 5]
source_pyramid.data = dict(
groups=groups,
shifted=shifted,
male=male_percent,
female=female_percent,
)
def update_population():
population = df[df.Location == location].groupby(df.Year).Value.sum()
aligned_revision = revision//10 * 10
After Change
female_percent = female.Value / total
source_pyramid_m.data = dict(
group=[str(x) for x in male.AgeGrp.unique()],
value=male_percent,
)
source_pyramid_f.data = dict(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: bokeh/bokeh
Commit Name: 1c0433bcd6928e55ee70e582fd538c3bc854d04e
Time: 2017-01-09
Author: bryanv@continuum.io
File Name: examples/embed/widget.py
Class Name:
Method Name: update_pyramid
Project Name: bokeh/bokeh
Commit Name: 1c0433bcd6928e55ee70e582fd538c3bc854d04e
Time: 2017-01-09
Author: bryanv@continuum.io
File Name: examples/models/population_server.py
Class Name:
Method Name: update_pyramid
Project Name: dPys/PyNets
Commit Name: 96e482fd26c87a9d54ac1c8c53e00a93a2c6df2e
Time: 2017-11-04
Author: dpisner@utexas.edu
File Name: pynets/pynets_run.py
Class Name:
Method Name: