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 January 7, 2016 22:48
d3js | oboejs test

Simple test using oboejs for 'loading JSON using streaming, combining the convenience of DOM with the speed and fluidity of SAX'.

Pulling in data fromthe guardian open platform api with filter for articles containing keyword/filter 'code'.

@eesur
eesur / README.md
Created January 5, 2016 12:48
d3 | Freaky Dot Patterns
@eesur
eesur / README.md
Created December 23, 2015 12:57
d3 | hello colour hue

Based on example from Generative Design Hello, Color P.1.0 book

The ability to directly influence 16, 777, 216 colours gives us amazing freedom. Simultaneous contrast–without which it would be be possible to perceive colors–is illustrated here by juxtaposing a number of color combinations...

The x-value of the mouse position defines the size of the inside colour field, the y-value the hue.

@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

@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
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 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
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 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
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