Skip to content

Instantly share code, notes, and snippets.


Christopher Pietsch cpietsch

View GitHub Profile
View DHT22 Raspi node-red to influxdb
"label":"Flow 1",
cpietsch /
Last active Oct 29, 2020
d3.js map with markers

Easy example on how to put marker on a d3.js map.

You got 2 options:

  • using d3.geo.path() which does all the work for you
  • using svg circles and translating them via projection(d.geometry.coordinates)
View a little chat with gpt-3
Q: What is human life expectancy in the United States?
A: Human life expectancy in the United States is 78 years.
Q: Who was president of the United States in 1955?
A: Dwight D. Eisenhower was president of the United States in 1955.
Q: What party did he belong to?
A: He belonged to the Republican Party.
Q: Who was president of the United States before George W. Bush?
cpietsch / download.js
Created Dec 19, 2018
nodejs script to download images from a csv file
View download.js
var fsPromises = require('fs').promises
var dsv = require('d3-dsv');
var download = require('download');
async function all(){
let data = dsv.csvParse(await fsPromises.readFile("data.csv", { encoding: "utf8" }))
for(let entry of data) {

Keybase proof

I hereby claim:

  • I am cpietsch on github.
  • I am chrispie ( on keybase.
  • I have a public key ASA1z5V4JBxq8UzVGSXn8oqk_wln55LjyjfFZEUtiEz2IAo

To claim this, I am signing this object:

cpietsch / .block
Last active Apr 25, 2017
Geo Scatterplot Transitions
View .block
license: mit
cpietsch /
Last active May 29, 2016
Local Variables 2
cpietsch /
Last active May 29, 2016
Local Variables

In response to mbostock's block: Local Variables and the Tweet I implemented a little variation having a .local(name[, value) method you can use on selections.

On set, the value is stored on the given element:

element.local("foo", value);

On get, the value is retrieved from given element, or the nearest ancestor that defines it:

var value = element.local("foo");

cpietsch / .block
Last active Feb 27, 2016 — forked from mbostock/.block
Pseudo-Dorling Cartogram
View .block
license: gpl-3.0
cpietsch / spookymultiple.js
Created May 24, 2013
run spooky.js in a recursive mode multiple times
View spookymultiple.js
var Spooky, config, i, run_spooky, scraping, spooky, spooky_is_ready;
Spooky = require('spooky');
config = {
child: {
port: 8081
You can’t perform that action at this time.