Skip to content

Instantly share code, notes, and snippets.

View gcalmettes's full-sized avatar

Guillaume Calmettes gcalmettes

View GitHub Profile
@gcalmettes
gcalmettes / peakdetect.py
Created February 9, 2012 23:52 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0):
"""
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html
Algorithm for detecting local maximas and minmias in a signal.
Discovers peaks by searching for values which are surrounded by lower
or larger values for maximas and minimas respectively
@gcalmettes
gcalmettes / cell.py
Created September 21, 2012 20:52 — forked from stefanv/cell.py
Cell detection
from skimage import io, filter, morphology, segmentation, measure, img_as_float
import os
# Download the image
if not os.path.exists('cell.png'):
print "Downloading snowflakes image..."
import urllib2
u = urllib2.urlopen('http://people.sc.fsu.edu/~jburkardt/data/tif/cell.png')
@gcalmettes
gcalmettes / game_of_life.ipynb
Created September 24, 2012 21:38 — forked from jiffyclub/game_of_life.ipynb
Conway's Game of Life in an IPython Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gcalmettes
gcalmettes / gist:6802424
Last active December 24, 2015 13:09
HHURP analysis
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@gcalmettes
gcalmettes / .block
Last active October 3, 2017 22:20
Dot plot histogram with nested Enter/Update/Exit patterns
license: gpl-3.0
@gcalmettes
gcalmettes / README.md
Created July 5, 2017 21:25 — forked from susielu/README.md
Annual Temp - New York 2015

Weather Plot - New York 2015

In the example we're looking at historical weather data for New York provided by intellicast.com and wunderground.com. Inspired by weather-radicals.com.

This example uses scales to roll your own radial projection by mapping out the x, y, and r positions. If you are creating a line or an area you can use d3's convenience functions d3.svg.line.radial and d3.svg.area.radial but this is a method you can use if you want to use different graphical elements in a circular layout.

@gcalmettes
gcalmettes / .block
Last active August 20, 2017 17:57
Beating heart chord diagram
license: gpl-3.0
@gcalmettes
gcalmettes / .block
Last active August 20, 2017 17:58
D3.unconf() badge
license: gpl-3.0
@gcalmettes
gcalmettes / README.md
Last active August 20, 2017 17:59
D3.unconf() badge - moving text

Based on D3.unconf() 2017 badge, added moving text


Experimenting transitions with the chord diagram layout to show blood flow between the four chambers of the heart during a contraction cycle.

The heart consists of four chambers in which blood flows. Deoxygenated blood (blue color) enters the right atrium and passes through the right ventricle. The right ventricle pumps the blood to the lungs where it becomes oxygenated (red color). The oxygenated blood is brought back to the heart by the pulmonary veins which enter the left atrium. From the left atrium blood flows into the left ventricle. The left ventricle pumps the blood to the aorta which will distribute the oxygenated blood to all parts of the body and become deoxygenated again.

Notes:

@gcalmettes
gcalmettes / README.md
Created September 6, 2017 12:11 — forked from robert-moore/README.md
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.