Skip to content

Instantly share code, notes, and snippets.

View eesur's full-sized avatar

Sundar Singh eesur

View GitHub Profile
@eesur
eesur / README.md
Created November 6, 2015 15:22
d3 | keypress/keyboard events

Testing keypress events using Mousetrap, a simple library for handling keyboard shortcuts in Javascript.

Numbers 0 to 9 will render Japanese equivalent using unicode characters. To hear audio of Japanese numbers

@eesur
eesur / README.md
Last active November 9, 2015 18:22
d3 | lodash groupBy float numbers

Grouping an array using lodash _.groupBy.

Creates an object composed of keys generated from the results of running each element of collection through iteratee. The corresponding value of each key is an array of the elements responsible for generating the key. The iteratee is bound to thisArg and invoked with three arguments: (value, index|key, collection).

@eesur
eesur / README.md
Created November 20, 2015 15:50
eon-chart for realtime updates with PubNub

Using eon-chart for testing gauge chart for realtime updates with PubNub and C3

This uses the included PubNub library to pubnub.publish() packets to the pubnub.subscribe() call waiting inside the C3 framework.

You probably want to publish data from the back-end instead. Check out our docs for more info: http://www.pubnub.com/documentation/

@eesur
eesur / README.md
Created November 23, 2015 18:21
d3 | simple square grid

Simple square grid that is made of squares (well rect)

Change the height, width and square vars to alter. It simply loops over number of columns and creates a row for each loop iteration.


Note: If you don't want to use lodash

  1. change _.round to Math.round
@eesur
eesur / README.md
Created November 24, 2015 19:02
d3 | squared grid coloured in

Coloured in the grid, so it differs from your average squared paper–can't do that by hand every second

based of my initial sketch/block: d3 | simple square grid

@eesur
eesur / README.md
Last active November 24, 2015 19:59
d3 | squared grid reusable

Reusable grids that can have some example hover events applied using dispatch

based of my initial sketch/block: d3 | simple square grid

@eesur
eesur / README.md
Created November 26, 2015 21:53
d3 | draw to square grid

drawing to the grid using data. Styled gurmukhi script which translates to 'let go of worry; and be worry free'

      C H I N T A
      C H A D
    A C H I N T 
      R E H U

based of my initial sketch/block: d3 | simple square grid

@eesur
eesur / README.md
Created December 8, 2015 18:10
d3 | reusable heatmap calendar

Calendar heatmap adapted into a reusable chart for quick testing

loading of CSV json data, which is then quantized into a diverging color scale. The values are visualized as coloured cells per day. Days are arranged into columns by week, then grouped by month and years.

source

@eesur
eesur / README.md
Created December 12, 2015 16:37
d3 | Reusable slopegraph

Reusable slopegraph inspired/adapted from Ben Van Dyke's example into a reusable chart.

This slopegraph example shows the number of personal computers installed in a country per household. This includes desktop PCs and laptops, but excludes smartphones and terminals connected to mainframe computers. All figures are calculated using total number of Personal Computers and the Total Number of Households.

data source

@eesur
eesur / README.md
Last active September 13, 2019 10:52
d3 | reusable slopegraph v2

Updated reusable slopegraph sketch, from my previous slopegraph version

This version allows for multiple sets/columns and will adapted accordingly. Added some interaction to toggle the sets/columns and also toggle highlighted line.

data source