Skip to content

Instantly share code, notes, and snippets.

@biovisualize
biovisualize / README.md
Last active July 29, 2019 14:42
Test for attaching a png to a gist
  1. Create a new public gist on https://gist.github.com/
  2. Under "Clone this gist", copy the link (i.e., https://gist.github.com/4415518.git)
  3. If you have the command line git tools, clone this gist to a local folder: git clone https://gist.github.com/4415518.git
  4. It will add a folder with the gist id as a name (i.e., 4415518) under the current working directory. Navigate to this folder in the command line: cd 4415518 (dir 4415518 on windows)
  5. Navigate to this folder in your file explorer and add an image (i.e., test.png)
  6. Add it to git from the command line: git add test.png
  7. Commit it to git: git commit -m "I just added a file!"
  8. Push this commit to your remote gist (you will need your Github user name and password): git push
  9. Go back and refresh your Gist on https://gist.github.com/ to confirm that it worked
@biovisualize
biovisualize / README.md
Last active March 12, 2019 09:33
Histogram Equalization

An histogram equalization is a way to enhance local contrasts in an image by using an histogram of its values. I explain the idea in this blog post Here I use d3.scale.quantile for bucketing, inspired by these nice algorithms explained here.

@biovisualize
biovisualize / modules.json
Created May 31, 2016 14:38
D3 v4 modules
{
"d3-array": {
"dependencies": [],
"description": "Array manipulation, ordering, searching, summarizing, etc.",
"exported": ["version", "bisect", "bisectRight", "bisectLeft", "ascending", "bisector", "descending", "deviation", "extent", "histogram", "thresholdFreedmanDiaconis", "thresholdScott", "thresholdSturges", "max", "mean", "median", "merge", "min", "pairs", "permute", "quantile", "range", "scan", "shuffle", "sum", "ticks", "tickStep", "transpose", "variance", "zip"]
},
"d3-axis": {
"dependencies": ["d3-scale", "d3-selection", "d3-transition"],
"description": "Displays automatic reference lines for scales.",
"exported": ["version", "axisTop", "axisRight", "axisBottom", "axisLeft"]
@biovisualize
biovisualize / index.js
Created December 14, 2018 15:20
Think API first
const ChartManager = function() {
function init() { }
function config() { }
function setData() { }
function render() { }
return {
@biovisualize
biovisualize / .block
Last active November 20, 2018 16:08
Sankey from CSV II
license: gpl-3.0
@biovisualize
biovisualize / index.html
Last active October 15, 2018 01:29
D3.js Reusable Bar Chart with Angularjs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 14px sans-serif;
}
.axis path, .axis line {
fill: none;
@biovisualize
biovisualize / .block
Created March 14, 2018 18:54
scale copy
license: mit
@biovisualize
biovisualize / index.html
Created April 12, 2013 03:49
Simple Binary Tree
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
</style>
</head>
<body>