Skip to content

Instantly share code, notes, and snippets.

KatiRG / index.html
Last active Feb 21, 2020
Demonstrate d3 enter-update-exit pattern for divs
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
body {
font: 16px sans-serif;
margin: 50px;
#pudomap-legend {
margin-top: 30px;
KatiRG /
Last active May 1, 2020
Running Flask with Gunicorn
# This gist shows how to integrate Flask into a
# custom Gunicorn-WSGI application described
# here:
from __future__ import unicode_literals
import multiprocessing
KatiRG / .block
Last active Jan 2, 2018
d3js clickable, sortable stacked bar chart
View .block
Released under the GNU General Public License, version 3.
(or, optionlly, any higher version)
KatiRG /
Last active Feb 19, 2018
d3js clickable stacked bar chart
KatiRG /
Last active Mar 23, 2019
Sankey set node position

Sets y-position of selected nodes according to a defined array after sankey.js has calculated their position.

KatiRG / data.csv
Last active Dec 2, 2015
dcjs resize
View data.csv
Index Year
1 1961
1 1964
1 1968
1 1972
1 1973
1 1974
1 1988
1 2013
1 2018
KatiRG /
Last active Dec 8, 2015
dc.js checkbox

Fakes a pair of checkboxes using a dc rowChart and making the bars square.

KatiRG / FRA_admin13.json
Last active Nov 28, 2019
dc choropleth
View FRA_admin13.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
KatiRG / legend snipptets
Last active Sep 23, 2015
dc-leaflet legend feature (creates a static legend based on range of the data)
View legend snipptets
function drawChoropleth(data,geojson) {
choroChart = dc.leafletChoroplethChart("#choro-map .map")
.valueAccessor(function(p) { return p.value.average; })
.center([47.00, 2.00])
You can’t perform that action at this time.