Skip to content

Instantly share code, notes, and snippets.

View ndarville's full-sized avatar

N. Darville ndarville

  • Europe
View GitHub Profile
@ndarville
ndarville / README.md
Last active August 29, 2015 14:01
Løkke vs. Vestager
@ndarville
ndarville / README.md
Last active August 29, 2015 14:00
Map Test

Debugging a map chart for ndarville.github.io.

@ndarville
ndarville / README.md
Last active August 29, 2015 14:00
Party Trend (Multi-Party Display)

(This chart is a part of the d3-charts collection available here.)


This demonstrates the multi-party version of the Party Trend chart. To see the single-party version, go here.

@ndarville
ndarville / webm.md
Last active March 11, 2025 17:21
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@ndarville
ndarville / README.md
Last active January 3, 2016 14:39
Majority chart

(This chart is a part of the d3-charts collection available [here][collection].)


This is a majority chart, my own tweak of a plain symmetry bar chart. It displays a vertical bar chart with each bar anchored around a common origin of 50%. The code was based on Mike Bostock's ["Bar Chart with Negative Values" chart][original], inspired by a [post][junk-charts] on Junk Charts, and was originaly used for an article I wrote, ["Women in Tech by the Numbers"][post], in which I explained the chart like so:

Just in case the chart needs explaining, each bar displays how the men outnumber the women---and vice versa. If a group of software engineers at a company is 90% male, the bars will display the differential of 40% from an even 50%.

Because the point of the chart is to display majorities, there is no point in showing the first 50% of a majority; it is completely redundant, when you can just show the percentage one side is ahead of the other.

@ndarville
ndarville / README.md
Last active December 31, 2015 02:09
The 2014 Budget in Context

This chart is a variation of my relative-budgets chart, part of the d3-charts collection available here.)


The data for the chart was based on this one from All in with Chris.

@ndarville
ndarville / README.md
Created November 28, 2013 19:58
Proportion Chart

Shows a bar divided into shares or proportions of a total value.

@ndarville
ndarville / README.md
Last active December 29, 2015 13:49
Finanslov 2014
@ndarville
ndarville / README.md
Last active December 29, 2015 09:09
Symmetric Stack Chart

(This chart is a part of the d3-charts collection available [here][collection].)


This is an symmetric stack chart with each bar anchored around a common origin. The code was based on Mike Bostock's ["Bar Chart with Negative Values" chart][original] and inspired by a [post][junk-charts] on Junk Charts.

Unlike the examples in the two links, the x axis of this implementation has a symmetric x-axis to ensure readers aren't [perceptually manipulated][perception] by one side taking up a larger, more imposing, share of the space than the other.

The main thing to have in mind when using this particular chart is that the order of your data rows matter; a part of the story this chart tells uses the vertical dimension, so embrace it. Usually, you'll see people use the chart for demographics with people divided by age or income, but there are plenty of other uses you'll realize soon enough.