[ Launch: Crossfilter Intro ] fb4cc22af1a87448356b by emunsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = np.arange(0, 12.1, 0.1) | |
y = range(0,10) | |
activate_threshold = 1.0 | |
deactivate_threshold = -1.0 | |
data = pd.DataFrame({k: (np.sin(x+k) + 0.5 * np.sin(10*x+k)) for k in y}) | |
activation = (data > activate_threshold).astype('float').diff() | |
activation.iloc[0,:] = (data.iloc[0,:] > activate_threshold).astype('float') | |
activation = activation.replace(-1, 0) |
[ Launch: Tributary inlet ] 5bf22058ce477084bbf7 by emunsing
[ Launch: Clickable Line ] 1d64b6cd8a6799b53c1f by emunsing