Skip to content

Instantly share code, notes, and snippets.

View armollica's full-sized avatar

Andrew Mollica armollica

View GitHub Profile
@armollica
armollica / README.md
Last active April 27, 2016 03:50
HSL Decomposition

Decomposing an image's color information. Click an image to see it decomposed.

Pixels have been grouped by hue, saturation and lightness into discrete bins. Lightness is plotted on the x-axis, saturation on the y-axis and hue is displayed directly in the cells formed by the intersection of the other two. Each cell's size is determined by the frequency of pixels in that intersection. Treemaps are used to show the relative frequency of the various hues within each cell.

See this block for an alternative design using circle packing instead of treemaps.

Images source: National Gallery of Art's Highlights

@armollica
armollica / README.md
Last active August 21, 2022 01:51
HSL Decomposition 2
@armollica
armollica / README.md
Last active February 18, 2016 21:29
Labeling Nearest Points

Display labels for points close to the mouse cursor. Could be used to display multiple tooltips, etc.

Uses k-nearest-neighbors algorithm from this block by llb4ll. Check the box to see the underlying quadtree (red points are the nearest points, orange are those that were searched but found to be not among the nearest).

@armollica
armollica / README.md
Last active February 18, 2016 21:59
Scatterplot with Tufte Axes

Scatterplot using axes that I saw in one of Edward Tufte's books. I can't remember which (maybe this one).

The axes are pretty pared down but provide basic distributional information of the data. The 1st and 4th quartiles are indicated by the outer lines and the 2nd and 3rd by the inner lines. The gap is the median.

Hovering allows you to see the actual value of a given point. Uses an invisible Voronoi tessellation to make point selection nicer (inspired by this block).

@armollica
armollica / .block
Last active May 31, 2016 02:06
Bubbly Jobs Chart
height: 2500
@armollica
armollica / .block
Last active February 22, 2016 02:58
2D/3D Scatterplot
height: 600
@armollica
armollica / .block
Last active January 6, 2018 13:19
NBA Attendance
height: 400
@armollica
armollica / .block
Last active January 6, 2018 13:18
State Lotteries
height: 800
@armollica
armollica / README.md
Last active March 5, 2016 05:28
In-browser GIS buffer
@armollica
armollica / .block
Last active May 28, 2019 03:06
Pictogram Table
height: 900